All practice questions
1542 questions
A developer is deploying a Java application on Amazon EC2 instances. The application writes log entries to a local log file at `/var/log/myapp/app.log`. The developer installs the Unified CloudWatch Agent on the instances and configures it to stream these logs to Amazon CloudWatch Logs. After starting the agent service on the EC2 instances, the developer notices that no log groups or log streams are created in CloudWatch Logs, and no log data is received. Which of the following could be the reasons for this issue? (Select TWO.)
Select all that apply
A developer is designing a REST API in Amazon API Gateway that must start an AWS Step Functions state machine execution whenever a client sends a POST request. To minimize latency and avoid cold starts, the developer wants to configure a direct AWS service integration between API Gateway and Step Functions, without using an intermediate AWS Lambda function.
Which two configuration steps must the developer perform to successfully set up this integration? (Select TWO.)
Select all that apply
A developer is designing a serverless backend using AWS Lambda that processes sensitive customer records. Each record contains a profile payload averaging KB in size. The application must encrypt these payloads before storing them in an Amazon DynamoDB table. To meet strict performance and cost-efficiency requirements, the developer must implement client-side envelope encryption using a Customer Managed Key (CMK) managed by AWS KMS. Which of the following application workflows represents the most secure, cost-effective, and architecturally correct implementation of client-side envelope encryption?
A developer is building a web dashboard that allows corporate employees to sign in using their existing third-party SAML Identity Provider (IdP). The application must access a secure REST API hosted on Amazon API Gateway. The developer wants to validate the user's session at the API Gateway layer using a built-in integration and extract the user's profile claims in the backend AWS Lambda function without writing custom token validation code.
Which configuration strategy should the developer implement to meet these requirements with the least development effort?
A SaaS billing application stores invoice records in an Amazon DynamoDB table. The table has `CustomerId` as the partition key and `InvoiceId` as the sort key. An `InvoiceStatus` attribute indicates whether the invoice is `PAID` or `UNPAID`. Approximately of all invoices are `PAID`. A developer needs to build a dashboard feature that retrieves only the `UNPAID` invoices for a specific customer. Which of the following strategies is the most performant and cost-effective way to retrieve these records?
A developer is designing a web application hosted on Amazon ECS behind an Application Load Balancer (ALB). The application requires users to authenticate via an Amazon Cognito User Pool. The ALB must authenticate incoming HTTP requests and forward the verified user identity claims to the backend ECS containers without requiring token validation logic inside the container code. Additionally, authenticated users must be able to upload profile images directly from their web client to their own folder within an Amazon S3 bucket. Which TWO configurations must the developer implement to meet these requirements?
Select all that apply
A developer has implemented an AWS Lambda function that processes PDF documents uploaded to an Amazon S3 bucket. The function downloads each PDF to the local `/tmp` directory, extracts metadata, and updates a database. During high-volume load testing, several invocations fail with a 'No space left on device' error. Additionally, the developer observes that PDF files from previous invocations occasionally persist and interfere with current executions. Which combination of actions should the developer take to resolve these issues? (Select two.)
Select all that apply
A developer is configuring an application deployed on AWS App Runner in Account A. The application needs to retrieve database credentials to connect to an Amazon RDS database hosted in Account B. The database credentials must be rotated automatically every 30 days. Additionally, the application requires access to a public API endpoint URL that is non-sensitive and does not change. The developer wants to implement a secure, cost-effective parameter storage solution that allows cross-account access where necessary. Which combination of actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
An application running on an Amazon ECS container using AWS Fargate in Account () needs to write objects to an Amazon S3 bucket in Account (). The application code uses the AWS SDK to call the AWS Security Token Service (STS) `AssumeRole` API to assume an IAM role named `CrossAccountS3Writer` in Account . However, the application receives an `AccessDenied` error on the `AssumeRole` call.
The ECS task definition is configured with the `taskRoleArn` parameter set to `arn:aws:iam::111122223333:role/ecsTaskRole` and the `executionRoleArn` parameter set to `arn:aws:iam::111122223333:role/ecsTaskExecutionRole`.
Which two actions are required to resolve this access issue and allow the application to write to the S3 bucket? (Select TWO.)
Select all that apply
A developer is configuring a deployment template for a new serverless application using the AWS Serverless Application Model (SAM). The template contains the following partial structure:
yaml
Transform: AWS::Serverless-2016-10-31
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Which two steps or configurations are required to successfully deploy and run this serverless application? (Select two.)
Select all that apply
An AWS Lambda function is configured to run within private subnets of a custom VPC to securely query an Amazon Aurora database. The function also needs to retrieve database credentials stored as secure strings in AWS Systems Manager Parameter Store. During testing, the Lambda function times out when attempting to retrieve the parameters, though database connectivity works perfectly. A developer confirms that there is no NAT Gateway configured in the VPC.
Which configuration change will resolve the timeout issue while maintaining the current network architecture and database security?
A serverless invoice processing application uses a Lambda function to query a relational database residing in a private subnet of a custom VPC. The function also needs to call a third-party billing service endpoint on the public internet.
Which of the following configurations are required to establish this network connectivity while maintaining secure access? (Select TWO.)
Select all that apply
A developer is designing a serverless mobile application that integrates with a REST API hosted on Amazon API Gateway. Users must be able to register and sign in directly through the mobile application. The developer needs to secure the API Gateway endpoints so that only authenticated users can access them, while minimizing custom code and operational costs.
Which two actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
A microservice processes real-time telemetry data from IoT devices and writes it to an Amazon DynamoDB table. The table's partition key is DeviceType, which has three possible values: SmartWatch, FitnessTracker, and SmartScale. During periods of high traffic, the write operations fail with a ProvisionedThroughputExceededException, even though the total consumed write capacity of the table is well below the overall provisioned limit. Which TWO actions should the developer take to resolve these throttling errors? (Select TWO.)
Select all that apply
A developer has deployed an AWS Lambda function inside a private subnet of a custom VPC to process user registration events. The function needs to retrieve database credentials from AWS Secrets Manager to perform database updates. However, the VPC does not have a NAT Gateway or internet access, and the Lambda function executions are timing out with connection errors to the Secrets Manager service endpoint. Which two actions should the developer take to resolve this issue? (Select TWO.)
Select all that apply
A developer is building a serverless application consisting of multiple AWS Lambda functions written in Python. Each function needs to use the same large, third-party utility library as well as a shared custom logging module. The developer wants to optimize the deployment process by minimizing the deployment package size of the individual Lambda functions and centralizing the management of these shared dependencies. Which approach should the developer use to meet these requirements with the least operational overhead?
A developer is managing an application stack using AWS CloudFormation. The stack contains an Amazon RDS DB instance and an Amazon EC2 instance within an Amazon VPC. The developer has two new requirements:
1. Securely store the database credentials and ensure they are rotated automatically every days.
2. Detect any manual configuration changes made directly to the EC2 security group and restore the security group to the state defined in the CloudFormation template.
Which combination of actions should the developer take to meet these requirements? (Select TWO.)
Select all that apply
A developer is implementing a serverless analytics dashboard. Users must register and log in to the dashboard, which is built as a single-page application (SPA). The application needs to call secure endpoints on Amazon API Gateway to fetch user profile data. Additionally, the client-side application must publish telemetry logs directly to an Amazon Kinesis Data Stream for real-time analysis. Which TWO steps should the developer perform to meet these security requirements with the least operational overhead?
Select all that apply
An enterprise web application requires federated authentication via an external SAML 2.0 Identity Provider (IdP). Once authenticated, users must be able to download files directly from an Amazon S3 bucket. Access must be restricted such that users can only download objects from an S3 prefix that matches their department name (e.g., `company-data/hr/*` for the 'hr' department). The department name is supplied as a custom SAML assertion claim named `department`.
Which configuration should the developer implement to meet these requirements with the least administrative and coding overhead?
An organization hosts a critical multi-region web application on Amazon ECS Fargate across the us-east-1 and us-west-2 Regions. The application connects to an Amazon Aurora Global Database. A developer needs to design a secure solution to manage the database password. The password must be rotated every 30 days, and ECS tasks in both Regions must be able to retrieve the credentials locally with minimal latency. Which solution meets these requirements with the least operational overhead?