Question #973
A developer is preparing to deploy an application to an on-premises server using AWS services. The application code is stored in an Amazon S3 bucket. The developer wants to validate the deployment process locally with the LEAST amount of configuration.
What should the developer do to test the deployment locally?
Set up an AWS CodeDeploy application with a deployment group targeting the on-premises server. Configure the deployment source as the S3 bucket containing the code. Initiate the deployment and monitor the AWS Management Console for results.
Use AWS CodeArtifact to create a repository and publish the application code. Configure the local environment to pull the code from the repository and run validation tests before deployment.
Create an AWS CodeBuild project to pull the code from the S3 bucket and execute build commands. Integrate the project with AWS CodePipeline to automate testing and review the logs for errors.
Install the AWS CodeDeploy agent on the local machine. Use the codedeploy-local command with the --bundle-location option to specify the S3 bucket path of the deployment package.
Explanation
Answer D is correct because:
1. AWS CodeDeploy Agent: Required for on-premises deployments, enabling communication with AWS services.
2. codedeploy-local Command: Allows local deployment testing without creating a full deployment group or pipeline. The --bundle-location option directly references the S3 bucket, avoiding manual code downloads.
Why other options are incorrect:
- A: Requires configuring a deployment group and monitoring via the console, adding unnecessary complexity.
- B: CodeArtifact manages dependencies, not deployment validation.
- C: Involves CodeBuild and CodePipeline setup, which is excessive for local testing.
Key Points:
- Use codedeploy-local for quick local validation.
- CodeDeploy agent is mandatory for on-premises deployments.
- Avoid full pipeline setups when testing locally.
Answer
The correct answer is: D