SOA-C02 Question 150
Single answerYou manage an environment where developers deploy updates to an Amazon S3 bucket multiple times a day. The manual process involves uploading files via the AWS Management Console and setting metadata on each file. This process is time-consuming and error-prone. How can you automate this process to reduce manual effort and ensure consistency?
- A
Use AWS Lambda to monitor the S3 bucket and automatically set metadata on new files.
- B
Create an AWS CodePipeline pipeline integrated with AWS CodeDeploy to handle S3 uploads and metadata configuration.
- C
Write a script using the AWS CLI to upload files and set metadata, and run it whenever updates are needed.
- D
Set up an Amazon EventBridge rule to trigger an AWS Batch job for file uploads and metadata configuration.
Show answer and explanation
Correct answer: C
Explanation
The AWS CLI allows you to script the process of uploading files to S3 and setting metadata in a repeatable and automated way. This eliminates the need for manual work and reduces the risk of errors. While other options involve automation tools, they are either overly complex or not directly suited to the problem at hand.
- A. Incorrect.
AWS Lambda is useful for serverless automation, but it cannot directly upload files or replace the manual upload process. It is not the best fit for this task.
- B. Incorrect.
AWS CodePipeline is designed for CI/CD workflows, but it is overly complex for simple S3 uploads and metadata configuration. It is not the most efficient solution for this scenario.
- C. Correct.
Using the AWS CLI script is a direct, efficient, and repeatable way to automate file uploads and metadata configuration. It requires minimal setup and solves the problem effectively.
- D. Incorrect.
Amazon EventBridge is good for event-driven automation, but it is not well-suited for directly handling file uploads and metadata configuration in this scenario.