All practice questions
1542 questions
A company is developing a mobile application. The mobile app needs to allow users to sign up and sign in using their email addresses, and it also needs to store custom user profile attributes in a managed user directory. Which Amazon Cognito component should the developer use to implement this user directory and handle user authentication?
A developer is deploying an updated version of a REST API to Amazon API Gateway. The developer must test the update by routing of production traffic to the new version. The remaining of traffic must continue to use the current version. The developer also needs the ability to instantly roll back the update if errors occur, or fully promote the update to production if it is successful. Which TWO configurations or actions must the developer perform to meet these requirements? (Select TWO.)
Select all that apply
A team is migrating an on-premises desktop application to a cloud-native model. The application requires users to authenticate against a central directory and then obtain temporary, limited-privilege AWS credentials to retrieve configuration objects directly from an Amazon DynamoDB table. Which configuration steps must the team implement to meet these requirements? (Select TWO.)
Select all that apply
A developer is configuring an AWS Lambda function that runs inside a private subnet of a VPC. The Lambda function needs to securely download external libraries from a public repository on the internet and retrieve configuration parameters from AWS Systems Manager Parameter Store. Which of the following VPC configurations are required to meet these requirements? (Select TWO.)
Select all that apply
A company is deploying an application on Amazon EC2 instances located in a private subnet of a custom VPC. The application must securely retrieve database credentials from AWS Secrets Manager and also connect to a public API endpoint of an external partner over the internet.
Which of the following network configurations must the developer implement to meet these requirements while minimizing data transfer over the public internet? (Select TWO.)
Select all that apply
A developer is creating a mobile game. The application needs to authenticate users using a custom username and password. Once authenticated, the game client must directly publish player analytics events to an Amazon Pinpoint project. Which of the following Amazon Cognito components should the developer configure to meet these requirements? (Select TWO.)
Select all that apply
A developer is building an application that needs to encrypt files locally before uploading them to Amazon S3. Each file is approximately in size. The encryption process must use client-side envelope encryption with a Customer Managed Key (CMK) stored in AWS KMS, minimizing network overhead and API requests. Which two actions must the developer perform to complete this client-side encryption process?
Select all that apply
An application deployed on AWS Lambda in Account A () needs to retrieve and decrypt S3 objects from an Amazon S3 bucket located in Account B (). The S3 bucket is configured with Server-Side Encryption (SSE-KMS) using a KMS customer managed key.
Which two AWS KMS configuration steps are required to enable the Lambda function to decrypt the objects? (Select TWO.)
Select all that apply
A developer is using AWS SAM to deploy a serverless application consisting of an API Gateway endpoint that triggers a Lambda function, which writes data to a DynamoDB table. The template is defined as follows:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
ProcessTransactionFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Events:
PostTransaction:
Type: Api
Properties:
Path: /transaction
Method: post
Role: !GetAtt LambdaExecutionRole.Arn
LambdaExecutionRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- apigateway.amazonaws.com
Action:
- 'sts:AssumeRole'
Policies:
- PolicyName: DynamoDBWritePolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- 'dynamodb:PutItem'
Resource: !GetAtt TransactionTable.Arn
During the deployment process using the AWS SAM CLI, the deployment fails with a parser error indicating that the resource type `AWS::Serverless::Function` is invalid. Additionally, if the parsing error is resolved, the Lambda function will fail to execute due to execution role issues.
Which two modifications must the developer make to ensure the template parses successfully and the Lambda function can be successfully assumed and executed by the AWS Lambda service?
Select all that apply
A developer is deploying a backend microservice on an AWS Lambda function that is configured to run inside the private subnets of a custom VPC. The function must retrieve database credentials from AWS Secrets Manager and query an Amazon DynamoDB table. Due to strict compliance guidelines, the VPC has no Internet Gateway or NAT Gateway attached, and all traffic must remain within the AWS network.
Which two configuration steps should the developer perform to establish private connectivity to these services while maintaining the principle of least privilege? (Select TWO.)
Select all that apply
A development team is deploying a worker application to an AWS Elastic Beanstalk Worker Tier environment. The application processes high-compute tasks received from an Amazon SQS queue, with each task taking approximately minutes ( seconds) to complete. During testing, the team notices that tasks are frequently reprocessed by different worker instances before the original instance completes them, and the worker daemon logs indicate timeout failures before the application returns an HTTP status code. Which two configuration steps must the developer perform to resolve these issues and support this long-running processing requirement?
Select all that apply
A developer is building a REST API in Amazon API Gateway. The API needs to validate JSON Web Tokens (JWTs) sent by clients who have authenticated using an Amazon Cognito User Pool. The developer wants to implement this security check with the least configuration effort and no additional custom code. Which authorization method is the most appropriate to meet these requirements?
A developer is building a web application that allows users to sign in using Amazon Cognito. The backend REST API is hosted on Amazon API Gateway. The developer needs to secure the API so that only authenticated users can access the resources. The solution must minimize code maintenance, overhead, and latency. Which configuration should the developer implement to meet these requirements?
A developer is writing a script to encrypt a small configuration string of size before storing it in a database. The developer wants to use AWS KMS to perform the encryption directly on the AWS side, avoiding the complexity of local envelope encryption. Which AWS KMS API operation should the developer call to encrypt this data?
A telemetry data analysis company is building a REST API using Amazon API Gateway. The API will be consumed by two distinct groups:
1. Internal microservices running on Amazon EC2 instances that need to invoke the API securely using their IAM roles.
2. External customer applications that authenticate against an external identity provider and send a custom JSON Web Token (JWT) containing dynamic billing tier claims.
The developer needs to configure the security and authorization for this API in a way that minimizes custom code for standard authentication, supports fine-grained billing-tier checks, and ensures minimum latency.
Which two configuration steps should the developer perform to meet these requirements?
Select all that apply
A developer is configuring a continuous delivery pipeline in AWS CodePipeline. During the pipeline execution, the pipeline fails at the transition to a deployment stage with an access denied error indicating that the pipeline cannot assume the service role. Which of the following is the most likely cause of this failure?
A backend service must encrypt large archives of user data locally before uploading them to a third-party storage provider. The developer needs to implement envelope encryption using a customer managed key in AWS KMS. The service needs to obtain a data key that can be used to encrypt the archives immediately and then be discarded from memory.
Which AWS KMS API operation should the developer invoke to retrieve the required data key?
A developer is securing a REST API in Amazon API Gateway. Users authenticate against an Amazon Cognito User Pool. The developer wants API Gateway to automatically validate the incoming JSON Web Tokens (JWT) before forwarding requests to the backend, with the least operational overhead.
Which two steps must the developer perform to configure this security setup? (Select TWO.)
Select all that apply
A developer needs to encrypt a database backup file of size on an application server before uploading it to Amazon S3. The developer decides to use client-side envelope encryption with an AWS KMS customer managed key.
Which two actions must the developer perform to encrypt the file locally?
Select all that apply
A developer is packaging a Node.js web application for deployment to AWS Elastic Beanstalk. The application requires the installation of an external system tool (git) and must define a custom environment variable named APP_STAGE set to production. The developer wants to manage these configurations as code within the application source bundle. Which two actions must the developer take to accomplish this? (Select TWO.)
Select all that apply