Customize AWS CodeDeploy Agent Logs on EC2 for Enhanced Security | Exam Question Answer

Capture Wire Logs from Amazon S3 Bucket & Store at Custom Location within EC2 Instance

Prev Question Next Question

Question

You are deploying an AWS CodeDeploy agent on an EC2 & required to store all logs at a custom location to meet security guidelines.

Which of the following can be used to capture wire logs from the Amazon S3 bucket & stored at a custom location within the EC2 instance?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - C.

AWS CodeDeploy Agent captures wire logs from Amazon S3 when :log_aws_wire: is set to True & is stored at the location as specified at :log_dir: .

Options A & D are incorrect as log_aws_wire needs to be True to capture logs.

Option B is incorrect as log_aws_wire is set to True to capture logs & stored at the location specified in log_dir.

For more information on.

https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-agent-configuration.html

The AWS CodeDeploy agent is used to automate code deployments to any instance, including Amazon EC2 instances. The agent sends logs to Amazon S3 buckets by default. However, if you want to store the logs at a custom location within the EC2 instance, you can configure the CodeDeploy agent by modifying the configuration file.

In the context of the given question, the objective is to capture wire logs from the Amazon S3 bucket and store them at a custom location within the EC2 instance. Wire logs are the logs generated by the CodeDeploy agent that detail the interactions between the agent and the AWS service.

Option A: Set “:log_aws_wire:” as False & specify the location for logs using “:log_dir:” This option is incorrect because it sets the value of "log_aws_wire" to false, which means that the wire logs will not be captured. Instead, the logs will be written to the location specified in "log_dir."

Option B: Set “:log_dir:” as True & specify the location for logs using “:log_aws_wire:” This option is incorrect because it sets the value of "log_dir" to true, which is not a valid configuration. Additionally, the value of "log_aws_wire" should be set to true to capture wire logs.

Option C: Set “:log_aws_wire:” as True & specify the location for logs using “:log_dir:” This option is correct because it sets the value of "log_aws_wire" to true, which captures wire logs. Additionally, the logs will be written to the location specified in "log_dir."

Option D: Set “:log_dir:” as False & specify the location for logs using “:log_aws_wire:” This option is incorrect because it sets the value of "log_dir" to false, which is not a valid configuration. Additionally, the value of "log_aws_wire" should be set to true to capture wire logs.

In summary, the correct answer is option C: Set “:log_aws_wire:” as True & specify the location for logs using “:log_dir:”