AWS Certified Developer Associate DVA-C01 – Question280

A front-end web application is using Amazon Cognito user pools to handle the user authentication flow. A developer is integrating Amazon DynamoDB into the application using the AWS SDK for JavaScript.
How would the developer securely call the API without exposing the access or secret keys?

A.
Configure Amazon Cognito identity pools and exchange the JSON Web Token (JWT) for temporary credentials.
B. Run the web application in an Amazon EC2 instance with the instance profile configured.
C. Hardcore the credentials, use Amazon S3 to host the web application, and enable server-side encryption.
D. Use Amazon Cognito user pool JSON Web Tokens (JWITs) to access the DynamoDB APIs.

AWS Certified Developer Associate DVA-C01 – Question279

A developer converted an existing program to an AWS Lambda function in the console. The program runs properly on a local laptop, but shows an “Unable to import module” error when tested in the Lambda console.
Which of the following can fix the error?

A.
Install the missing module and specify the current directory as the target. Create a ZIP file to include all files under the current directory, and upload the ZIP file.
B. Install the missing module in a lib directory. Create a ZIP file to include all files under the lib directory, and upload the ZIP file as dependency file.
C. In the Lambda code, invoke a Linux command to install the missing modules under the /usr/lib directory.
D. In the Lambda console, create a LB_LIBRARY_PATH environment and specify the value for the system library path.

Correct Answer: D

Explanation:

AWS Certified Developer Associate DVA-C01 – Question278

A developer is writing an application that will process data delivered into an Amazon S3 bucket. The data is delivered approximately 10 times a day, and the developer expects the data will be processed in less than 1 minute, on average.
How can the developer deploy and invoke the application with the lowest cost and lowest latency?

A.
Deploy the application as an AWS Lambda function and invoke it with an Amazon CloudWatch alarm triggered by an S3 object upload.
B. Deploy the application as an AWS Lambda function and invoke it with an S3 event notification.
C. Deploy the application as an AWS Lambda function and invoke it with an Amazon CloudWatch scheduled event.
D. Deploy the application onto an Amazon EC2 instance and have it poll the S3 bucket for new objects.

Correct Answer: B

Explanation:

AWS Certified Developer Associate DVA-C01 – Question277

A company is managing a NoSQL database on-premises to host a critical component of an application, which is starting to have scaling issues. The company wants to migrate the application to Amazon DynamoDB with the following considerations:

  • Optimize frequent queries
  • Reduce read latencies
  • Plan for frequent queries on certain key attributes of the table

Which solution would help achieve these objectives?

A.
Create global secondary indexes on keys that are frequently queried. Add the necessary attributes into the indexes.
B. Create local secondary indexes on keys that are frequently queried. DynamoDB will fetch needed attributes from the table.
C. Create DynamoDB global tables to speed up query responses. Use a scan to fetch data from the table.
D. Create an AWS Auto Scaling policy for the DynamoDB table.

Correct Answer: A

AWS Certified Developer Associate DVA-C01 – Question276

A company's fleet of Amazon EC2 instances receives data from millions of users through an API. The servers batch the data, add an object for each user, and upload the objects to an S3 bucket to ensure high access rates. The object attributes are Customer ID, Server ID, TS-Server (TimeStamp and Server ID), the size of the object, and a timestamp. A Developer wants to find all the objects for a given user collected during a specified time range.
After creating an S3 object created event, how can the Developer achieve this requirement?

A.
Execute an AWS Lambda function in response to the S3 object creation events that creates an Amazon DynamoDB record for every object with the Customer ID as the partition key and the Server ID as the sort key. Retrieve all the records using the Customer ID and Server ID attributes.
B. Execute an AWS Lambda function in response to the S3 object creation events that creates an Amazon Redshift record for every object with the Customer ID as the partition key and TS-Server as the sort key. Retrieve all the records using the Customer ID and TS-Server attributes.
C. Execute an AWS Lambda function in response to the S3 object creation events that creates an Amazon DynamoDB record for every object with the Customer ID as the partition key and TS-Server as the sort key. Retrieve all the records using the Customer ID and TS-Server attributes.
D. Execute an AWS Lambda function in response to the S3 object creation events that creates an Amazon Redshift record for every object with the Customer ID as the partition key and the Server ID as the sort key. Retrieve all the records using the Customer ID and Server ID attributes.

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question275

A Developer needs to deploy an application running on AWS Fargate using Amazon ECS. The application has environment variables that must be passed to a container for the application to initialize.
How should the environment variables be passed to the container?

A.
Define an array that includes the environment variables under the environment parameter within the service definition.
B. Define an array that includes the environment variables under the environment parameter within the task definition.
C. Define an array that includes the environment variables under the entryPoint parameter within the task definition.
D. Define an array that includes the environment variables under the entryPoint parameter within the service definition.

Correct Answer: B

AWS Certified Developer Associate DVA-C01 – Question274

A company requires that AWS Lambda functions written by Developers log errors so System Administrators can more effectively troubleshoot issues.
What should the Developers implement to meet this need?

A.
Publish errors to a dedicated Amazon SQS queue.
B. Create an Amazon CloudWatch Events event trigger based on certain Lambda events.
C. Report errors through logging statements in Lambda function code.
D. Set up an Amazon SNS topic that sends logging statements upon failure.

Correct Answer: B

AWS Certified Developer Associate DVA-C01 – Question273

A Developer is migrating existing applications to AWS. These applications use MongoDB as their primary data store, and they will be deployed to Amazon EC2 instances. Management requires that the Developer minimize changes to applications while using AWS services.
Which solution should the Developer use to host MongoDB in AWS?

A.
Install MongoDB on the same instance where the application is running.
B. Deploy Amazon DocumentDB in MongoDB compatibility mode.
C. Use Amazon API Gateway to translate API calls from MongoDB to Amazon DynamoDB.
D. Replicate the existing MongoDB workload to Amazon DynamoDB.

Correct Answer: D

AWS Certified Developer Associate DVA-C01 – Question272

A company is using Amazon API Gateway to manage its public-facing API. The CISO requires that the APIs be used by test account users only.
What is the MOST secure way to restrict API access to users of this particular AWS account?

A.
Client-side SSL certificates for authentication
B. API Gateway resource policies
C. Cross-origin resource sharing (CORS)
D. Usage plans

AWS Certified Developer Associate DVA-C01 – Question271

A Developer has an application that must accept a large amount of incoming data streams and process the data before sending it to many downstream users.
Which serverless solution should the Developer use to meet these requirements?

A.
Amazon RDS MySQL stored procedure with AWS Lambda
B. AWS Direct Connect with AWS Lambda
C. Amazon Kinesis Data Streams with AWS Lambda
D. Amazon EC2 bash script with AWS Lambda

Correct Answer: C

Explanation: