Free AWS Certified Developer - Associate DVA-C02 Exam Braindumps (page: 12)

Page 12 of 116

A developer is writing an AWS Lambda function. The developer wants to log key events that occur while the Lambda function runs. The developer wants to include a unique identifier to associate the events with a specific function invocation. The developer adds the following code to the Lambda function:
Which solution will meet this requirement?

  1. Obtain the request identifier from the AWS request ID field in the context object. Configure the application to write logs to standard output.
  2. Obtain the request identifier from the AWS request ID field in the event object. Configure the application to write logs to a file.
  3. Obtain the request identifier from the AWS request ID field in the event object. Configure the application to write logs to standard output.
  4. Obtain the request identifier from the AWS request ID field in the context object. Configure the application to write logs to a file.

Answer(s): A



A developer is working on a serverless application that needs to process any changes to an Amazon DynamoDB table with an AWS Lambda function.
How should the developer configure the Lambda function to detect changes to the DynamoDB table?

  1. Create an Amazon Kinesis data stream, and attach it to the DynamoDB table.
    Create a trigger to connect the data stream to the Lambda function.
  2. Create an Amazon EventBridge rule to invoke the Lambda function on a regular schedule. Conned to the DynamoDB table from the Lambda function to detect changes.
  3. Enable DynamoDB Streams on the table. Create a trigger to connect the
    DynamoDB stream to the Lambda function.
  4. Create an Amazon Kinesis Data Firehose delivery stream, and attach it to the
    DynamoDB table. Configure the delivery stream destination as the Lambda function.

Answer(s): C



An application uses an Amazon EC2 Auto Scaling group. A developer notices that EC2
instances are taking a long time to become available during scale-out events. The
UserData script is taking a long time to run.
The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.
Which combination of steps should the developer take to meet these requirements? (Choose two.)

  1. Use EC2 Image Builder to create an Amazon Machine Image (AMI). Install all the patches and agents that are needed to manage and run the application.
    Update the Auto Scaling group launch configuration to use the AMI.
  2. Use EC2 Image Builder to create an Amazon Machine Image (AMI). Install the latest version of the application and all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.
  3. Set up AWS CodeDeploy to deploy the most recent version of the application at runtime.
  4. Set up AWS CodePipeline to deploy the most recent version of the application at runtime.
  5. Remove any commands that perform operating system patching from the UserData script.

Answer(s): A,C



A developer is creating an AWS Lambda function that needs credentials to connect to an Amazon RDS for MySQL database. An Amazon S3 bucket currently stores the credentials. The developer needs to improve the existing solution by implementing credential rotation and secure storage. The developer also needs to provide integration with the Lambda function.
Which solution should the developer use to store and retrieve the credentials with the LEAST management overhead?

  1. Store the credentials in AWS Systems Manager Parameter Store. Select the database that the parameter will access. Use the default AWS Key Management
    Service (AWS KMS) key to encrypt the parameter. Enable automatic rotation for the parameter. Use the parameter from Parameter Store on the Lambda function to connect to the database.
  2. Encrypt the credentials with the default AWS Key Management Service (AWS
    KMS) key. Store the credentials as environment variables for the Lambda function. Create a second Lambda function to generate new credentials and to rotate the credentials by updating the environment variables of the first
    Lambda function. Invoke the second Lambda function by using an Amazon
    EventBridge rule that runs on a schedule. Update the database to use the new credentials. On the first Lambda function, retrieve the credentials from the environment variables. Decrypt the credentials by using AWS KMS, Connect to the database.
  3. Store the credentials in AWS Secrets Manager. Set the secret type to
    Credentials for Amazon RDS database. Select the database that the secret will access. Use the default AWS Key Management Service (AWS KMS) key to encrypt the secret. Enable automatic rotation for the secret. Use the secret from Secrets Manager on the Lambda function to connect to the database.
  4. Encrypt the credentials by using AWS Key Management Service (AWS KMS). Store the credentials in an Amazon DynamoDB table. Create a second Lambda function to rotate the credentials. Invoke the second Lambda function by using an
    Amazon EventBridge rule that runs on a schedule. Update the DynamoDB table.
    Update the database to use the generated credentials. Retrieve the credentials from DynamoDB with the first Lambda function. Connect to the database.

Answer(s): C



Page 12 of 116



Post your Comments and Discuss Amazon AWS Certified Developer - Associate DVA-C02 exam with other Community members:

Ernesto commented on August 26, 2024
Prepared and passed this exam. Valid question and very tough exam. So good luck.
Spain
upvote