All practice questions
1542 questions
A containerized microservice deployed on AWS Fargate inside a private VPC subnet needs to write transaction logs to an Amazon DynamoDB table and send real-time confirmation callbacks to an external payment processor at . According to company security requirements, all database traffic must remain within the AWS network, and outbound traffic from the Fargate container must be restricted to only the payment processor and the DynamoDB service. Which TWO configurations must the developer implement to meet these requirements?
Select all that apply
An application needs to encrypt large files locally before uploading them to Amazon S3. The developer decides to use client-side envelope encryption with an AWS Key Management Service (AWS KMS) customer managed key. The developer calls the GenerateDataKey API operation.
Which two components are returned by this API call to enable envelope encryption? (Select TWO.)
Select all that apply
A startup is deploying a web portal where authenticated customers can manage their profiles. The application front-end is a React application hosted on Amazon S3. The back-end consists of REST APIs hosted on Amazon API Gateway and powered by AWS Lambda. The developer must implement a secure sign-in mechanism for customers and ensure the REST APIs validate the user's authentication tokens. The solution must minimize custom development effort and optimize runtime efficiency.
Which two configurations should the developer implement to meet these requirements? (Select TWO.)
Select all that apply
A microservice running on AWS Lambda needs to perform local client-side envelope encryption on application log files that range from MB to MB in size before storing them in an on-premises archive. The microservice must use a customer managed key in AWS KMS.
Which of the following configuration and SDK coding steps should the developer perform to implement this securely with minimum privilege? (Select TWO.)
Select all that apply
An organization is deploying a multi-tenant backend on Amazon API Gateway. The developer must implement security and authorization for two specific API resources:
1. A `/dashboard` resource that needs to validate identity tokens generated by an Amazon Cognito User Pool. The validation must be handled natively by API Gateway to minimize latency and avoid executing custom backend code.
2. A `/partner-integration` resource that must validate custom OAuth 2.0 tokens issued by a third-party partner's identity provider, using custom validation and database lookups.
Which TWO configuration steps should the developer perform to secure these resources?
Select all that apply
A development team is preparing to update an application hosted on AWS Elastic Beanstalk. The new version requires the installation of an OS-level utility (xml2) on the underlying EC2 instances. Additionally, to guarantee clean system states, the team requires that the update is only applied to newly provisioned instances rather than modifying the existing ones in-place. The update must maintain the application's full serving capacity throughout the deployment process, but the team wants to avoid performing a manual DNS redirection or CNAME swap. Which two configuration steps should the developer perform to meet these requirements? (Select TWO.)
Select all that apply
A digital media streaming service uses Amazon API Gateway to expose a REST API that retrieves subscriber profiles. The backend integration uses an AWS Lambda function with a proxy integration. The company uses a custom external identity provider that issues JSON Web Tokens (JWTs) to authenticated users. The developer must secure the API Gateway endpoints to ensure that only users with an active subscription (indicated by a claim named 'subscriptionStatus' with a value of 'active' inside the JWT payload) can access the API. The solution must minimize costs by preventing unauthorized requests from invoking the backend Lambda function, and must cache the authorization decision for 5 minutes. Which security configuration will meet these requirements?
A backend system executes inside private subnets of a VPC to process financial transactions. This workload requires outbound connections to both an internal database within the VPC and a public third-party banking API. The database traffic is successful, but all connection attempts to the public API timeout. Which network configuration will enable the workload to connect to the external API?
A developer is preparing a Node.js web application for deployment on AWS Elastic Beanstalk. The application requires a public environment variable named `APP_COLOR` to be accessible across all instances. Additionally, the application must retrieve a highly sensitive database password that is rotated on a weekly basis. Which two actions should the developer take to meet these requirements?
Select all that apply
A developer is implementing a secure authentication and authorization mechanism for a web-based client portal. The portal consists of a React single-page application (SPA) and an Amazon API Gateway REST API backed by AWS Lambda. The developer must allow users to sign in, retrieve their profile details, and enforce group-based access control (e.g., Administrators vs. Standard Users) on the API Gateway endpoints. The architecture must minimize latency, avoid unnecessary external API calls during request processing, and leverage built-in AWS integrations where possible.
Which TWO actions should the developer take to meet these requirements?
Select all that apply
An engineering team is troubleshooting a newly deployed backend application hosted in a private subnet of a custom VPC. The application needs to retrieve objects from an Amazon S3 bucket and send messages to an Amazon SQS queue. The VPC has no Internet Gateway or NAT Gateway. The developer creates an Amazon S3 Gateway Endpoint and an Amazon SQS Interface Endpoint. However, the application is still experiencing connection timeouts when trying to access these services. Which of the following configuration changes must the developer make to resolve this issue? (Select TWO.)
Select all that apply
A developer needs to secure a database connection string containing credentials. The string is in size, and the developer wants to perform direct server-side encryption using an AWS KMS customer managed key without generating and managing local data keys. Which AWS KMS API operation should the developer call to encrypt this payload directly?
A developer is managing an application deployed via AWS CloudFormation. The application's database credentials are stored in AWS Secrets Manager and referenced in the CloudFormation template using the dynamic reference `{{resolve:secretsmanager:ProductionDBSecret:SecretString:Password}}` within the `UserData` property of an `AWS::EC2::LaunchTemplate` resource.
The database administrator rotates the database password in AWS Secrets Manager. Subsequently, the developer initiates a stack update to increase the `MaxSize` property of the `AWS::AutoScaling::AutoScalingGroup` resource that uses this launch template. The stack update completes successfully, but the newly launched EC2 instances fail to connect to the database, while existing instances continue to function until their cached credentials expire.
What is the cause of this issue, and how should the developer resolve it?
A developer is designing a secure integration between an external third-party server-to-server daemon application and a private API hosted on Amazon API Gateway. The external application must programmatically access API endpoints to retrieve financial reports without user intervention. The solution must support custom OAuth 2.0 scopes, such as `reports:read`, to authorize access. Which architecture should the developer implement to meet these requirements with the least operational complexity?
A developer is implementing client-side decryption for a microservice that retrieves encrypted configuration files (each under KB in size) from an external datastore. The files were encrypted using envelope encryption with an AWS KMS customer managed key. The datastore contains the ciphertext payload and the encrypted data key (ciphertext data key). Which two steps must the developer's application perform to decrypt the payload?
Select all that apply
A logistics company is exposing a shipment tracking API via an Amazon API Gateway REST API. The developer needs to secure the API to authenticate and authorize two categories of consumers:
1. Internal warehouse applications running on Amazon EC2 instances within the company's AWS account. These applications must be granted access using their IAM roles under the principle of least privilege.
2. Mobile client applications used by delivery drivers. These drivers authenticate against an external identity provider (IdP). The authorization process must validate custom claims in their security tokens to restrict access to specific geographical regions.
Which two configurations should the developer implement to secure the API Gateway endpoints for these consumers? (Select two.)
Select all that apply
An internal employee portal has a frontend application that retrieves account data by calling a REST API hosted on Amazon API Gateway. The employees are authenticated using an Amazon Cognito User Pool. The developer wants to secure the API Gateway endpoints so that only authenticated users can access the resources. The developer needs to validate the JSON Web Tokens (JWT) at the API Gateway level with the least operational overhead.
Which configuration should the developer implement to meet these requirements?
A developer is implementing a new mobile application that accesses a REST API hosted on Amazon API Gateway with an AWS Lambda proxy integration. Users will authenticate against an Amazon Cognito User Pool. The developer needs to secure the API Gateway endpoints so that only authenticated users can access them, and the backend Lambda function must be able to retrieve the user's email address and custom attributes to perform application-level authorization.
Which configuration should the developer implement to meet these requirements with the least operational overhead?
A developer needs to configure autoscaling thresholds and environment properties for a web application deployed via AWS Elastic Beanstalk. To ensure consistency across development, staging, and production environments, the developer wants these configurations to be version-controlled in the Git repository alongside the application source code. Which of the following approaches should the developer use to satisfy these requirements?
A developer is building a multi-tenant web application where users authenticate using an Amazon Cognito User Pool. The application must allow authenticated users to perform the following tasks:
* Call a private backend REST API deployed on Amazon API Gateway.
* Directly query tenant-specific items in an Amazon DynamoDB table using temporary AWS credentials.
The user's tenant ID is stored as a custom attribute (`custom:tenant_id`) in the Cognito User Pool. The developer wants to implement a secure, low-overhead solution that minimizes the number of IAM roles and avoids custom Lambda authorizers or validation code.
Which TWO configurations should the developer implement to meet these requirements?
Select all that apply