On This Page
CloudWatch offers a reliable, scalable, & flexible monitoring solution that can easily start.
CloudWatch can provide a dependable, scalable, & flexible monitoring solution that is simple to set up.
CloudWatch vs CloudTrail
|Log events across AWS Services – think operations||Log API activity across AWS services – think activities, or who to blame|
|Higher-level comprehensive monitoring and event service||More low-level, granular|
|Log from multiple accounts||Log from multiple accounts|
|Logs stored indefinitely||Logs stored to S3 or CloudWatch indefinitely|
|Alarms history for 14 days||No native alarming; can use CloudWatch alarms|
- Standard vs High resolution metrics.
- CloudWatch unified agent collect both system metrics and log files from Amazon EC2 Instances and on-premise servers. The agent supports both Windows Server and Linux, and enables to select the metrics to be collected, including sub-resource metrics such as per-CPU core. Aside from the usual metrics, it also tracks the memory, swap, and disk space utilization metrics of your server.
- Cloudwatch events could be used for scheduling lambda functions.
- RAM Utilization needs custom metrics
- which use-cases are covered in Standard metrics and which ones would need custom metrics. (memory utilization needs custom metrics)
- Basic (5 min) vs detailed (1 min) vs high resolution (1s) monitoring.
Same type services: CloudWatch, CloudTrail, Systems Manager, Cost & usage report, Cost explorer, Managed Services
A Developer wants access to the log data of an application running on an EC2 instance available to systems administrators.
Which of the following enables monitoring of the metric in Amazon CloudWatch?
- Retrieve the log data from AWS CloudTrail using the LookupEvents API Call
- Retrieve the log data from CloudWatch using the GetMetricData API call
- Launch a new EC2 instance, configure Amazon CloudWatch Events, and then install the application
- Install the Amazon CloudWatch logs agent on the EC2 instance that the application is running on
A developer must use AWS X-Ray to monitor an application that is running on an Amazon EC2 instance. Developer has prepared the application by using the X-Ray SDK.
What should the developer do to perform the monitoring?
- Configure the X-Ray SDK sampling rule and target. Activate the X-Ray daemon from the EC2 console or the AWS CLI with the modify-instance-attribute command to set the XRayEnabled flag.
- Install the X-Ray daemon. Assign an IAM role to the EC2 instance with a policy that allows writes to X-Ray.
- Install the X-Ray daemon. Configure it to forward data to Amazon EventBridge (Amazon CloudWatch Events). Grant the EC2 instance permission to write to Event Bridge (CloudWatch Events).
- Deploy the X-Ray SDK with the application, and instrument the application code. Use the SDK logger to capture and send the events.
A developer is designing an AWS Lambda function to perform a maintenance activity. The developer will use Amazon EventBridge (Amazon CloudWatch Events) to invoke the function on an hourly schedule. The developer wants the function to log information at different levels of detail according to the value of a log level variable. The developer must design the function so that the log level can be set without requiring a change to the function code.
Which solution will meet these requirements?
- A. Add a custom log level parameter for the Lambda function. Set the parameter by using the Lambda console.
- Set the log level in the Amazon CloudWatch Logs console.
- Set the log level in a Lambda environment variable.
- Add a custom log level parameter for the Lambda function. Set the parameter by using the AWS CLI.