Tüm alıştırma soruları
1542 soru
A developer is configuring a deployment to shift traffic to a new version of an AWS Lambda function using AWS CodeDeploy. The deployment group is configured with an IAM service role. When the deployment is initiated, the developer encounters an error during the initial validation of the AppSpec file, and the deployment is aborted. The AppSpec file is configured as follows:
yaml
version: 0.0
Resources:
- MyLambdaFunction:
Type: AWS::Lambda::Function
Properties:
Name: "MyServiceFunction"
Alias: "live"
CurrentVersion: "1"
TargetVersion: "2"
Hooks:
- BeforeInstall: "ValidationFunction"
What is the reason for this deployment failure?
A developer has a Java-based microservice running on Amazon ECS on AWS Fargate. The microservice reads messages from an Amazon SQS queue, processes them, and writes results to an Amazon DynamoDB table. The developer needs to instrument the application with AWS X-Ray to trace the processing from the SQS queue to the DynamoDB calls. The X-Ray daemon is deployed as a sidecar container in the same task definition. Which two actions should the developer take to configure AWS X-Ray tracing and resolve the missing downstream segments?
Geçerli olan tümünü seçin
A developer is building a high-throughput microservice that must encrypt data payloads (each approximately in size) locally before storing them in an database. To implement envelope encryption efficiently and minimize network latency, the service needs to obtain a new symmetric key that contains both a plaintext version for immediate encryption and an encrypted version for storage alongside the data. Which AWS KMS API operation should the service call to receive both versions in a single request?
A developer is building a fitness tracking web application that retrieves user statistics by calling a REST API. The API is hosted on Amazon API Gateway and uses a Lambda Proxy integration. During testing, the web browser console displays a CORS error indicating that the 'Access-Control-Allow-Origin' header is missing. The developer has already enabled CORS on the API Gateway resources using the AWS Management Console, but the error remains. Which of the following is the correct action to resolve this issue?
A developer is designing a web application deployed on Amazon ECS. The application requires an external session state store to manage user shopping carts. The session data must be retrieved with sub-millisecond response times, support nested JSON structures, and remain highly available even in the event of an infrastructure failure. Which architecture should the developer implement to meet these requirements?
A developer is containerizing a Java application that uses the AWS SDK for Java v2 to read objects from an Amazon S3 bucket. Access to the bucket requires assuming an IAM role. The developer has configured the local development host's `~/.aws/config` file with a profile named `dev-role` that specifies a `role_arn` and a `source_profile`. Running the AWS CLI command `aws s3 ls --profile dev-role` on the host machine successfully lists the bucket contents. However, when the Java application is run inside a local Docker container using the environment variable `AWS_PROFILE=dev-role`, the application fails with a `SdkClientException` indicating that credentials cannot be loaded.
Which two actions should the developer take to resolve this issue? (Choose two.)
Geçerli olan tümünü seçin
An IoT telemetry ingestion application uses an AWS Lambda function to process device log files uploaded to an Amazon S3 bucket. The function parses the logs and sends alerts to an external monitoring API on the public internet. To securely query an Amazon ElastiCache Redis cluster, the Lambda function is configured to run inside private subnets of a VPC. The developer notices that the function successfully queries Redis but fails to send alerts to the external monitoring API, resulting in connection timeouts. Furthermore, under peak load, some executions are terminated prematurely before completion.
Which two actions should the developer take to resolve these issues? (Select TWO.)
Geçerli olan tümünü seçin
A developer is preparing to deploy a containerized backend application to Amazon ECS using the AWS Fargate launch type. The application must process incoming requests and write transaction records directly to an Amazon DynamoDB table. The container image is stored in a private Amazon Elastic Container Registry (Amazon ECR) repository. Additionally, the task definition is configured to use the awslogs log driver to stream container logs to Amazon CloudWatch Logs. Which configuration steps must the developer perform to ensure that the task has the minimum required permissions to initialize and run successfully? (Select TWO.)
Geçerli olan tümünü seçin
A developer is troubleshooting a local C# application that uses the AWS SDK for .NET to publish messages to an Amazon SNS topic. During local testing, the application publishes messages to the production AWS account instead of the development AWS account.
The developer has set the AWS_PROFILE environment variable to development-profile in the active terminal session. The local ~/.aws/credentials file is configured as follows:
ini
[default]
aws_access_key_id = AKIA_PROD_KEY
aws_secret_access_key = PROD_SECRET
[development-profile]
aws_access_key_id = AKIA_DEV_KEY
aws_secret_access_key = DEV_SECRET
Upon investigation, the developer discovers that the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are also set to the production keys within the same terminal session.
Why is the application using the production credentials, and how should the developer resolve this issue?
A developer is troubleshooting a serverless application where an AWS Lambda function is triggered by an Amazon SQS queue. The Lambda function processes incoming messages, invokes a downstream third-party REST API using the Python `requests` library, and records metrics. During testing under high load, the developer notices two main issues:
1. Downstream third-party REST API calls do not appear as subsegments in the AWS X-Ray service map.
2. Many messages are being processed multiple times by the Lambda function, resulting in duplicate API calls and redundant traces.
Which two actions must the developer take to resolve these issues?
Geçerli olan tümünü seçin
A developer is building a single-page web application (SPA) that will allow users to authenticate using Amazon Cognito User Pools and access backend services through Amazon API Gateway. Since the SPA runs entirely in the user's browser, the client credentials cannot be kept secure. The developer wants to implement a secure authentication flow using the authorization code grant with Proof Key for Code Exchange (PKCE) and validate access at the API Gateway layer. Which TWO steps should the developer take to implement this architecture?
Geçerli olan tümünü seçin
A developer is implementing a mobile application that uses an Amazon Cognito identity pool to grant users temporary AWS credentials for uploading files to an Amazon S3 bucket. The developer has created an IAM role for authenticated users, but when the mobile application attempts to exchange the Cognito identity token for temporary credentials, the request fails with an access denied error. The developer reviews the trust policy currently attached to the IAM role:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "cognito-identity.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"cognito-identity.amazonaws.com:aud": "us-east-1:12345678-1234-1234-1234-1234567890ab"
},
"ForAnyValue:StringLike": {
"cognito-identity.amazonaws.com:amr": "authenticated"
}
}
}
]
}
Which modification to the trust policy will resolve this issue?
A developer has enabled active tracing on an AWS Lambda function that uses the AWS SDK for Python (boto3) to write data to an Amazon DynamoDB table. Although the Lambda function's execution is traced, the downstream calls to DynamoDB are missing from the AWS X-Ray service map. Which action must the developer take to include the DynamoDB calls in the X-Ray trace?
A client-side web application hosted on `https://portal.example.com` attempts to send a `DELETE` request to a resource on a REST API hosted on Amazon API Gateway. The API utilizes a Lambda Proxy Integration. The browser console displays an error stating that the request has been blocked by CORS policy because no 'Access-Control-Allow-Origin' header is present on the requested resource.
Which TWO actions must the developer take to resolve this issue?
Geçerli olan tümünü seçin
A developer is creating an IAM role that will be used by an AWS Lambda function to access other AWS resources. The developer needs to ensure that the AWS Lambda service itself is authorized to assume this role. Which type of policy must the developer configure to define which service principal can assume the role?
A developer has deployed a Python-based AWS Lambda function that synchronizes real-time multiplayer game leaderboards with an external third-party API and retrieves player metadata from an Amazon ElastiCache (Memcached) cluster located in a private VPC subnet. The Lambda function is configured to run inside the VPC and is associated with the private subnet containing the ElastiCache cluster. During load testing, the developer observes two symptoms: 1. The function is able to connect to the ElastiCache cluster, but all requests to the external third-party leaderboard API fail with a connection timeout error. 2. Under sustained high concurrent load, subsequent invocations of the Lambda function occasionally process stale player metadata that was cached during earlier invocations of the same execution context. 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 continuous delivery pipeline in AWS CodePipeline. The pipeline builds a database migration package in AWS CodeBuild and then runs a post-migration check using an AWS Lambda function. The CodeBuild project must retrieve a database password stored as a SecureString in AWS Systems Manager Parameter Store. The Lambda function must report its execution status back to CodePipeline.
Arrange the execution steps in the correct chronological order from start to finish to ensure the pipeline runs successfully without permission or credential failures.
Öğeleri doğru sıraya koymak için sürükleyin
A developer is configuring a containerized application running on Amazon ECS that needs to access two settings: a public API endpoint URL (non-sensitive configuration) and a database password for an Amazon RDS database. The database password must be rotated automatically every 30 days. To ensure the design is both secure and cost-effective, which configuration should the developer implement?
A developer is building a sensitive medical telemetry ingestion application. The application receives health records (each approximately in size) that must be encrypted client-side using envelope encryption before being stored in Amazon DynamoDB. The developer needs to implement this workflow using the AWS SDK and a customer managed key in AWS KMS.
Which two steps must the developer perform to encrypt and store each health record? (Select TWO.)
Geçerli olan tümünü seçin
A developer manages a CI/CD pipeline in AWS CodePipeline. The pipeline has an AWS CodeBuild project that packages an application and an AWS CloudFormation deploy stage that performs a stack update. During a execution, the pipeline fails with two errors:
1. The CodeBuild project fails during the pre-build phase with the error: 'An error occurred (AccessDenied) when calling the AssumeRole operation: Role: arn:aws:iam::111122223333:role/CrossAccountDeployRole is not authorized to perform: sts:AssumeRole'.
2. The CloudFormation deployment fails immediately because the target stack is stuck in the UPDATE_ROLLBACK_FAILED state due to a resource that failed to clean up during a previous rollback.
Which of the following actions should the developer take to resolve these deployment pipeline failures? (Select TWO.)
Geçerli olan tümünü seçin