Deployment
376 soru
A developer is configuring an AWS Serverless Application Model (SAM) template for a microservice. The microservice includes an `AWS::Serverless::Function` that requires access to a database password. The password must be rotated automatically every 30 days to comply with corporate security standards.
Which approach should the developer use to securely provide the database password to the function through the SAM template?
A developer is releasing an update to a production REST API managed by Amazon API Gateway. The update includes changes to both the API Gateway resource structure and the backend integrations. To minimize risk, the developer wants to route of the API traffic to the new version while the remaining is handled by the stable production version. The strategy must support immediate rollback to the stable version without modifying client configurations or deploying new API stages. Which approach should the developer use to meet these requirements?
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must execute an AWS Lambda function to run validation tests on the replacement task set before production traffic is shifted. The validation tests require retrieving a database password that must be rotated automatically every 30 days. Additionally, the developer must configure the IAM trust policy for the CodeDeploy service role to allow the service to perform the deployment.
Which configuration should the developer implement?
A developer is creating a serverless application using AWS SAM. The application contains an Amazon SQS queue and an AWS::Serverless::Function that needs to process messages from the queue. The function must have the minimum necessary permissions to poll messages from the SQS queue and delete them after processing. Which two configurations in the AWS SAM template are required to set up this event source and its permissions?
Geçerli olan tümünü seçin
A developer is configuring an in-place deployment using AWS CodeDeploy for an application running on a fleet of Amazon EC2 instances behind an Application Load Balancer. The application must maintain at least of its serving capacity throughout the deployment process. Which TWO of the following CodeDeploy deployment configurations can the developer use to meet this requirement? (Select TWO.)
Geçerli olan tümünü seçin
A cloud engineer is deploying a serverless microservice using an AWS Serverless Application Model (SAM) template. During the deployment process, the AWS CloudFormation engine returns an error stating that the resource type `AWS::Serverless::Function` is not supported or is invalid.
The template contains the following configuration:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
GetProductFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Events:
GetProductApi:
Type: Api
Properties:
Path: /products/{id}
Method: get
Which of the following configuration adjustments will resolve this deployment error?
A developer is configuring a blue/green deployment for an Amazon ECS application using AWS CodeDeploy. The deployment must execute validation tests on the green task set after it starts but before production traffic is directed to it. In addition, the developer must ensure that AWS CodeDeploy has the correct permissions to perform the deployment. Which two configurations must the developer implement to satisfy these requirements? (Select TWO.)
Geçerli olan tümünü seçin
An organization is deploying updates to a high-traffic web application hosted on AWS Elastic Beanstalk. The application is highly sensitive to performance issues, so the deployment process must maintain of the current instance capacity at all times. Additionally, if the new version fails health checks, the deployment must support an immediate rollback that does not alter or disrupt the active instances in the original environment. Which two Elastic Beanstalk deployment policies will meet these requirements?
Geçerli olan tümünü seçin
A developer is configuring an in-place deployment to a fleet of Amazon EC2 instances registered with an Application Load Balancer using AWS CodeDeploy. The developer needs to run a local shell script named `verify_health.sh` to confirm that the application server is responding successfully on port 8080. This verification must execute after the application has started but before the instances are reregistered with the load balancer to receive production traffic. Which lifecycle hook in the `appspec.yml` file must the developer use to run this script?
A developer is configuring an AWS CodeDeploy Blue/Green deployment for a critical web application. The application runs on Amazon EC2 instances managed by an Auto Scaling group behind an Application Load Balancer. The deployment must satisfy the following constraints:
- If any issues are detected after shifting traffic to the new (Green) fleet, the application must be rolled back to the original (Blue) fleet within a -hour window.
- The rollback must be nearly instantaneous, avoiding the time required to provision new EC2 instances or initialize the application.
- To control costs, all resources from the original fleet must be automatically terminated after the -hour window if no issues are detected.
Which configuration settings in the CodeDeploy deployment group will meet these requirements?
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. During the deployment process, the deployment fails with an access denied error because CodeDeploy is unable to modify the Application Load Balancer listeners and target groups. The developer verifies that the CodeDeploy service role has the AWSCodeDeployRoleForECS managed policy attached. Which configuration must the developer verify or update to resolve this deployment failure?
A developer is using AWS SAM to deploy a serverless application. The template file (`template.yaml`) contains the following definition:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
ProcessDataFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Events:
GetRequest:
Type: Api
Properties:
Path: /data
Method: get
When the developer attempts to deploy the application, the deployment fails with errors indicating unrecognized resource types and invalid code locations.
Which two actions must the developer take to resolve these issues and successfully deploy the application? (Select two.)
Geçerli olan tümünü seçin
A developer is configuring a canary deployment for an AWS Lambda function using AWS CodeDeploy. The deployment must run a test Lambda function to validate the deployment before shifting traffic, and another test Lambda function to run post-deployment validation checks after all traffic has been shifted to the new version. Which two configuration steps must the developer perform to meet these requirements?
Geçerli olan tümünü seçin
A developer is configuring a CI/CD pipeline for a microservice deployed on Amazon ECS. The company requires a deployment strategy that minimizes the blast radius by shifting traffic to the new version of the application in multiple stages (either in a single initial test phase followed by a complete cutover, or in periodic increments). The deployment must also support automatic rollbacks if any CloudWatch alarms are triggered. Which two AWS CodeDeploy predefined deployment configurations can the developer use to meet these requirements?
Geçerli olan tümünü seçin
A developer is planning to deploy a new version of an application on AWS Elastic Beanstalk. The application is currently running in a single production environment containing Amazon EC2 instances behind an Application Load Balancer. The deployment must meet the following constraints:
- The environment must maintain of its processing capacity ( active instances) during the deployment process.
- To control cost, the developer must not create a separate, duplicate Elastic Beanstalk environment or perform a DNS swap.
- The rollback process must be fully automated in the event that the new version fails application health checks.
Which Elastic Beanstalk deployment policy should the developer select?
A developer is configuring a deployment group in AWS CodeDeploy to deploy an application to a fleet of Amazon EC2 instances. The developer creates a new IAM role to serve as the service role for the deployment group. However, when the deployment is initiated, it fails immediately with a service role authorization error before any lifecycle event scripts in the appspec.yml file are executed. Which configuration issue is the most likely cause of this failure?
A developer uses AWS SAM to deploy a serverless application. The template defines an `AWS::Serverless::Function` triggered by an API Gateway HTTP API event source, and a custom `AWS::IAM::Role` for the execution role. The deployment completes successfully. However, when the API is invoked, the client receives a ` Bad Gateway` error. The CloudWatch logs show that the Lambda service is unable to assume the configured execution role, and the function is not executed.
Here is a portion of the template:
yaml
Resources:
ProcessOrderFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: index.handler
Runtime: nodejs18.x
Role: !GetAtt ExecutionRole.Arn
Events:
CreateOrder:
Type: Api
Properties:
Path: /orders
Method: post
ExecutionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: apigateway.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: WriteLogs
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: '*'
The handler code in `src/index.js` is defined as:
javascript
exports.handler = async (event) => {
return "Order successfully processed!";
};
Which TWO modifications are required to resolve both the execution role assumption issue and the ` Bad Gateway` error? (Select TWO.)
Geçerli olan tümünü seçin
A developer needs to deploy a new version of a critical web application. The deployment must satisfy the following constraints:
- The application must maintain of its serving capacity throughout the deployment.
- The deployment must have zero downtime.
- The deployment must not modify the existing production instances until the new version is fully verified.
- Rollbacks must be fast and have minimal impact on the active production environment if the new version fails verification.
Which two deployment strategies will satisfy these requirements? (Select two.)
Geçerli olan tümünü seçin
An organization is transitioning their microservices to Amazon ECS and plans to use AWS CodeDeploy for automated blue/green deployments. To ensure zero downtime, the deployment workflow must execute validation tests against the replacement task set on a secondary port before shifting any production traffic. Furthermore, AWS CodeDeploy must be authorized to interact with the ECS cluster and load balancer during the deployment execution.
Which TWO configuration actions should the developer perform to support this deployment flow?
Geçerli olan tümünü seçin
An organization hosts a web application on an AWS Elastic Beanstalk environment. The operations team needs to deploy a minor software update. Due to strict AWS account limits, the environment cannot launch any additional Amazon EC2 instances during the deployment. The application must remain online and accessible to users, but it can tolerate running at a minimum of of its total instance capacity during the deployment. Which Elastic Beanstalk deployment policy should the developer configure to meet these requirements?