Deployment
376 soru
A developer is configuring a rolling update deployment for an Amazon ECS service. The service has a desired task count of 12. To ensure high availability and prevent performance degradation under peak load, the service must maintain 100% of its desired capacity at all times during the deployment. Furthermore, due to CPU and memory constraints on the underlying container instances, the deployment can run at most 3 additional tasks concurrently. Which parameters for minimum healthy percent and maximum percent should the developer configure for the ECS service?
A developer is writing an AWS SAM template for a serverless application. The application contains a Lambda function (`ProcessOrdersFunction`) that must execute with a custom IAM role to comply with strict organizational security requirements. The developer defines the custom role and the function in the SAM template as follows:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: apigateway.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: DynamoDBWriteAccess
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- dynamodb:PutItem
Resource: !GetAtt OrdersTable.Arn
ProcessOrdersFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: index.handler
Runtime: nodejs18.x
Role: !GetAtt LambdaExecutionRole.Arn
OrdersTable:
Type: AWS::Serverless::SimpleTable
During deployment, the stack is created successfully. However, when the client application triggers the Lambda function, the function fails to execute, and the logs indicate that the execution role cannot be assumed. What is the root cause of this execution failure?
A developer is configuring an AWS CodeDeploy deployment group to perform a blue/green deployment for an Amazon ECS service. The developer wants to run validation tests against the replacement task set using a test listener before routing production traffic. The deployment fails during the validation phase. Upon reviewing the logs, the developer discovers that the AppSpec file specifies an invalid lifecycle hook for the ECS compute platform, and CodeDeploy is unable to invoke the validation Lambda function due to incorrect IAM permissions. Which combination of configurations will correctly resolve these issues?
An operations team is migrating a legacy provisioning stack to a serverless model. A team member creates a new template file containing an `AWS::Serverless::Function` resource:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
RetrieveInventoryFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs20.x
CodeUri: ./src
Environment:
Variables:
DB_PASSWORD: '{{resolve:ssm-secure:InventoryDBPassword}}'
The database password requires automated rotation every 30 days. When attempting to create the stack, AWS CloudFormation fails with a validation error stating that the `AWS::Serverless::Function` resource type is unrecognized.
Which TWO actions should the team take to successfully deploy the template and retrieve the database credentials securely?
Geçerli olan tümünü seçin
A developer is designing a deployment pipeline for a critical microservice on AWS. The deployment process must ensure zero downtime, allow testing of the new application version with a small fraction of production traffic before shifting all traffic, and support automatic rollback if CloudWatch alarms detect errors.
Which two deployment strategies or configurations will satisfy these requirements?
Geçerli olan tümünü seçin
A developer is configuring the `appspec.yml` file for an AWS Lambda deployment using AWS CodeDeploy. The deployment needs to shift traffic to a new version of a function. The developer wants to run validation tests before the traffic shift starts, and a notification function after all traffic has successfully shifted. The developer begins drafting the AppSpec file as follows:
yaml
version: 0.0
Resources:
- MyLambdaFunction:
Type: AWS::Lambda::Function
Properties:
Name: "MyLambdaFunction"
Alias: "live"
CurrentVersion: "1"
TargetVersion: "2"
Hooks:
- Hook_1: "ValidationLambdaFunction"
- Hook_2: "NotificationLambdaFunction"
Which of the following lifecycle hooks are valid replacements for `Hook_1` and `Hook_2` to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer uses AWS SAM to build and deploy a serverless microservice. The SAM template defines a Lambda function triggered by an API Gateway event using the following template definition:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
SubmitFeedbackFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: app.handler
Runtime: nodejs18.x
Events:
PostFeedback:
Type: Api
Properties:
Path: /feedback
Method: post
The Lambda function's handler code is implemented as follows:
javascript
exports.handler = async (event) => {
const feedbackText = event.feedback;
return {
message: `Feedback received: ${feedbackText}`
};
};
When clients send a POST request with the JSON payload `{"feedback": "Great service!"}`, the response from the API is ` Bad Gateway` and the Lambda logs show that `feedbackText` is undefined.
Which explanation best identifies the root cause of this failure, and how should it be resolved?
A developer is updating a critical AWS Lambda function using AWS CodeDeploy. The deployment must route of the production traffic to the new version of the function first. The deployment must then automatically shift the remaining of the traffic to the new version after exactly minutes, provided that no CloudWatch alarms are triggered during this window.
Which AWS CodeDeploy deployment configuration should the developer choose to satisfy these requirements?
A developer is managing an application deployed on a fleet of 10 Amazon EC2 instances using AWS CodeDeploy. The application must maintain a minimum of 8 healthy instances at all times during a deployment to handle peak traffic loads. To minimize the overall deployment duration as much as possible while strictly adhering to this capacity constraint, which CodeDeploy deployment configuration should the developer choose?
A developer is deploying a serverless application using AWS SAM. The template contains a custom IAM role and a Lambda function configured as follows:
yaml
Transform: AWS::Serverless-2016-10-31
Resources:
ProcessDataFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Role: !GetAtt CustomExecutionRole.Arn
CustomExecutionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- apigateway.amazonaws.com
Action:
- sts:AssumeRole
Policies:
- PolicyName: DynamoDBWritePolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- dynamodb:PutItem
Resource: '*'
During deployment, the CloudFormation stack creation fails with an error indicating that the Lambda function could not be created because AWS Lambda was unable to assume the configured role.
Which configuration change will resolve this deployment failure?
A developer is configuring AWS CodeDeploy to perform in-place deployments of a web application to a fleet of Amazon EC2 instances. The deployment group is configured, but the deployments fail immediately at the start with an error indicating that CodeDeploy does not have permission to access the target instances. The developer needs to ensure that the CodeDeploy service has the necessary permissions to perform the deployment.
Which configuration change will resolve this issue?
A development team is setting up a continuous delivery pipeline using AWS CodeDeploy for a microservice hosted on Amazon Elastic Container Service (Amazon ECS). The team wants to ensure that a validation test suite is executed immediately after the new container tasks are registered and test traffic is routed to them, but before any production traffic is shifted. Additionally, they want to execute a notification task once the production traffic has been completely transitioned.
Which actions must the developer take to achieve this deployment workflow? (Select TWO.)
Geçerli olan tümünü seçin
A developer has a production API hosted on Amazon API Gateway and wants to introduce a new API version. To minimize risk, the developer needs to route of the API traffic to the new version using the same endpoint, while the remaining continues to go to the current version. The developer wants to monitor the performance of the new version and must be able to immediately roll back all traffic to the current version if any anomalies are detected. Which deployment approach should the developer use to meet these requirements?
A developer is preparing to deploy updates to an AWS Lambda function using AWS CodeDeploy. The deployment must use a canary strategy (Canary10Percent5Minutes). The developer wants to execute a validation Lambda function to perform integration tests on the new version of the function before any production traffic is shifted to it. The deployment must also use a service role that grants CodeDeploy the necessary permissions to perform the deployment.
Which two actions should the developer take to configure this deployment? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring an AppSpec file in YAML format for an AWS CodeDeploy deployment targeting Amazon ECS. The developer needs to run a validation Lambda function immediately after the replacement task set is created, but before any traffic shifts to the new version. Which of the following configurations correctly implements this requirement?
A company runs a critical web application on AWS Elastic Beanstalk. The application must maintain of its capacity to handle peak traffic during updates. Additionally, if the new version fails post-deployment, the developer must be able to roll back to the previous version immediately with minimal service impact and without triggering a new application deployment.
Which two Elastic Beanstalk deployment strategies meet these requirements? (Select TWO).
Geçerli olan tümünü seçin