Tüm alıştırma soruları
1542 soru
A developer is designing a high-traffic, stateful web application that will be hosted on Amazon ECS. The application requires an external session store to maintain user session states across multiple container instances. The session store must meet the following requirements:
1. Provide sub-millisecond latency for both read and write operations.
2. Automatically delete session records that have been inactive for more than hours.
3. Ensure high availability and data persistence, even in the event of an Availability Zone (AZ) failure.
Which caching solution should the developer implement to meet these requirements?
A developer is configuring a cross-account deployment pipeline in AWS CodePipeline. The pipeline is located in Account A (the tooling account) and must deploy a containerized application to Amazon ECS in Account B (the target account). The pipeline's artifact store is an Amazon S3 bucket in Account A, which is encrypted with an AWS KMS Customer Managed Key (CMK) also located in Account A.
To successfully configure and run this pipeline, the developer needs to set up the necessary cross-account IAM roles, resource policies, and pipeline action settings.
What is the correct chronological sequence of steps required to successfully configure and execute this cross-account deployment?
Öğeleri doğru sıraya koymak için sürükleyin
A developer is configuring a CI/CD pipeline using AWS CodeDeploy for a serverless API hosted on AWS Lambda and integrated with Amazon API Gateway. The deployment process must adhere to the following requirements:
* Production traffic must be shifted in two stages: an initial of traffic is routed to the new version, followed by the remaining after a -minute evaluation period.
* Prior to routing any production traffic to the new version, a test function must run to verify that the new version can successfully write to an Amazon DynamoDB table.
* If the test function fails, or if a CloudWatch alarm for errors on the new version is triggered during the evaluation period, the deployment must immediately roll back.
Which TWO actions must the developer perform to configure the deployment?
Geçerli olan tümünü seçin
A developer is configuring a containerized application running in AWS Batch. The application requires access to two sensitive values: a database password for an Amazon Aurora PostgreSQL database that must be rotated every 30 days, and an API key for a partner service that is static and does not require rotation. The developer wants to minimize costs while maintaining high security.
Which actions should the developer take to configure the storage for these secrets? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring a build in AWS CodeBuild that must retrieve an encrypted database password from the Systems Manager Parameter Store. The developer places a custom build specification file named build-config.yml inside a subdirectory named config in the source repository. When the build is triggered, CodeBuild fails with an error indicating that the buildspec file cannot be found. Additionally, once the buildspec is resolved, the build needs to be able to fetch and decrypt the password from Parameter Store.
Which TWO actions should the developer take to resolve these issues and ensure the build completes successfully?
Geçerli olan tümünü seçin
A developer is configuring an AWS Lambda function in AWS account to retrieve data from an Amazon S3 bucket. The function is assigned an IAM role named `LambdaS3ReaderRole`. The developer has already attached a permissions policy to this role that allows `s3:GetObject` on the target bucket. However, when the Lambda function runs, it fails with an authorization error indicating that the AWS Lambda service is not authorized to assume the role.
The developer inspects the trust policy of `LambdaS3ReaderRole` and finds the following configuration:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-app-data-bucket/*"
}
]
}
Which modification to the trust policy is required to resolve this error?
An application developer is deploying an updated version of a microservice REST API using Amazon API Gateway. To minimize blast radius, the developer wants to test the update under production conditions by routing of incoming API traffic to the new deployment. The developer also needs to monitor separate Amazon CloudWatch metrics for the test traffic and the production traffic. Once the new deployment is verified, the developer must promote it to receive of the traffic with minimum administrative overhead and without managing additional API Gateway stages. Which deployment strategy should the developer implement to meet these requirements?
A developer is using AWS Serverless Application Model (SAM) to deploy a Lambda function that processes incoming orders via Amazon API Gateway. The developer wants to configure the deployment pipeline to perform a canary deployment, shifting 10% of the traffic to the new version for a 5-minute evaluation period before routing the remaining traffic.
The current `template.yaml` is defined below:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Deployment template for order processing service
Resources:
ProcessOrderFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Events:
PostOrder:
Type: Api
Properties:
Path: /orders
Method: post
Which of the following modifications must the developer make to the template to enable this gradual deployment strategy? (Select TWO.)
Geçerli olan tümünü seçin
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 uses AWS Serverless Application Model (SAM) to deploy a Lambda function that retrieves database credentials from AWS Secrets Manager. The secret is encrypted using a customer managed AWS KMS key. In the SAM template, the developer configures the function's `Policies` property with the `AWSSecretsManagerGetSecretValuePolicy` template, referencing the secret's ARN. The deployment completes successfully. However, when the function runs, it fails with an `AccessDeniedException` during the `GetSecretValue` API call. What is the reason for this runtime failure?
A developer is configuring the deployment policy for a high-traffic web application hosted on AWS Elastic Beanstalk. The application runs on multiple Amazon EC2 instances. The deployment policy must satisfy the following requirements:
1. The application must maintain of its instance capacity to handle incoming traffic at all times during the deployment.
2. If a deployment failure occurs, the rollback process must be rapid and must not perform any updates or modifications on the original, healthy instances.
Which two deployment strategies should the developer select to meet these requirements?
Geçerli olan tümünü seçin
A developer is deploying a database-backed web application using an AWS CloudFormation template. The application requires a database password that must be automatically rotated every 30 days, and a database port setting that is non-sensitive and static. Which of the following approaches represent best practices for managing these configurations? (Select TWO.)
Geçerli olan tümünü seçin
A developer is troubleshooting performance issues on a web application where user session state is stored in an Amazon DynamoDB table. During high-traffic events, users frequently experience session timeouts and slow page loads. The application logs show numerous `ProvisionedThroughputExceededException` errors during session read and write operations. The developer confirms that the table has a partition key of `SessionId` and a sort key of `LastActiveTime`.
Which TWO strategies should the developer implement to optimize session state management and resolve the throughput issues? (Select TWO.)
Geçerli olan tümünü seçin
A developer is troubleshooting an AWS Lambda function that processes customer orders. The function is configured to connect to an Amazon RDS PostgreSQL database in a private subnet of a custom VPC. The function also needs to call a third-party payment provider's public API endpoint over the internet. The developer configured the Lambda function to run in the public subnets of the VPC and associated it with a security group that allows all outbound traffic. During execution, the function successfully queries the database but times out when attempting to reach the payment provider's API.
Which of the following actions will resolve this connectivity issue?
A developer is configuring a backend application running on an Amazon EC2 instance to send application logs to Amazon CloudWatch Logs. The developer creates an IAM role named `EC2LoggingRole` with the following permissions policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:us-east-1:123456789012:log-group:AppServerLogs:*"
}
]
}
During testing, the application fails to write to CloudWatch Logs with authorization errors. Which two configuration steps must the developer perform to resolve this issue and securely grant permissions to the application? (Select TWO.)
Geçerli olan tümünü seçin
A developer is deploying a serverless application using AWS SAM. The template file (`template.yaml`) defines several `AWS::Serverless::Function` resources with the `CodeUri` property pointing to local directories (e.g., `./src`). The developer attempts to deploy the template directly using the command `aws cloudformation deploy --template-file template.yaml --stack-name my-stack`. The deployment fails with errors indicating that the template format is invalid because the `AWS::Serverless` resources are not recognized, and the local paths for `CodeUri` cannot be resolved. Which TWO actions must the developer take to resolve these issues and successfully deploy the application?
Geçerli olan tümünü seçin
A developer is troubleshooting an AWS Lambda function that occasionally fails. The developer wants to monitor these failures by creating a CloudWatch metric and alarm whenever the function times out. The Lambda function has a timeout configured for 15 seconds. The log stream contains the following log event:
`2026-07-14T12:00:00.000Z 8f029cfa-13e5-4b4f-8f81-540e7912a78f Task timed out after 15.02 seconds`
The developer configures a metric filter with the filter pattern `[timestamp, request_id, message = "Task timed out*"]` to increment a custom metric named `TimeoutCount`. However, the metric remains at 0 even after subsequent timeouts occur.
Which of the following actions should the developer take to resolve this issue and successfully track the timeouts? (Select TWO.)
Geçerli olan tümünü seçin
An application deployed on AWS Fargate publishes structured JSON logs to an Amazon CloudWatch Logs log group. Each log event contains fields such as `latency`, `statusCode`, `path`, and `userId`. A developer is tasked with creating a CloudWatch Logs Insights query to analyze application performance. The query must calculate the percentile of latency for all requests and count the number of server errors (where `statusCode` is or greater). The results must be grouped by the API `path` and aggregated into -minute intervals. Which CloudWatch Logs Insights query should the developer use to meet these requirements?
A developer is writing an AWS Lambda function that programmatically launches an Amazon EC2 instance using the AWS SDK. The EC2 instance requires an IAM role to access an Amazon S3 bucket. The developer has created the EC2 IAM role `EC2AccessS3Role` and an associated instance profile.
The Lambda function runs under an execution role with the following identity-based policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:RunInstances",
"ec2:DescribeInstances"
],
"Resource": "*"
}
]
}
When the Lambda function executes the code to launch the instance with the instance profile, the API call fails with a `Client.UnauthorizedOperation` error.
Which of the following actions will resolve this issue?
A developer is building a web application that uses Amazon Cognito User Pools for user authentication and Amazon API Gateway REST APIs for the backend. The developer needs to restrict access to a specific API resource so that only users who have a custom user attribute `custom:membership` set to `Gold` can access it. The client application must be able to call the API by passing the Cognito ID token in the `Authorization` header, without having to sign the requests using AWS Signature Version 4. Which solution should the developer implement to meet these requirements?