ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 166 - DVA-C02 discussion

Report
Export

A developer is working on an ecommerce website The developer wants to review server logs without logging in to each of the application servers individually. The website runs on multiple Amazon EC2 instances, is written in Python, and needs to be highly available

How can the developer update the application to meet these requirements with MINIMUM changes?

A.
Rewrite the application to be cloud native and to run on AWS Lambda, where the logs can be reviewed in Amazon CloudWatch
Answers
A.
Rewrite the application to be cloud native and to run on AWS Lambda, where the logs can be reviewed in Amazon CloudWatch
B.
Set up centralized logging by using Amazon OpenSearch Service, Logstash, and OpenSearch Dashboards
Answers
B.
Set up centralized logging by using Amazon OpenSearch Service, Logstash, and OpenSearch Dashboards
C.
Scale down the application to one larger EC2 instance where only one instance is recording logs
Answers
C.
Scale down the application to one larger EC2 instance where only one instance is recording logs
D.
Install the unified Amazon CloudWatch agent on the EC2 instances Configure the agent to push the application logs to CloudWatch
Answers
D.
Install the unified Amazon CloudWatch agent on the EC2 instances Configure the agent to push the application logs to CloudWatch
Suggested answer: D

Explanation:

Centralized Logging Benefits: Centralized logging is essential for operational visibility in scalable systems, especially those using multiple EC2 instances like our e-commerce website. CloudWatch provides this capability, along with other monitoring features.

CloudWatch Agent: This is the best way to send custom application logs from EC2 instances to CloudWatch. Here's the process:

Install the CloudWatch agent on each EC2 instance.

Configure the agent with a configuration file, specifying:

Which log files to collect.

The format in which to send logs to CloudWatch (e.g., JSON).

The specific CloudWatch Logs log group and log stream for these logs.

Viewing and Analyzing Logs: Once the agent is pushing logs, use the CloudWatch Logs console or API:

View and search the logs across all instances.

Set up alarms based on log events.

Use CloudWatch Logs Insights for sophisticated queries and analysis.

Amazon CloudWatch Logs:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html

Unified CloudWatch Agent:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html

CloudWatch Logs Insights:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html

asked 16/09/2024
Raymond Chan
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first