All practice questions
1542 questions
A developer is writing a Python application to secure sensitive application configuration files locally before uploading them to Amazon S3. The compliance policy requires the developer to use client-side envelope encryption with an AWS Key Management Service (AWS KMS) customer managed key. Which two actions must the developer perform to implement this encryption workflow? (Select TWO.)
Select all that apply
A development team needs to store a collection of third-party API keys that will be accessed by several serverless applications. These keys must be encrypted at rest, but they do not require automatic rotation or cross-account access. The team wants a solution that minimizes storage and retrieval costs.
Which AWS service or feature should the developer select to store these API keys?
A developer is configuring authentication and authorization for a serverless web application. The application consists of a Single-Page Application (SPA) frontend and a REST API hosted on Amazon API Gateway. The developer wants to use Amazon Cognito to authenticate users directly through a sign-up and sign-in flow. Additionally, authenticated users in the "PremiumUsers" Cognito group must be allowed to directly download private reports from an Amazon S3 bucket, while standard authenticated users should only access the API. Which two configuration steps should the developer perform to meet these requirements? (Select TWO.)
Select all that apply
A developer is designing a microservice application deployed on Amazon Elastic Kubernetes Service (Amazon EKS). The microservice requires access to two types of data: database credentials for an Amazon RDS for PostgreSQL instance that must be automatically rotated every 30 days, and non-sensitive API endpoints for external integration that vary by environment. Which combination of actions should the developer take to store and manage this data securely and cost-effectively? (Select TWO.)
Select all that apply
A developer creates a customer managed key in AWS KMS to encrypt sensitive configuration payloads. The developer then attaches an IAM policy to an IAM role associated with an Amazon EC2 instance. The IAM policy grants permission for the `kms:Decrypt` action on the key's Amazon Resource Name (ARN). However, when the application running on the EC2 instance attempts to call the Decrypt API, it receives an `AccessDeniedException`. Which of the following is the most likely cause of this authorization failure?
A developer needs to update an Amazon ECS service that runs behind an Application Load Balancer. To prevent any service degradation, the service must maintain 100% of its desired task capacity at all times during the update. Additionally, the service is allowed to provision up to double its desired capacity temporarily to perform the rolling update. Which configuration of deployment parameters should the developer apply to the ECS service?
A developer is designing an AWS CloudFormation template to deploy an application that connects to an Amazon RDS database. The developer needs to store the database credentials securely and prevent the database from being accidentally deleted if the CloudFormation stack is deleted or updated. Which combination of actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
An application team wants to automate the deployment of an AWS Serverless Application Model (SAM) project. The workflow requires compiling code, performing security tests, getting manual sign-off from a release manager, and updating a staging stack. The team sets up AWS CodePipeline to coordinate these actions. Arrange the sequence of operations in the correct order that occurs during a single execution of this pipeline, from the detection of a commit to the completion of the stack deployment.
Drag items to arrange them in the correct order
A web application is deployed as a Docker container on Amazon ECS using the AWS Fargate launch type. The application's Go code utilizes the AWS SDK to retrieve configuration files from an Amazon S3 bucket. Which IAM role must be configured with Amazon S3 read permissions to allow the application code to access the bucket?
A developer is building a high-throughput mobile gaming backend deployed on Amazon Elastic Kubernetes Service (Amazon EKS). The application needs to manage real-time user session state and player matchmaking lobby tokens. Currently, session state is written to an Amazon DynamoDB table. During peak traffic periods, the application experiences database write throttling (`ProvisionedThroughputExceededException`), and players frequently lose connection and matchmaking state when EKS pods scale out or restart. The developer needs to implement a highly available caching and session management strategy that resolves the throttling and avoids data loss when EKS pods are rescheduled.
Which of the following actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
An enterprise retail application exposes catalog and inventory management endpoints via an Amazon API Gateway REST API. The system has two distinct integration requirements:
1. A customer-facing portal where users authenticate using external Google Workspace accounts.
2. An automated background synchronization service running on Amazon ECS Fargate that updates inventory levels.
The developer needs to secure both sets of endpoints using native AWS mechanisms to minimize custom code and maintenance.
Which TWO configuration steps should the developer perform to secure these endpoints?
Select all that apply
An application developer is implementing a Lambda function that validates user sessions. The function must query a Redis cluster running in the private subnets of a custom VPC. At the same time, the function needs to send validation logs to an external analytics provider's HTTPS endpoint on the public internet. How should the developer configure the VPC network paths to allow the Lambda function to access both the private Redis cluster and the public HTTPS endpoint?
A developer is designing a security solution for a document archiving system. The application must encrypt PDF documents, each averaging in size, before uploading them to an Amazon S3 bucket. A Customer Managed Key (CMK) in AWS KMS will be used to protect the data. A separate reader application running on Amazon ECS must download these documents from S3 and decrypt them. Which TWO actions must the developer perform to implement this workflow using the AWS SDK and AWS KMS under the principle of least privilege?
Select all that apply
A developer needs to encrypt a database password of size directly using an AWS Key Management Service (AWS KMS) key. Which AWS KMS API operation should the developer call to encrypt this payload?
A developer is deploying a Go application to AWS Elastic Beanstalk running on Amazon Linux 2023. The deployment must satisfy two requirements: set custom environment properties that the application reads at runtime, and run a bash script to install a monitoring agent after the application files are extracted but before the application process is started. Which two steps should the developer take to configure the application source bundle? (Select TWO.)
Select all that apply
To support file uploads in a new collaborative web portal, users must be able to sign up, sign in, and directly upload files to a private Amazon S3 bucket. The application needs to authenticate users and then obtain temporary AWS credentials for the uploads. Which TWO Amazon Cognito components should the developer implement to meet these requirements?
Select all that apply
A developer is configuring a continuous delivery pipeline in AWS CodePipeline that deploys a serverless application using AWS CloudFormation. The pipeline needs to pass a database password to the CloudFormation deploy stage. The database password must be rotated automatically every 30 days to comply with company security policies. Additionally, the CloudFormation action in CodePipeline must assume a specific deployment IAM role in the production account to create and update resources. Which configuration should the developer implement to meet these requirements securely and with the least operational overhead?
A developer is deploying a containerized application to Amazon ECS using the AWS Fargate launch type. The application requires a database connection string that is stored as a secure string in Systems Manager Parameter Store. The developer wants the connection string to be automatically injected as a container environment variable at startup without modifying the application code to retrieve it. Which configuration will meet these requirements?
A developer is configuring a multi-stage release pipeline in AWS CodePipeline. The first stage contains a Source action that retrieves code from an AWS CodeCommit repository, and the developer has assigned the namespace `SourceVariables` to this action. In a downstream Deploy stage, the developer wants to reference the specific commit ID that triggered the pipeline execution to dynamic-tag the deployment resources. Which of the following is the correct method to pass this commit ID variable from the Source stage to the Deploy stage?
An operations team writes a CloudFormation template containing an AWS::Serverless::Function resource. When they attempt to deploy this template using the AWS CLI, CloudFormation returns an error stating that the resource type is invalid or unsupported. What is the root cause of this deployment failure?