DVA-C01 : AWS Certified Developer Associate : Part 08

  1. A Developer has been asked to make changes to the source code of an AWS Lambda function. The function is managed using an AWS CloudFormation template. The template is configured to load the source code from an Amazon S3 bucket. The Developer manually created a .ZIP file deployment package containing the changes and put the file into the correct location on Amazon S3. When the function is invoked, the code changes have not been applied.

    What step is required to update the function with the changes?

    • Delete the .ZIP file on S3, and re-upload by using a different object key name.
    • Update the CloudFormation stack with the correct values for the function code properties S3Bucket, S3Key, or S3ObjectVersion.
    • Ensure that the function source code is base64-encoded before uploading the deployment package to S3.
    • Modify the execution role of the Lambda function to allow S3 access permission to the deployment package .ZIP file.
  2. A Developer needs to design an application running on AWS that will be used to consume Amazon SQS messages that range from 1KB up to 1GB in size.

    How should the Amazon SQS messages be managed?

    • Use Amazon S3 and the Amazon SQS CLI.
    • Use Amazon S3 and the Amazon SQS Extended Client Library for Java.
    • Use Amazon EBS and the Amazon SQS CLI.
    • Use Amazon EFS and the Amazon SQS CLI.
  3. A company is developing an application that will run on several Amazon EC2 instances in an Auto Scaling group and can access a database running on Amazon EC2. The application needs to store secrets required to connect to the database. The application must allow for periodic secret rotation, and there should be no changes to the application when a secret changes.

    What is the SAFEST way to meet these requirements?

    • Associate an IAM role to the EC2 instance where the application is running with permission to access the database.
    • Use AWS Systems Manager Parameter Store with the SecureString data type to store secrets.
    • Configure the application to store secrets in Amazon S3 object metadata.
    • Hard code the database secrets in the application code itself.
  4. A Developer writes an AWS Lambda function and uploads the code in a .ZIP file to Amazon S3. The Developer makes changes to the code and uploads a new .ZIP file to Amazon S3. However, Lambda executes the earlier code.

    How can the Developer fix this in the LEAST disruptive way?

    • Create another Lambda function and specify the new .ZIP file.
    • Call the update-function-code API.
    • Remove the earlier .ZIP file first, then add the new .ZIP file.
    • Call the create-alias API.
  5. An AWS Lambda function must read data from an Amazon RDS MySQL database in a VPC and also reach a public endpoint over the internet to get additional data.

    Which steps must be taken to allow the function to access both the RDS resource and the public endpoint? (Choose two.)

    • Modify the default configuration for the Lambda function to associate it with an Amazon VPC private subnet.
    • Modify the default network access control list to allow outbound traffic.
    • Add a NAT Gateway to the VPC.
    • Modify the default configuration of the Lambda function to associate it with a VPC public subnet.
    • Add an environmental variable to the Lambda function to allow outbound internet access.
  6. A Developer must build an application that uses Amazon DynamoDB. The requirements state that the items being stored in the DynamoDB table will be 7KB in size and that reads must be strongly consistent. The maximum read rate is 3 items per second, and the maximum write rate is 10 items per second.

    How should the Developer size the DynamoDB table to meet these requirements?

    • Read: 3 read capacity units
      Write: 70 write capacity units
    • Read: 6 read capacity units
      Write: 70 write capacity units
    • Read: 6 read capacity units
      Write: 10 write capacity units
    • Read: 3 read capacity units
      Write: 10 write capacity units
  7. A Developer is creating an AWS Lambda function to process a stream of data from an Amazon Kinesis Data Stream. When the Lambda function parses the data and encounters a missing field, it exits the function with an error. The function is generating duplicate records from the Kinesis stream. When the Developer looks at the stream output without the Lambda function, there are no duplicate records.

    What is the reason for the duplicates?

    • The Lambda function did not advance the Kinesis stream pointer to the next record after the error.
    • The Lambda event source used asynchronous invocation, resulting in duplicate records.
    • The Lambda function did not handle the error, and the Lambda service attempted to reprocess the data.
    • The Lambda function is not keeping up with the amount of data coming from the stream.
  8. A company maintains an application responsible for processing several thousand external callbacks each day. The company’s System administrators want to know how many callbacks are being received on a rolling basis, and they want this data available for 10 days.

    The company also wants the ability to issue automated alerts if the number of callbacks exceeds the defined thresholds.

    What is the MOST cost-effective way to address the need to track and alert on these statistics?

    • Push callback data to an Amazon RDS database that can be queried to show historical data and to alert on exceeded thresholds.
    • Push callback data to AWS X-Ray and use AWS Lambda to query, display, and alert on exceeded thresholds.
    • Push callback data to Amazon Kinesis Data Streams and invoke an AWS Lambda function that stores data in Amazon DynamoDB and sends the required alerts.
    • Push callback data to Amazon CloudWatch as a custom metric and use the CloudWatch alerting mechanisms to alert System Administrators.
  9. A company has a website that is developed in PHP and WordPress and is launched using AWS Elastic Beanstalk. There is a new version of the website that needs to be deployed in the Elastic Beanstalk environment. The company cannot tolerate having the website offline if an update fails. Deployments must have minimal impact and rollback as soon as possible.

    What deployment method should be used?

    • All at once
    • Rolling
    • Snapshots
    • Immutable
  10. A company has a multi-tiered web application on AWS. During a recent spike in traffic, one of the primary relational databases on Amazon RDS could not serve all the traffic. Some read queries for repeatedly accessed items failed, so users received error messages.

    What can be done to minimize the impact on database read queries MOST efficiently during future traffic spikes?

    • Use Amazon S3 to cache database query results.
    • Use Amazon RDS as a custom origin for Amazon CloudFront.
    • Use local storage and memory on Amazon EC2 instances to cache data.
    • Use Amazon ElastiCache in front of the primary database to cache data.
  11. A Development team currently supports an application that uses an in-memory store to save accumulated game results. Individual results are stored in a database. As part of migrating to AWS, the team needs to use automatic scaling. The team knows this will yield inconsistent results.

    Where should the team store these accumulated game results to BEST allow for consistent results without impacting performance?

    • Amazon S3
    • Amazon RDS
    • Amazon ElastiCache
    • Amazon Kinesis
  12. In a multi-container Docker environment in AWS Elastic Beanstalk, what is required to configure container instances in the environment?

    • An Amazon ECS task definition
    • An Amazon ECS cluster
    • A Dockerfile in an application package
    • A CLI for Elastic Beanstalk
  13. An application that runs on an Amazon EC2 instance needs to access and make API calls to multiple AWS services.

    What is the MOST secure way to provide access to the AWS services with MINIMAL management overhead?

    • Use AWS KMS to store and retrieve credentials.
    • Use EC2 instance profiles.
    • Use AWS root user to make requests to the application.
    • Store and retrieve credentials from AWS CodeCommit.
  14. A company is creating an application that will require users to access AWS services and allow them to reset their own passwords.

    Which of the following would allow the company to manage users and authorization while allowing users to reset their own passwords?

    • Amazon Cognito identify pools and AWS STS
    • Amazon Cognito identity pools and AWS IAM
    • Amazon Cognito user pools and AWS KMS
    • Amazon Cognito user pools and identity pools
  15. A company has three different environments: Development, QA, and Production. The company wants to deploy its code first in the Development environment, then QA, and then Production.

    Which AWS service can be used to meet this requirement?

    • Use AWS CodeCommit to create multiple repositories to deploy the application.
    • Use AWS CodeBuild to create, configure, and deploy multiple build application projects.
    • Use AWS Data Pipeline to create multiple data pipeline provisions to deploy the application.
    • Use AWS CodeDeploy to create multiple deployment groups.
  16. A company uses Amazon DynamoDB for managing and tracking orders. The DynamoDB table is partitioned based on the order date. The company receives a huge increase in orders during a sales event, causing DynamoDB writes to throttle, and the consumed throughput is far below the provisioned throughput.

    According to AWS best practices, how can this issue be resolved with MINIMAL costs?

    • Create a new DynamoDB table for every order date.
    • Increase the read and write capacity units of the DynamoDB table.
    • Add a random number suffix to the partition key values.
    • Add a global secondary index to the DynamoDB table.
  17. A company is providing services to many downstream consumers. Each consumer may connect to one or more services. This has resulted in a complex architecture that is difficult to manage and does not scale well. The company needs a single interface to manage these services to consumers.

    Which AWS service should be used to refactor this architecture?

    • AWS Lambda
    • AWS X-Ray
    • Amazon SQS
    • Amazon API Gateway
  18. A Developer is creating a serverless website with content that includes HTML files, images, videos, and JavaScript (client-side scripts).

    Which combination of services should the Developer use to create the website?

    • Amazon S3 and Amazon CloudFront
    • Amazon EC2 and Amazon ElastiCache
    • Amazon ECS and Redis
    • AWS Lambda and Amazon API Gateway
  19. A Development team has pushed out 10 applications running on several Amazon EC2 instances. The Operations team is asking for a graphical representation of one key performance metric for each application. These metrics should be available on one screen for easy monitoring.

    Which steps should the Developer take to accomplish this using Amazon CloudWatch?

    • Create a custom namespace with a unique metric name for each application.
    • Create a custom dimension with a unique metric name for each application.
    • Create a custom event with a unique metric name for each application.
    • Create a custom alarm with a unique metric name for each application.
  20. A Developer wants access to make the log data of an application running on an EC2 instance available to systems administrators.

    Which of the following enables monitoring of this metric in Amazon CloudWatch?

    • Retrieve the log data from CloudWatch using the GetMetricData API call.
    • Retrieve the log data from AWS CloudTrail using the LookupEvents API call.
    • Launch a new EC2 instance, configure Amazon CloudWatch Events, and then install the application.
    • Install the Amazon CloudWatch Logs agent on the EC2 instance that the application is running on.
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments