AWS DevOps Engineer Professional Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the AWS DevOps Engineer Professional Test. Enhance your skills with flashcards and multiple-choice questions, each offering hints and explanations. Become exam-ready!

Practice this question and more.


What is required to allow logs from CodeDeploy deployments to be ingested into CloudWatch Logs?

  1. Install the CloudWatch Logs agent and ensure role permissions

  2. Use AWS CLI to manually upload logs

  3. Enable logging in CodeDeploy settings only

  4. Create a custom log group in CloudWatch

The correct answer is: Install the CloudWatch Logs agent and ensure role permissions

To allow logs from CodeDeploy deployments to be ingested into CloudWatch Logs, it is essential to install the CloudWatch Logs agent on the instances where the deployments occur. The agent is responsible for monitoring the log files and sending the data to CloudWatch Logs, making it a critical component for log ingestion. Additionally, ensuring that the appropriate IAM role permissions are configured is crucial. This allows the CloudWatch Logs agent to publish logs to the specified log group in CloudWatch. Without the necessary permissions, even with the agent installed, the logs would not be transmitted successfully. In contrast, simply using the AWS CLI to manually upload logs would not provide a continuous stream of log data and would not be automated, which would not meet the needs of a typical deployment scenario where automation is key. Enabling logging solely in CodeDeploy settings would not be sufficient because that action does not address the requirement for the logs to be sent to CloudWatch. There must be a mechanism in place for the logs to actually be streamed or sent. Creating a custom log group in CloudWatch is an action that can be carried out as part of the setup, but without the CloudWatch Logs agent to facilitate the log transfer, the logs would not be captured or available in that