AWS CodeDeploy
48 soru
A developer is configuring an AWS CodeDeploy deployment group for an in-place deployment of a web application to Amazon EC2 instances. The deployment must automatically revert to the last known successful version if the new deployment fails or if application error rates exceed a specific threshold. Additionally, the developer needs to ensure that any temporary files left by a failed deployment are cleaned up during the rollback process.
Which of the following configurations should the developer implement to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is setting up an AWS CodeDeploy deployment group for an in-place deployment of a web application to a fleet of Amazon EC2 instances. The deployment fails during the DownloadBundle phase because the CodeDeploy agent on the EC2 instances cannot access the deployment bundle in the Amazon S3 bucket. Additionally, the developer needs to store database credentials securely and retrieve them during the deployment process rather than packaging them in the deployment bundle.
Which two actions should the developer take to resolve these issues? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must execute a validation Lambda function after the test traffic is routed to the replacement task set but before the production traffic is shifted. Additionally, the developer must ensure that AWS CodeDeploy has the necessary permissions to execute the deployment steps and update the Application Load Balancer listeners. Which of the following configurations must the developer implement to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring AWS CodeDeploy to deploy a Python web application to a fleet of Amazon EC2 instances. The deployment process must retrieve database credentials securely from AWS Systems Manager Parameter Store (stored as a `SecureString` parameter) and execute a database migration script before the application starts and begins accepting traffic.
Which two actions must the developer perform to meet these requirements?
Geçerli olan tümünü seçin
A developer is setting up an in-place deployment of a web application to Amazon EC2 instances using AWS CodeDeploy. The application revision bundle is stored in a private Amazon S3 bucket. During the deployment, the process fails during the DownloadBundle lifecycle event with an Access Denied error. Which action should the developer take to resolve this failure?
A developer is performing an in-place deployment of a new application revision to a fleet of Amazon EC2 instances using AWS CodeDeploy. The developer updated a cleanup script named 'stop-server.sh' in the new revision and referenced it in the 'ApplicationStop' lifecycle hook of the 'appspec.yml' file. However, the deployment fails during the 'ApplicationStop' phase. Investigation reveals that the 'stop-server.sh' script currently residing on the instances (from the previous deployment) has a syntax error that causes it to exit with a non-zero status, whereas the updated script in the new deployment bundle has this error fixed. Which of the following explains why the deployment failed and how the developer can successfully deploy the new application revision?
A developer is writing an appspec.yml file for an in-place deployment to Amazon EC2 instances using AWS CodeDeploy. The developer needs to execute a shell script to gracefully stop the running web server application before the new deployment bundle is downloaded. Additionally, the script requires retrieving database credentials that must undergo automatic rotation. How should the developer configure the deployment to meet these requirements?
A developer is configuring an AWS CodeDeploy blue/green deployment for a microservice on Amazon ECS. The deployment must execute a validation Lambda function named `run-integration-tests` immediately after the load balancer routes test traffic to the replacement task set, but before production traffic is shifted. Additionally, the Lambda function needs to retrieve a database credential that must be rotated automatically every 30 days.
Here is a snippet of the AppSpec file being used:
yaml
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "arn:aws:ecs:us-east-1:123456789012:task-definition/api-service:2"
LoadBalancerInfo:
ContainerName: "api"
ContainerPort: 8080
Hooks:
- <HOOK_NAME>: "arn:aws:lambda:us-east-1:123456789012:function:run-integration-tests"
Which combination of CodeDeploy lifecycle hook and AWS service configuration will satisfy these requirements?
A developer is configuring a blue/green deployment for an application on Amazon ECS using AWS CodeDeploy. The deployment must execute a validation test suite to verify the application's health using a test traffic port before the production traffic is routed to the new task set. Additionally, CodeDeploy must be configured with the necessary permissions to manage the ECS deployment. Which of the following configurations must the developer perform? (Select TWO.)
Geçerli olan tümünü seçin
A developer is setting up a deployment pipeline to update a serverless application. The developer is configuring AWS CodeDeploy to perform a Canary deployment of an AWS Lambda function. The deployment process must execute a test Lambda function to validate the deployment before any production traffic is shifted to the new version. Additionally, the CodeDeploy service must be granted the minimal permissions required to orchestrate the deployment on behalf of the developer.
Which configuration steps must the developer perform to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must execute a validation test against the newly deployed tasks (the green task set) before any production traffic is shifted. If the validation test fails, the deployment must automatically roll back. The developer is defining the AppSpec file in YAML format and configuring the IAM permissions. Which of the following configurations are required to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is migrating a containerized web application from Amazon EC2 instances to Amazon ECS. The deployment process is managed by AWS CodeDeploy using a Blue/Green deployment configuration. Before production traffic is shifted to the replacement task set, the deployment must execute a database migration script. This script retrieves a database password that must be automatically rotated every 30 days.
The developer writes the following `appspec.yaml` file for the Amazon ECS service:
yaml
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "arn:aws:ecs:us-east-1:111122223333:task-definition/my-app:1"
LoadBalancerInfo: ContainerName: "web"
ContainerPort: 80
Hooks:
- AfterInstall:
- location: "scripts/migrate.sh"
timeout: 600
Which set of actions must the developer perform to ensure the database migration runs successfully and complies with the rotation requirement?
A company is deploying a containerized microservice to Amazon ECS on AWS Fargate using a blue/green deployment managed by AWS CodeDeploy. The deployment must run a database schema migration script before production traffic is routed to the new task set, and it must execute post-deployment integration tests once the traffic routing is complete. Additionally, the deployment process must have the necessary permissions to interact with ECS and Lambda. Which TWO options represent the correct configuration steps required for this deployment?
Geçerli olan tümünü seçin
A developer is deploying a web application to Amazon EC2 instances using AWS CodeDeploy. The developer needs to execute a script named initialize.sh immediately after the application files are copied to the target instances, but before the application service starts. Which configuration action should the developer take to accomplish this?
A developer is setting up AWS CodeDeploy to deploy an application to Amazon EC2 instances. The deployment fails because CodeDeploy lacks the necessary permissions to interact with AWS services on behalf of the developer.
Which configuration must the developer implement to resolve this permission issue?
A developer is configuring a blue/green deployment for a containerized microservice running on Amazon ECS using AWS CodeDeploy. The deployment must execute a database schema migration before the replacement task set is created. Additionally, after the replacement task set is provisioned and test traffic is routed to it via a test listener, the developer must run integration tests against the test port to validate the deployment before shifting production traffic.
Which of the following configurations should the developer implement in the AppSpec file to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is writing an appspec.yaml file to deploy updates to an AWS Lambda function using AWS CodeDeploy. Which of the following sections or hooks are valid for an AWS Lambda deployment? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring the AppSpec file for an AWS CodeDeploy deployment to Amazon ECS. The developer wants to run a validation test before production traffic is routed to the newly deployed task set. Which lifecycle hook should the developer use in the AppSpec file?
A developer is configuring an AWS CodeDeploy deployment for an AWS Lambda function. The developer needs to define the target Lambda function to deploy and run a validation test before any production traffic shifts to the new version. Which two configurations must the developer include in the AppSpec file to accomplish this? (Select TWO.)
Geçerli olan tümünü seçin
A developer is preparing an AppSpec file for an Amazon ECS deployment using AWS CodeDeploy. The developer needs to define lifecycle hooks to validate the deployment before routing production traffic to the new task set. What target type must the developer specify in the AppSpec file to execute the validation tests?