A development team has an Amazon API Gateway REST API that is backed by an AWS Lambda function.
Users have reported performance issues for the Lambda function. The development team identified the source of the issues as a cold start of the Lambda function. The development team needs to reduce the time needed for the Lambda function to initialize.
Which solution will meet this requirement?
A. Change the Lambda concurrency to reserved concurrency.
B. Increase the timeout of the Lambda function.
C. Increase the memory allocation of the Lambda function.
D. Configure provisioned concurrency for the Lambda function.
Show Answer
Correct Answer: D
Explanation: Provisioned concurrency keeps Lambda execution environments initialized and ready to serve requests, significantly reducing or eliminating cold-start latency. Reserved concurrency only guarantees available concurrency but does not pre-initialize execution environments. Increasing timeout does not affect initialization time, and increasing memory may improve execution speed and sometimes reduce init duration, but it does not address cold starts as effectively as provisioned concurrency.
Question 48
A developer is building an application that includes an AWS Lambda function that is written in .NET Core. The Lambda function’s code needs to interact with Amazon DynamoDB tables and Amazon S3 buckets. The developer must minimize the Lambda function’s deployment time and invocation duration.
Which solution will meet these requirements?
A. Increase the Lambda function’s memory.
B. Include the entire AWS SDK for .NET in the Lambda function’s deployment package.
C. Include only the AWS SDK for .NET modules for DynamoDB and Amazon S3 in the Lambda function’s deployment package.
D. Configure the Lambda function to download the AWS SDK for .NET from an S3 bucket at runtime.
Show Answer
Correct Answer: C
Explanation: Using only the required AWS SDK for .NET service modules (DynamoDB and Amazon S3) minimizes the deployment package size, which reduces deployment time and can improve Lambda cold-start initialization. Including the full SDK increases package size unnecessarily, increasing memory does not reduce package size, and downloading the SDK at runtime adds latency and complexity.
Question 49
A company’s application includes an Amazon DynamoDB table for product orders. The table has a primary partition key of orderId and has no sort key. The company is adding a new feature that requires the application to query the table by using the customerId attribute.
Which solution will provide this query functionality?
A. Change the existing primary key by setting customerId as the sort key.
B. Create a new global secondary index (GSI) on the table with a partition key of customerId.
C. Create a new local secondary index (LSI) on the table with a partition key of customerId.
D. Create a new local secondary index (LSI) on the table with a partition key of orderId and a sort key of customerId.
Show Answer
Correct Answer: B
Explanation: A Global Secondary Index (GSI) with customerId as its partition key allows efficient queries by customerId on an existing DynamoDB table. The table's primary key cannot be modified in place. A Local Secondary Index (LSI) must share the table's partition key (orderId), so it cannot use customerId as the partition key and does not support querying solely by customerId.
Question 50
A company is developing a set of AWS Lambda functions to process data. The Lambda functions need to use a common third-party library as a dependency. The library is frequently updated with new features and bug fixes. The company wants to ensure that the Lambda functions always use the latest version of the library.
Which solution will meet these requirements in the MOST operationally efficient way?
A. Store the dependency and the function code in an Amazon S3 bucket.
B. Create a Lambda layer that includes the library. Attach the layer to each Lambda function.
C. Install the dependency in an Amazon Elastic File System (Amazon EFS) file system. Attach the file system to each Lambda function.
D. Create a new Lambda function to load the library. Configure the existing Lambda functions to invoke the new Lambda function when the existing functions need to use the library.
Show Answer
Correct Answer: B
Explanation: Lambda layers are the AWS-recommended mechanism for sharing common libraries across multiple Lambda functions. You package the dependency once and attach the layer to each function. When the library is updated, publish a new layer version and update the functions to use that version. This is more operationally efficient than duplicating code, using EFS for a simple dependency, or invoking another Lambda just to access a library.
Question 51
A developer is writing a web application that must share secure documents with end users. The documents are stored in a private Amazon S3 bucket. The application must allow only authenticated users to download specific documents when requested, and only for a duration of 15 minutes.
How can the developer meet these requirements?
A. Copy the documents to a separate S3 bucket that has a lifecycle policy for deletion after 15 minutes.
B. Create a presigned S3 URL using the AWS SDK with an expiration time of 15 minutes.
C. Use server-side encryption with AWS KMS managed keys (SSE-KMS) and download the documents using HTTPS.
D. Modify the S3 bucket policy to only allow specific users to download the documents. Revert the change after 15 minutes.
Show Answer
Correct Answer: B
Explanation: A presigned Amazon S3 URL grants time-limited access to a specific object in a private bucket without making the bucket public or changing bucket policies. The application can authenticate the user, then generate a presigned URL with a 15-minute expiration using the AWS SDK. This satisfies the requirement for authenticated, temporary access.
Question 52
A developer is updating an Amazon API Gateway REST API to have a mock endpoint. The developer wants to update the integration request mapping template so the endpoint will respond to mock integration requests with specific HTTP status codes based on various conditions.
Which statement will meet these requirements?
A.
B.
C.
D.
Show Answer
Correct Answer: B
Explanation: For API Gateway REST API mock integrations, the integration request mapping template can set a `statusCode` field conditionally (using Velocity Template Language such as `#if/#else`). API Gateway then uses that value to select the corresponding integration response and return the desired HTTP status code. This matches the documented mock integration pattern.
Question 53
A developer must cache dependent artifacts from Maven Central, a public package repository, as part of an application’s build pipeline. The build pipeline has an AWS CodeArtifact repository where artifacts of the build are published. The developer needs a solution that requires minimum changes to the build pipeline.
Which solution meets these requirements?
A. Modify the existing CodeAriifact repository to associate an upstream repository with the public package repository.
B. Create a new CodeAtfact repository that has an external connection to the public package repository.
C. Create a new CodeAifact domain that contains a new repository that has an external connection to the public package repository.
D. Modify the CodeAnifact repository resource policy to allow artifacts to be fetched from the public package repository.
Show Answer
Correct Answer: A
Explanation: AWS CodeArtifact supports associating an existing repository with an upstream repository. For Maven packages, configuring the existing CodeArtifact repository with an upstream (ultimately backed by an external connection to Maven Central) allows dependencies from Maven Central to be fetched and cached while keeping the same repository endpoint for the build pipeline, requiring minimal or no pipeline changes. Creating a new repository or domain would require pipeline reconfiguration, and a resource policy does not enable fetching from public repositories.
Question 54
A large company has its application components distributed across multiple AWS accounts. The company needs to collect and visualize trace data across these accounts.
What should be used to meet these requirements?
A. AWS X-Ray
B. Amazon CloudWatch
C. Amazon VPC flow logs
D. Amazon OpenSearch Service
Show Answer
Correct Answer: A
Explanation: AWS X-Ray is the AWS distributed tracing service designed to collect, analyze, and visualize trace data across distributed application components, including applications spanning multiple AWS accounts. Amazon CloudWatch provides metrics, logs, and monitoring rather than distributed request tracing. VPC Flow Logs capture network traffic metadata, and Amazon OpenSearch Service is a search and analytics engine, not a tracing service.
Question 55
A developer needs to write an AWS CloudFormation template on a local machine and deploy a CloudFormation stack to AWS.
What must the developer do to complete these tasks?
A. Install the AWS CLI. Configure the AWS CLI by using an IAM user name and password.
B. Install the AWS CLI. Configure the AWS CLI by using an SSH key.
C. Install the AWS CLI, Configure the AWS CLI by using an IAM user access key and secret key.
D. Install an AWS software development kit (SDK). Configure the SDK by using an X.509 certificate.
Show Answer
Correct Answer: C
Explanation: To deploy an AWS CloudFormation stack from a local machine, the developer should install the AWS CLI and configure it with IAM credentials consisting of an access key ID and secret access key (or equivalent supported credentials). IAM usernames/passwords are not used for CLI authentication, SSH keys are unrelated, and X.509 certificates are obsolete for this purpose.
Question 56
A developer is making changes to a custom application that uses AWS Elastic Beanstalk.
Which solutions will update the Elastic Beanstalk environment with the new application version after the developer completes the changes? (Choose two.)
A. Package the application code into a zip file. Use the AWS Management Console to upload the .zip file and deploy the packaged application.
B. Package the application code into a .tar file. Use the AWS Management Console to create a new application version from the .tar file. Update the environment by using the AWS CLI.
C. Package the application code into a .tar file. Use the AWS Management Console to upload the .tar file and deploy the packaged application.
D. Package the application code into a .zip file. Use the AWS CL to create a new application version from the .zip file and to update the environment.
E. Package the application code into a .zip file. Use the AWS Management Console to create a new application version from the .zip file. Rebuild the environment by using the AWS CLI.
Show Answer
Correct Answer: A, D
Explanation: Elastic Beanstalk application versions are typically uploaded as .zip bundles (or .war for Java). You can deploy directly from the Elastic Beanstalk console by uploading a .zip archive, or use the AWS CLI to create a new application version from a .zip archive and then update the environment. .tar is not the standard supported application bundle format for these workflows, and rebuilding an environment is not the correct way to deploy a new application version.
$19
Get all 553 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.