All practice questions
1542 questions
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must execute a validation test against the newly deployed tasks (the green task set) before any production traffic is shifted. If the validation test fails, the deployment must automatically roll back. The developer is defining the AppSpec file in YAML format and configuring the IAM permissions. Which of the following configurations are required to meet these requirements? (Select TWO.)
Select all that apply
A team is building a serverless document collaboration portal where users edit documents concurrently. The portal needs to manage transient user presence indicators (e.g., 'User X is online') that expire automatically after 5 minutes of user inactivity. The developer wants to minimize storage costs and avoid running unnecessary compute resources to clean up expired session records. Which approach should the developer take to meet these requirements?
A developer is implementing a security strategy for an application. The application needs to retrieve a database password and also encrypt application audit logs (average size ) locally before archiving them to Amazon S3. The database password requires automatic rotation. The audit logs must be encrypted client-side using a customer managed key (KMS key) in AWS KMS. Which combination of services and KMS operations should the developer use to meet these requirements?
A developer is implementing security for a new Amazon API Gateway REST API. The API has two specific endpoints:
1. `POST /orders`: Used by a mobile application where users authenticate via Amazon Cognito User Pools.
2. `GET /dashboard/metrics`: Used by an administrative reporting service running on Amazon ECS tasks.
Which TWO actions should the developer take to configure authorization for these endpoints with the least operational overhead?
Select all that apply
A developer is configuring a database connection for a new application. The database credentials must be rotated automatically every 15 days, and the developer wants to use native integration with Amazon RDS to rotate them without writing custom rotation code. Which AWS service should the developer use to store the credentials?
A developer deployed an infrastructure stack using AWS CloudFormation. Later, a system administrator manually modified the port settings of an Amazon EC2 Security Group directly in the Amazon VPC Console to troubleshoot a connection issue. The developer needs to identify which specific configurations in the deployed stack no longer match the CloudFormation template definition. Which CloudFormation feature should the developer use to achieve this?
A developer is implementing a session state store for a web application to allow the application instances to scale horizontally. The application needs to retrieve a user's session record using a unique Session ID. Which approach provides the most efficient and cost-effective design for retrieving these session states?
A developer is designing a security architecture for a corporate mobile application that accesses backend microservices through an Amazon API Gateway REST API. The application requirements specify that all API requests must be secured using AWS Signature Version 4 (SigV4) signing, and users must obtain temporary AWS IAM credentials after authenticating with a third-party Identity Provider (IdP). Which configuration should the developer implement to authorize these requests at the API Gateway level with the least administrative effort?
A developer is packaging a Python application for deployment to AWS Elastic Beanstalk. The application requires a custom Unix user to be created on the host Amazon EC2 instances during environment provisioning. To automate this, the developer creates a configuration file named `01_user.config` containing the user definition. However, after deploying the application source bundle to the Elastic Beanstalk environment, the user is not created and the configuration is ignored.
The layout of the deployed application zip file is as follows:
/
├── application.py
├── requirements.txt
└── config/
└── .ebextensions/
└── 01_user.config
Which action must the developer take to ensure Elastic Beanstalk applies the configuration?
A developer is configuring a blue/green deployment for an Amazon Elastic Container Service (Amazon ECS) service using AWS CodeDeploy and an Application Load Balancer (ALB). The service runs tasks under normal operation. The developer must run automated integration tests against the new version of the application (the replacement task set) in the production environment before routing any live production traffic to it.
Which configuration should the developer implement to meet these requirements?
A developer is writing an AWS Lambda function that queries a relational database. To improve the function's performance, the developer wants to reuse the database connection across multiple invocations. How should the developer initialize the database connection client to achieve this?
A developer needs to expose a public HTTP endpoint that allows mobile clients to send telemetry data directly to an Amazon SQS queue. To minimize latency, cost, and maintenance, the developer wants to avoid using custom compute resources such as AWS Lambda functions for processing the requests. Which integration type and configuration in Amazon API Gateway should the developer choose to meet these requirements?
A developer is designing a REST API using Amazon API Gateway that integrates directly with an Amazon DynamoDB table using an AWS service integration. The API needs to expose a POST method to insert customer records. To optimize throughput and performance, the developer wants to ensure that:
1. Incoming payloads are validated against a specific JSON schema, and requests with invalid structures are rejected with a Bad Request response before the integration is invoked.
2. The DynamoDB response, which contains the raw database attributes, is transformed into a simplified, customer-facing JSON format before being returned to the client.
Which two configuration steps must the developer perform in API Gateway to satisfy these requirements? (Select TWO.)
Select all that apply
A developer is configuring an Amazon API Gateway REST API with a Lambda proxy integration. The developer needs to access the query string parameters sent by the client within the backend AWS Lambda function. How should the developer retrieve these parameters from the incoming request?
A developer is packaging a web application to be deployed on AWS Elastic Beanstalk. The application requires custom environment configurations and package installations during deployment. To achieve this, which directory at the root of the application source bundle must contain the custom configuration files?
A developer is building a mobile application that uses Amazon Cognito for user authentication. The backend is exposed through an Amazon API Gateway REST API. The developer needs to secure the API so that only authenticated users can access the endpoints. The authentication mechanism must validate JSON Web Tokens (JWTs) issued by Cognito, require no custom authorizer code, and introduce minimal latency. Which API Gateway authorization method should the developer implement?
A developer is building a mobile application that requires users to sign in using their email addresses or social identity providers such as Google or Facebook. Once signed in, the application needs to maintain a user directory and manage user profiles. Which Amazon Cognito feature should the developer implement to meet these authentication and directory requirements?
A developer is building a mobile application that requires users to authenticate before they can upload files directly to a private Amazon S3 bucket. The application must support user registration and sign-in, and provide temporary, limited-privilege AWS credentials to authenticated users for S3 uploads. Which combination of Amazon Cognito features should the developer use to meet these requirements with the least operational overhead?
A developer needs to configure a deployment strategy for an application running on AWS Elastic Beanstalk. The application must maintain of its capacity to handle traffic during the deployment process. Due to budget constraints, the developer must minimize the cost of temporary resources launched during the deployment, ruling out a complete duplicate environment or a double-capacity deployment. Which deployment policy should the developer configure?
An application running on Amazon ECS (Fargate) is configured to use AWS CodeDeploy for blue/green deployments. The application resides behind an Application Load Balancer (ALB). The developer needs to configure the deployment pipeline to meet the following requirements:
* The deployment must begin by routing exactly of production traffic to the new task set (replacement task set), and then route the remaining of traffic after exactly minutes if the deployment remains stable.
* Before any production traffic is routed to the new task set, an automated test suite must run via an AWS Lambda function to validate the deployment's health.
* The deployment must automatically roll back if a specified Amazon CloudWatch alarm is triggered during the -minute baking period.
Which TWO configurations must the developer implement to satisfy these requirements?
Select all that apply