Amazon DVA-C02 Practice Test - Questions Answers, Page 25
List of questions
Related questions
A company is working on a new serverless application. A developer needs to find an automated way to deploy AWS Lambda functions and the dependent Infrastructure with minimum coding effort. The application also needs to be reliable.
Which method will meet these requirements with the LEAST operational overhead?
Build the application by using shell scripts to create .zip files for each Lambda function. Manually upload the .zip files to the AWS Management Console.
Build the application by using the AWS Serverless Application Model (AWS SAM). Use a continuous integration and continuous delivery (CI/CD) pipeline and the SAM CLI to deploy the Lambda functions.
Build the application by using shell scripts to create .zip files for each Lambda function. Upload the .zip files. Deploy the .zip files as Lambda functions by using the AWS CLI in a continuous integration and continuous delivery (CI/CD) pipeline.
Build a container for each Lambda function. Store the container images in AWS CodeArtifact. Deploy the containers as Lambda functions by using the AWS CLI in a continuous integration and continuous delivery (CI/CD) pipeline.
A company maintains a REST service using Amazon API Gateway and the API Gateway native API key validation. The company recently launched a new registration page, which allows users to sign up for the service. The registration page creates a new API key using CreateApiKey and sends the new key to the user. When the user attempts to call the API using this key. the user receives a 403 Forbidden error. Existing users are unaffected and can still call the API.
What code updates will grant these new users access to the API?
The createDeploymer.t method must be called so the API can be redeployed to include the newly created API key.
The updateAuthorizer method must be called to update the API's authorizer to include the newly created API key
The importApiKeys method must be called to import all newly created API keys into the current stage of the API.
The createUsagePlanKey method must be called to associate the newly created API key with the correct usage plan.
A developer is building a microservice that uses AWS Lambda to process messages from an Amazon Simple Queue Service (Amazon SQS) standard queue. The Lambda function calls external APIs to enrich the SOS message data before loading the data into an Amazon Redshift data warehouse. The SOS queue must handle a maximum of 1.000 messages per second.
During initial testing, the Lambda function repeatedly inserted duplicate data into the Amazon Redshift table. The duplicate data led to a problem with data analysis. All duplicate messages were submitted to the queue within 1 minute of each other.
How should the developer resolve this issue?
Create an SOS FIFO queue. Enable message deduplication on the SOS FIFO queue.
Reduce the maximum Lambda concurrency that the SOS queue can invoke.
Use Lambda's temporary storage to keep track of processed message identifiers.
Configure a message group ID for every sent message. Enable message deduplication on the SQS standard queue.
A company launched an online portal to announce a new product that the company will release in 6 months. The portal requests that users enter an email address to receive communications about the product. The company needs to create a REST API that will store the email addresses in Amazon DynamoDB.
A developer has created an AWS Lambda function that can store the email addresses. The developer will deploy the Lambda function by using the AWS Serverless Application Model (AWS SAM). The developer must provide access to the Lambda function over HTTP.
Which solutions will meet these requirements with the LEAST additional configuration? (Select TWO.)
Expose the Lambda function by using function URLs.
Expose the Lambda function by using a Gateway Load Balancer.
Expose the Lambda function by using a Network Load Balancer.
Expose the Lambda function by using AWS Global Accelerator
Expose the Lambda function by using Amazon API Gateway.
A developer has created a large AWS Lambda function. Deployment of the function Is failing because of an InvalidParameterValueException error. The error message indicates that the unzipped size of the function exceeds the maximum supported value.
Which actions can the developer take to resolve this error? (Select TWO.)
Submit a quota increase request to AWS Support to increase the function to the required size.
Use a compression algorithm that is more efficient than ZIP.
Break up the function into multiple smaller functions.
Zip the .zip file twice to compress the file more.
Move common libraries, function dependencies, and custom runtimes into Lambda layers.
A developer is creating a new batch application that will run on an Amazon EC2 instance. The application requires read access to an Amazon S3 bucket. The developer needs to follow security best practices to grant S3 read access to the application.
Which solution meets these requirements?
Add the permissions to an 1AM policy. Attach the policy to a role. Attach the role to the EC2 instance profile.
Add the permissions inline to an 1AM group. Attach the group to the EC2 instance profile.
Add the permissions to an 1AM policy. Attach the policy to a user. Attach the user to the EC2 instance profile.
Add the permissions to an 1AM policy. Use 1AM web identity federation to access the S3 bucket with the policy.
An 1AM role is attached to an Amazon EC2 instance that explicitly denies access to all Amazon S3 API actions. The EC2 instance credentials file specifies the 1AM access key and secret access key, which allow full administrative access.
Given that multiple modes of 1AM access are present for this EC2 instance, which of the following is correct?
The EC2 instance will only be able to list the S3 buckets.
The EC2 instance will only be able to list the contents of one S3 bucket at a time.
The EC2 instance will be able to perform all actions on any S3 bucket.
The EC2 instance will not be able to perform any S3 action on any S3 bucket.
A developer is writing unit tests tor a new application that will be deployed on AWS. The developer wants to validate all pull requests with unit tests and merge the code with the main branch only when all tests pass
The developer stores the code in AWS CodeCommit and sets up AWS CodeBuild to run the unit tests. The developer creates an AWS Lambda function to start the CodeBuild task. The developer needs to identify the CodeCommit events in an Amazon EventBridge event that can invoke the Lambda function when a pull request is created or updated.
Which CodeCommit event will meet these requirements?
Option A
Option B
Option C
Option D
A company has a website that displays a daily newsletter. When a user visits the website, an AWS Lambda function processes the browser's request and queries the company's on-premises database to obtain the current newsletter. The newsletters are stored in English. The Lambda function uses the Amazon Translate TranslateText API operation to translate the newsletters, and the translation is displayed to the user.
Due to an increase in popularity, the website's response time has slowed. The database is overloaded. The company cannot change the database and needs a solution that improves the response time of the Lambda function.
Which solution meets these requirements?
Change to asynchronous Lambda function invocation.
Cache the translated newsletters in the Lambda /tmp directory.
Enable TranslateText API caching.
Change the Lambda function to use parallel processing.
A developer creates an AWS Lambda function that is written in Java. During testing, the Lambda function does not work how the developer expected. The developer wants to use tracing capabilities to troubleshoot the problem.
Which AWS service should the developer use to accomplish this goal?
AWS Trusted Advisor
Amazon CloudWatch
AWS X-Ray
AWS CloudTrail
Question