Amazon DVA-C02 Practice Test - Questions Answers, Page 27
List of questions
Related questions
A developer has designed an application to store incoming data as JSON files in Amazon S3 objects. Custom business logic in an AWS Lambda function then transforms the objects, and the Lambda function loads the data into an Amazon DynamoDB table. Recently, the workload has experienced sudden and significant changes in traffic. The flow of data to the DynamoDB table is becoming throttled.
The developer needs to implement a solution to eliminate the throttling and load the data into the DynamoDB table more consistently.
Which solution will meet these requirements?
Refactor the Lambda function into two functions. Configure one function to transform the data and one function to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue in between the functions to hold the items as messages and to invoke the second function.
Turn on auto scaling for the DynamoDB table. Use Amazon CloudWatch to monitor the table's read and write capacity metrics and to track consumed capacity.
Create an alias for the Lambda function. Configure provisioned concurrency for the application to use.
Refactor the Lambda function into two functions. Configure one function to store the data in the DynamoDB table. Configure the second function to process the data and update the items after the data is stored in DynamoDB. Create a DynamoDB stream to invoke the second function after the data is stored.
A developer compiles an AWS Lambda function and packages the result as a .zip file. The developer uses the Functions page on the Lambda console to attempt to upload the local packaged .zip file. When pushing the package to Lambda, the console returns the following error:
Which solutions can the developer use to publish the code? (Select TWO.)
Upload the package to Amazon S3. Use the Functions page on the Lambda console to upload the package from the S3 location.
Create an AWS Support ticket to increase the maximum package size.
Use the update-function-code AWS CLI command. Pass the -publish parameter.
Repackage the Lambda function as a Docker container image. Upload the image to Amazon Elastic Container Registry {Amazon ECR). Create a new Lambda function by using the Lambda console. Reference the image that is deployed to Amazon ECR.
Sign the .zip file digitally. Create a new Lambda function by using the Lambda console. Update the configuration of the new Lambda function to include the Amazon Resource Name (ARN) of the code signing configuration.
A developer is creating an application that uses an Amazon DynamoDB table. The developer needs to develop code that reads all records that were added to the table during the previous day. creates HTML reports, and pushes the reports into third-party storage. The item size varies from 1 KB to 4 KB, and the index structure is defined with the date. The developer needs to minimize the read capacity that the application requires from the DynamoDB table.
Which DynamoDB API operation should the developer use in the code to meet these requirements?
Query
Scan
BatchGetltem
Getltem
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?
Install the AWS CLI. Configure the AWS CLI by using an I AM user name and password.
Install the AWS CLI. Configure the AWS CLI by using an SSH key.
Install the AWS CLI. Configure the AWS CLI by using an 1AM user access key and secret key.
Install an AWS software development kit (SDK). Configure the SDK by using an X.509 certificate.
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?
Increase the Lambda function's memory.
Include the entire AWS SDK for .NET in the Lambda function's deployment package.
Include only the AWS SDK for .NET modules for DynamoDB and Amazon S3 in the Lambda function's deployment package.
Configure the Lambda function to download the AWS SDK for .NET from an S3 bucket at runtime.
A developer is setting up a deployment pipeline. The pipeline includes an AWS CodeBuild build stage that requires access to a database to run integration tests. The developer is using a buildspec.yml file to configure the database connection. Company policy requires automatic rotation of all database credentials.
Which solution will handle the database credentials MOST securely?
Retrieve the credentials from variables that are hardcoded in the buildspec.yml file. Configure an AWS Lambda function to rotate the credentials.
Retrieve the credentials from an environment variable that is linked to a SecureString parameter in AWS Systems Manager Parameter Store. Configure Parameter Store for automatic rotation.
Retrieve the credentials from an environment variable that is linked to an AWS Secrets Manager secret. Configure Secrets Manager for automatic rotation.
Retrieve the credentials from an environment variable that contains the connection string in plaintext. Configure an Amazon EventBridge event to rotate the credentials.
A developer is troubleshooting a three-tier application, which is deployed on Amazon EC2 instances. There is a connectivity problem between the application servers and the database servers.
Which AWS services or tools should be used to identify the faulty component? (Select TWO.)
AWS CloudTrail
AWS Trusted Advisor
Amazon VPC Flow Logs
Network access control lists
AWS Config rules
In a move toward using microservices, a company's management team has asked all development teams to build their services so that API requests depend only on that service's data store. One team is building a Payments service which has its own database; the service needs data that originates in the Accounts database. Both are using Amazon DynamoDB.
What approach will result in the simplest, decoupled, and reliable method to get near-real time updates from the Accounts database?
Use AWS Glue to perform frequent ETL updates from the Accounts database to the Payments database.
Use Amazon ElastiCache in Payments, with the cache updated by triggers in the Accounts database.
Use Amazon Data Firehose to deliver all changes from the Accounts database to the Payments database.
Use Amazon DynamoDB Streams to deliver all changes from the Accounts database to the Payments database.
A company is developing a serverless application by using AWS Lambda functions. One of the Lambda functions needs to access an Amazon RDS DB instance. The DB instance is in a private subnet inside a VPC.
The company creates a role that includes the necessary permissions to access the DB instance. The company then assigns the role to the Lambda function. A developer must take additional action to give the Lambda function access to the DB instance.
What should the developer do to meet these requirements?
Assign a public IP address to the DB instance. Modify the security group of the DB instance to allow inbound traffic from the IP address of the Lambda function.
Set up an AWS Direct Connect connection between the Lambda function and the DB instance.
Configure an Amazon CloudFront distribution to create a secure connection between the Lambda function and the DB instance.
Configure the Lambda function to connect to the private subnets in the VPC. Add security group rules to allow traffic to the DB instance from the Lambda function.
A company is planning to deploy an application on AWS behind an Elastic Load Balancing (ELB) load balancer. The application uses an HTTP/HTTPS listener and must access the client IP addresses.
Which load-balancing solution meets these requirements?
Use an Application Load Balancer and the X-Forwarded-For headers.
Use a Network Load Balancer (NLB). Enable proxy protocol support on the NLB and the target application.
Use an Application Load Balancer. Register the targets by the instance ID.
Use a Network Load Balancer and the X-Forwarded-For headers.
Question