Tüm alıştırma soruları
1542 soru
A developer is writing an on-premises Python application that uses the AWS SDK (Boto3) to retrieve objects from an Amazon S3 bucket located in a separate, secondary AWS account. The developer has configured the on-premises server with an IAM user's long-term access keys stored in the default profile of the local credentials file. The security team has created an IAM role in the secondary account named CrossAccountS3ReadRole that has the required permission to access the bucket. How should the developer configure the AWS SDK to retrieve the S3 objects using the permissions of the secondary account's IAM role?
A developer is implementing a custom backend service hosted on Amazon ECS that processes requests from a mobile application. The mobile application authenticates users via an Amazon Cognito User Pool and includes the obtained JSON Web Token (JWT) in the Authorization header of each API request. To minimize latency, the developer wants the backend service to validate these tokens locally rather than making network calls to Amazon Cognito for every incoming request.
Which process should the developer implement to validate the incoming JWTs?
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 building a serverless web application where users sign in using their email and password. Once authenticated, the application must allow users to upload files to a private Amazon S3 bucket and make requests to a backend API hosted on Amazon API Gateway. The developer wants to leverage Amazon Cognito for authentication and authorization. Which TWO configuration steps should the developer perform to meet these requirements with the least operational overhead?
Geçerli olan tümünü seçin
A developer is updating a critical serverless API hosted on AWS Lambda using AWS CodeDeploy. The deployment must meet the following requirements:
- Direct only of the production traffic to the new Lambda function version initially.
- Route all remaining traffic to the new version after a -minute monitoring window.
- Roll back the deployment automatically if any error metrics exceed the normal threshold.
Which of the following configuration options should the developer select to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
An organization has an AWS Lambda function running in Account A (). The Lambda function needs to be triggered by an Amazon SQS queue located in Account B (). A developer is configuring a cross-account event source mapping in Account A to process messages from the queue. During setup, the event source mapping enters an `ERR` status with a permission-related error.
Which combination of actions will resolve this authorization failure? (Choose two.)
Geçerli olan tümünü seçin
A developer is migrating a legacy desktop application to a modern cloud-native web application. The application must support federated single sign-on (SSO) using a corporate SAML identity provider. Once users log in, the web client needs to access a private Amazon S3 bucket to retrieve user-specific reports and call a secured Amazon API Gateway HTTP API. Which TWO configurations must the developer implement to meet these requirements with the least operational overhead?
Geçerli olan tümünü seçin
A developer is deploying a containerized microservice to Amazon ECS using the AWS Fargate launch type. The application code inside the container must read messages from an Amazon SQS queue, decrypt the message payloads using an AWS KMS key, and write results to an Amazon DynamoDB table. Additionally, the task definition specifies that the database password, stored as a secure string in Systems Manager Parameter Store, should be injected as an environment variable at startup. The container image is pulled from a private Amazon ECR repository.
Which of the following configurations are required to establish the correct IAM permissions for this deployment? (Select TWO.)
Geçerli olan tümünü seçin
A developer is optimizing a high-traffic web application that stores user session data in an Amazon DynamoDB table. The application frequently retrieves session data by searching for the user's email address, which is not the table's primary key. During peak traffic hours, the application logs show numerous ProvisionedThroughputExceededException errors and users experience high latency. Which TWO actions should the developer take to resolve these issues and improve performance? (Select TWO.)
Geçerli olan tümünü seçin
A Go-based web application is running on Amazon EC2 instances inside a private subnet. The application handles incoming user requests and calls a downstream microservice on another EC2 instance via HTTP. The developer has installed the AWS X-Ray daemon on all EC2 instances and wants to implement distributed tracing to monitor end-to-end performance. However, currently, no traces are appearing in the AWS X-Ray console, and the downstream HTTP calls are not being correlated with the upstream web requests.
Which two actions must the developer take to resolve these issues and ensure proper end-to-end tracing?
Geçerli olan tümünü seçin
A gaming company is developing a new multiplayer dashboard application. The application must authenticate users against an existing, on-premises legacy database containing user credentials without migrating user data to the cloud. Once authenticated, the client application must be able to query leaderboard data directly from an Amazon DynamoDB table and publish telemetry events directly to an Amazon Kinesis Data Stream. Which TWO actions should the developer take to meet these requirements?
Geçerli olan tümünü seçin
A developer is designing a serverless backend where a single-page application (SPA) needs to access a private REST API hosted on Amazon API Gateway. The developer wants to authenticate users using an Amazon Cognito User Pool and grant them access to the API Gateway endpoints. The client application needs to acquire a JSON Web Token (JWT) after user login and pass it to API Gateway for validation. Which configuration should the developer implement in API Gateway to authorize these requests with the least administrative effort and cost?
An organization uses AWS CodePipeline to automate their application deployment. During a recent deployment, an AWS CloudFormation action updating a nested stack fails, triggering a rollback. The parent stack fails to roll back completely and becomes stuck in the `UPDATE_ROLLBACK_FAILED` state because a Lambda function backing a Custom Resource was manually deleted prior to the deployment. Which action should the developer take to resolve this issue and return the stack to a stable state?
A developer is updating an AWS CloudFormation stack that manages a production application. The update fails during the creation of a new database instance due to a parameter conflict. CloudFormation automatically initiates a rollback, but the rollback fails because an Amazon S3 bucket, which was manually modified out-of-band, now has a bucket policy that denies the CloudFormation service role the permissions required to delete it. The stack is now in the `UPDATE_ROLLBACK_FAILED` state. The developer updates the S3 bucket policy to allow the CloudFormation service role to delete the bucket.
Which action must the developer perform next to return the stack to a stable state so that future updates can be applied?
A developer is configuring an AWS CodeDeploy deployment group for a critical serverless application. To minimize the blast radius of potential failures, the developer needs a strategy that shifts traffic to the new AWS Lambda function version gradually over time. If any CloudWatch alarms are triggered during the deployment, CodeDeploy must immediately roll back all traffic to the original version.
Which of the following CodeDeploy deployment configuration types will satisfy these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is configuring an Amazon ECS task definition to deploy a containerized application on AWS Fargate. The application is configured to stream logs to Amazon CloudWatch using the `awslogs` log driver, and it retrieves a database password from AWS Secrets Manager by referencing the secret in the container definition's environment variables. Inside the container, the application code uses the AWS SDK to write processed reports to an Amazon S3 bucket.
Which of the following IAM configurations must the developer apply to allow the task to run and successfully perform all of these operations?
A developer is implementing a serverless application where an AWS Lambda function in Account A () needs to access a DynamoDB table in Account B (). The developer creates an IAM role named `CrossAccountDynamoDBRole` in Account B that has the required permissions to access the DynamoDB table. The Lambda function is configured with an execution role named `arn:aws:iam::111122223333:role/LambdaExecutionRole` and runs code that calls the `AssumeRole` API of AWS Security Token Service (STS) to assume `CrossAccountDynamoDBRole`.
However, when the Lambda function runs, the `AssumeRole` call fails with an `AccessDenied` error. The developer reviews the trust policy of `CrossAccountDynamoDBRole` in Account B:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Which modification to the trust policy of `CrossAccountDynamoDBRole` in Account B will resolve this error?
"Condition": {
"ArnEquals": {
"aws:SourceArn": "arn:aws:lambda:us-east-1:111122223333:function:my-function"
}
}
"Principal": {
"AWS": "arn:aws:iam::111122223333:role/LambdaExecutionRole"
}
"Principal": {
"AWS": "arn:aws:iam::111122223333:root"
},
"Action": "sts:AssumeRoleWithWebIdentity"
"Principal": {
"Service": "dynamodb.amazonaws.com"
}
A developer is deploying a containerized application to Amazon ECS using the AWS Fargate launch type. The application is packaged in a Docker image stored in a private Docker Hub repository. During task initialization, the Amazon ECS agent must pull this image using credentials stored in AWS Secrets Manager. Once running, the application code must publish messages to an Amazon SQS queue. Which combination of IAM configurations should the developer implement to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is designing a high-traffic web application hosted on Amazon ECS. The application requires a caching layer to store session state data for logged-in users. The session states must be replicated across multiple Availability Zones to ensure high availability, and the cache must support automatic failover. Additionally, the configuration credentials for the cache cluster must be retrieved securely from a service that supports automatic credential rotation. Which architecture should the developer implement to meet these requirements?
A serverless microservice uses an AWS Lambda function to retrieve user configuration profiles from an Amazon ElastiCache cluster located in a private VPC subnet, and then sends SMS notifications by calling a third-party gateway's HTTP API over the internet. The Lambda function is configured to run in the same VPC and private subnets as the ElastiCache cluster. During execution, the Lambda function successfully connects to ElastiCache, but the HTTP requests to the third-party gateway consistently fail with connection timeout errors. Which two configuration actions should the developer take to resolve this network connectivity issue? (Select TWO.)
Geçerli olan tümünü seçin