Skip to the content.

Select the correct answers for each question, including multiple-choice options when applicable, and click Submit to view your results. The quiz calculates your score and percentage, highlighting any incorrect questions to help you identify areas for improvement.

Click on the Answer button for the correct answer and its explanation.

If this practice exam has been helpful to you please share it with others and react to this below.


Practice Exam 6

  1. An AWS Elastic Beanstalk application needs to be deployed in multiple regions and requires a different Amazon Machine Image (AMI) in each region. Which AWS CloudFormation template key can be used to specify the correct AMI for each region?

    • A. Parameters.
    • B. Outputs.
    • C. Mappings.
    • D. Resources.
    Answer

    Correct Answer: C

  2. A Developer wants to find a list of items in a global secondary index from an Amazon DynamoDB table. Which DynamoDB API call can the Developer use in order to consume the LEAST number of read capacity units?

    • A. Scan operation using eventually-consistent reads.
    • B. Query operation using strongly-consistent reads.
    • C. Query operation using eventually-consistent reads.
    • D. Scan operation using strongly-consistent reads.
    Answer

    Correct Answer: C

  3. A Developer has published an update to an application that is served to a global user base using Amazon CloudFront. After deploying the application, users are not able to see the updated changes. How can the Developer resolve this issue?

    • A. Remove the origin from the CloudFront configuration and add it again.
    • B. Disable forwarding of query strings and request headers from the CloudFront distribution configuration.
    • C. Invalidate all the application objects from the edge caches.
    • D. Disable the CloudFront distribution and enable it again to update all the edge locations.
    Answer

    Correct Answer: C

  4. A Developer must deploy a new AWS Lambda function using an AWS CloudFormation template. Which procedures will deploy a Lambda function? (Select TWO)

    • A. Upload the code to an AWS CodeCommit repository, then add a reference to it in an AWS::Lambda::Function resource in the template.
    • B. Create an AWS::Lambda::Function resource in the template, then write the code directly inside the CloudFormation template.
    • C. Upload a .ZIP file containing the function code to Amazon S3, then add a reference to it in an AWS::Lambda::Function resource in the template.
    • D. Upload a .ZIP file to AWS CloudFormation containing the function code, then add a reference to it in an AWS::Lambda::Function resource in the template.
    • E. Upload the function code to a private Git repository, then add a reference to it in an AWS::Lambda::Function resource in the template.
    Answer

    Correct Answer: BC

  5. How should custom libraries be utilized in AWS Lambda?

    • A. Host the library on Amazon S3 and reference to it from the Lambda function.
    • B. Install the library locally and upload a ZIP file of the Lambda function.
    • C. Import the necessary Lambda blueprint when creating the function.
    • D. Modify the function runtime to include the necessary library.
    Answer

    Correct Answer: B

  6. A company needs to secure its existing website running behind an Elastic Load Balancer. The website’s Amazon EC2 instances are CPU-constrained. What should be done to secure the website while not increasing the CPU load on the EC2 web servers? (Select TWO)

    • A. Configure an Elastic Load Balancer with SSL pass-through.
    • B. Configure SSL certificates on an Elastic Load Balancer.
    • C. Configure an Elastic Load Balancer with a Loadable Storage System.
    • D. Install SSL certificates on the EC2 instances.
    • E. Configure an Elastic Load Balancer with SSL termination.
    Answer

    Correct Answer: BE

  7. A Developer is writing an imaging micro service on AWS Lambda. The service is dependent on several libraries that are not available in the Lambda runtime environment. Which strategy should the Developer follow to create the Lambda deployment package?

    • A. Create a ZIP file with the source code and all dependent libraries.
    • B. Create a ZIP file with the source code and a script that installs the dependent libraries at runtime.
    • C. Create a ZIP file with the source code. Stage the dependent libraries on an Amazon S3 bucket indicated by the Lambda environment variable LD_LIBRARY_PATH.
    • D. Create a ZIP file with the source code and a buildspec.yaml file that installs the dependent libraries on AWS Lambda.
    Answer

    Correct Answer: A

  8. A Developer is designing a fault-tolerant environment where client sessions will be saved. How can the Developer ensure that no sessions are lost if an Amazon EC2 instance fails?

    • A. Use sticky sessions with an Elastic Load Balancer target group.
    • B. Use Amazon SQS to save session data.
    • C. Use Amazon DynamoDB to perform scalable session handling.
    • D. Use Elastic Load Balancer connection draining to stop sending requests to failing instances.
    Answer

    Correct Answer: C

  9. 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?

    • A. Use Amazon Glue to perform frequent ETL updates from the Accounts database to the Payments database.
    • B. Use Amazon ElastiCache in Payments, with the cache updated by triggers in the Accounts database.
    • C. Use Amazon Kinesis Data Firehose to deliver all changes from the Accounts database to the Payments database.
    • D. Use Amazon DynamoDB Streams to deliver all changes from the Accounts database to the Payments database.
    Answer

    Correct Answer: D

  10. A company needs a fully-managed source control service that will work in AWS. The service must ensure that revision control synchronizes multiple distributed repositories by exchanging sets of changes peer-to-peer. All users need to work productively even when not connected to a network. Which source control service should be used?

    • A. Subversion.
    • B. AWS CodeBuild.
    • C. AWS CodeCommit.
    • D. AWS CodeStar.
    Answer

    Correct Answer: C

  11. A Developer is writing a serverless application that requires that an AWS Lambda function be invoked every 10 minutes. What is an automated and serverless way to trigger the function?

    • A. Deploy an Amazon EC2 instance based on Linux, and edit its /etc/crontab file by adding a command to periodically invoke the Lambda function.
    • B. Configure an environment variable named PERIOD for the Lambda function. Set the value to 600.
    • C. Create an Amazon CloudWatch Events rule that triggers on a regular schedule to invoke the Lambda function.
    • D. Create an Amazon SNS topic that has a subscription to the Lambda function with a 600-second timer.
    Answer

    Correct Answer: C

  12. A company is building an application to track athlete performance using an Amazon DynamoDB table. Each item in the table is identified by a partition key (user_id) and a sort key (sport_name). The table design is shown below. (Note: Not all table attributes are shown) A Developer is asked to write a leaderboard application to display the top performers (user_id) based on the score for each sport_name. What process will allow the Developer to extract results MOST efficiently from the DynamoDB table? Question 337 - A. Use a DynamoDB query operation with the key attributes of user_id and sport_name and order the results based on the score attribute. - B. Create a global secondary index with a partition key of sport_name and a sort key of score, and get the results. - C. Use a DynamoDB scan operation to retrieve scores and user_id based on sport_name, and order the results based on the score attribute. - D. Create a local secondary index with a primary key of sport_name and a sort key of score and get the results based on the score attribute.

    <details markdown=1><summary markdown="span">Answer</summary>
    
    Correct Answer: B
    
    </details>
    
  13. A Developer is creating a mobile application that will not require users to log in. What is the MOST efficient method to grant users access to AWS resources?

    • A. Use an identity provider to securely authenticate with the application.
    • B. Create an AWS Lambda function to create an IAM user when a user accesses the application.
    • C. Create credentials using AWS KMS and apply these credentials to users when using the application.
    • D. Use Amazon Cognito to associate unauthenticated users with an IAM role that has limited access to resources.
    Answer

    Correct Answer: D

  14. An application running on Amazon EC2 instances must access objects within an Amaon S3 busket that are encrypted using server-side encryption using AWS KMS encryption keys (SSE-KMS). The application must have access to the customer master key (CMK) to decrypt the objects. Which combination of steps will grant the application access? (Select TWO)

    • A. Write an S3 bucket policy that grants the bucket access to the key.
    • B. Grant access to the key in the IAM EC2 role attached to the application’s EC2 instances.
    • C. Write a key policy that enables IAM policies to grant access to the key.
    • D. Grant access to the key in the S3 bucket’s ACL.
    • E. Create a Systems Manager parameter that exposes the KMS key to the EC2 instances.
    Answer

    Correct Answer: AB

  15. What does an Amazon SQS delay queue accomplish?

    • A. Messages are hidden for a configurable amount of time when they are first added to the queue.
    • B. Messages are hidden for a configurable amount of time after they are consumed from the queue.
    • C. The consumer can poll the queue for a configurable amount of time before retrieving a message.
    • D. Message cannot be deleted for a configurable amount of time after they are consumed from the queue.
    Answer

    Correct Answer: A

  16. A company has multiple Developers located across the globe who are updating code incrementally for a development project. When Developers upload code concurrently, internet connectivity is slow and it is taking a long time to upload code for deployment in AWS Elastic Beanstalk. Which step will result in minimized upload and deployment time with the LEAST amount of administrative effort?

    • A. Allow the Developers to upload the code to an Amazon S3 bucket, and deploy it directly to Elastic Beanstalk.
    • B. Allow the Developers to upload the code to a central FTP server to deploy the application to Elastic Beanstalk.
    • C. Create an AWS CodeCommit repository, allow the Developers to commit code to it, and then directly deploy the code to Elastic Beanstalk.
    • D. Create a code repository on an Amazon EC2 instance so that all Developers can update the code, and deploy the application from the instance to Elastic Beanstalk.
    Answer

    Correct Answer: C

  17. A company recently migrated its web, application and NoSQL database tiers to AWS. The company is using Auto Scaling to scale the web and application tiers. More than 95 percent of the Amazon DynamoDB requests are repeated read requests. How can the DynamoDB NoSQL tier be scaled up to cache these repeated requests?

    • A. Amazon EMR.
    • B. Amazon DynamoDB Accelerator.
    • C. Amazon SQS.
    • D. Amazon CloudFront.
    Answer

    Correct Answer: B

  18. A Development team is working on a case management solution that allows medical claims to be processed and reviewed. Users log in to provide information related to their medical and financial situations. As part of the application, sensitive documents such as medical records, medical imaging, bank statements, and receipts are uploaded to Amazon S3. All documents must be securely transmitted and stored. All access to the documents must be recorded for auditing. What is the MOST secure approach?

    • A. Use S3 default encryption using Advanced Encryption Standard-256 (AES-256) on the destination bucket.
    • B. Use Amazon Cognito for authorization and authentication to ensure the security of the application and documents.
    • C. Use AWS Lambda to encrypt and decrypt objects as they are placed into the S3 bucket.
    • D. Use client-side encryption/decryption with Amazon S3 and AWS KMS.
    Answer

    Correct Answer: D

  19. A company has an internet-facing application that uses Web Identity Federation to obtain a temporary credential from AWS Security Token Service (AWS STS). The app then uses the token to access AWS services. Review the following response: Based on the response displayed what permissions are associated with the call from the application? Question 344

    • A. Permissions associated with the role AROACLKWSDQRAOEXAMPLE:app1.
    • B. Permissions associated with the default role used when the AWS service was built.
    • C. Permission associated with the IAM principal that owns the AccessKeyID ASgeIAIOSFODNN7EXAMPLE.
    • D. Permissions associated with the account that owns the AWS service.
    Answer

    Correct Answer: C

  20. A Developer is using AWS CLI, but when running list commands on a large number of resources, it is timing out. What can be done to avoid this time-out?

    • A. Use pagination.
    • B. Use shorthand syntax.
    • C. Use parameter values.
    • D. Use quoting strings.
    Answer

    Correct Answer: A

  21. Where can PortMapping be defined when launching containers in Amazon ECS?

    • A. Security groups.
    • B. Amazon Elastic Container Registry (Amzon ECR).
    • C. Container agent.
    • D. Task definition.
    Answer

    Correct Answer: D

  22. An organization is storing large files in Amazon S3, and is writing a web application to display meta-data about the files to end-users. Based on the metadata a user selects an object to download. The organization needs a mechanism to index the files and provide single-digit millisecond latency retrieval for the metadata. What AWS service should be used to accomplish this?

    • A. Amazon DynamoDB.
    • B. Amazon EC2.
    • C. AWS Lambda.
    • D. Amazon RDS.
    Answer

    Correct Answer: A

  23. While developing an application that runs on Amazon EC2 in an Amazon VPC, a Developer identifies the need for centralized storage of application-level logs. Which AWS service can be used to securely store these logs?

    • A. Amazon EC2 VPC Flow Logs.
    • B. Amazon CloudWatch Logs.
    • C. Amazon CloudSearch.
    • D. AWS CloudTrail
    Answer

    Correct Answer: B

  24. A stock market monitoring application uses Amazon Kinesis for data ingestion. During simulated tests of peak data rates, the Kinesis stream cannot keep up with the incoming data. What step will allow Kinesis to accommodate the traffic during peak hours?

    • A. Install the Kinesis Producer Library (KPL) for ingesting data into the stream.
    • B. Reduce the data retention period to allow for more data ingestion using DecreaseStreamRetentionPeriod.
    • C. Increase the shard count of the stream using UpdateShardCount.
    • D. Ingest multiple records into the stream in a single call using PutRecords.
    Answer

    Correct Answer: A

  25. A company has an AWS CloudFormation template that is stored as a single file. The template is able to launch and create a full infrastructure stack. Which best practice would increase the maintainability of the template?

    • A. Use nested stacks for common template patterns.
    • B. Embed credentials to prevent typos.
    • C. Remove mappings to decrease the number of variables.
    • D. Use AWS::Include to reference publicly-hosted template files.
    Answer

    Correct Answer: A

  26. An on-premises application makes repeated calls to store files to Amazon S3. As usage of the application has increased, LimitExceeded errors are being logged. What should be changed to fix this error?

    • A. Implement exponential backoffs in the application.
    • B. Load balance the application to multiple servers.
    • C. Move the application to Amazon EC2.
    • D. Add a one second delay to each API call.
    Answer

    Correct Answer: A

  27. A company caches session information for a web application in an Amazon DynamoDB table. The company wants an automated way to delete old items from the table. What is the simplest way to do this?

    • A. Write a script that deletes old records; schedule the scripts as a cron job on an Amazon EC2 instance.
    • B. Add an attribute with the expiration time; enable the Time To Live feature based on that attribute.
    • C. Each day, create a new table to hold session data; delete the previous day’s table.
    • D. Add an attribute with the expiration time; name the attribute ItemExpiration.
    Answer

    Correct Answer: B

  28. An application is expected to process many files. Each file takes four minutes to process each AWS Lambda invocation. The Lambda function does not return any important data. What is the fastest way to process all the files?

    • A. First split the files to make them smaller, then process with synchronous RequestResponse Lambda invocations.
    • B. Make synchronous RequestResponse Lambda invocations and process the files one by one.
    • C. Make asynchronous Event Lambda invocations and process the files in parallel.
    • D. First join all the files, then process it all at once with an asynchronous Event Lambda invocation.
    Answer

    Correct Answer: C

  29. The upload of a 15 GB object to Amazon S3 fails. The error message reads: Your proposed upload exceeds the maximum allowed object size.. What technique will allow the Developer to upload this object?

    • A. Upload the object using the multi-part upload API.
    • B. Upload the object over an AWS Direct Connect connection.
    • C. Contact AWS Support to increase the object size limit.
    • D. Upload the object to another AWS region.
    Answer

    Correct Answer: A

  30. AWS CodeBuild builds code for an application, creates the Docker image, pushes the image to Amazon Elastic Container Registry (Amazon ECR), and tags the image with a unique identifier. If the Developers already have AWS CLI configured on their workstations, how can the Docker images be pulled to the workstations?

    • A. Run the following: docker pull REPOSITORY URI : TAG.
    • B. Run the output of the following: aws ecr get-login and then run: docker pull REPOSITORY URI : TAG.
    • C. Run the following: aws ecr get-login and then run: docker pull REPOSITORY URI : TAG.
    • D. Run the output of the following: aws ecr get-download-url-for-layer and then run: docker pull REPOSITORY URI : TAG.
    Answer

    Correct Answer: B

  31. A web application is designed to allow new users to create accounts using their email addresses. The application will store attributes for each user, and is expecting millions of user to sign up. What should the Developer implement to achieve the design goals?

    • A. Amazon Cognito user pools.
    • B. AWS Mobile Hub user data storage.
    • C. Amazon Cognito Sync.
    • D. AWS Mobile Hub cloud logic.
    Answer

    Correct Answer: A

  32. A company needs a new REST API that can return information about the contents of an Amazon S3 bucket, such as a count of the objects stored in it. The company has decided that the new API should be written as a microservice using AWS Lambda and Amazon API Gateway. How should the Developer ensure that the microservice has the necessary access to the Amazon S3 bucket, while adhering to security best practices?

    • A. Create an IAM user that has permissions to access the Amazon S3 bucket, and store the IAM user credentials in the Lambda function source code.
    • B. Create an IAM role that has permissions to access the Amazon S3 bucket and assign it to the Lambda function as its execution role.
    • C. Create an Amazon S3 bucket policy that specifies the Lambda service as its principal and assign it to the Amazon S3 bucket.
    • D. Create an IAM role, attach the AmazonS3FullAccess managed policy to it, and assign the role to the Lambda function as its execution role.
    Answer

    Correct Answer: B

  33. An organization is using Amazon CloudFront to ensure that its users experience low-latency access to its web application. The organization has identified a need to encrypt all traffic between users and CloudFront, and all traffic between CloudFront and the web application. How can these requirements be met? (Choose TWO)

    • A. Use AWS KMS to encrypt traffic between CloudFront and the web application.
    • B. Set the Origin Protocol Policy to HTTPS Only.
    • C. Set the Origin’s HTTP Port to 443.
    • D. Set the Viewer Protocol Policy to HTTPS Only or Redirect HTTP to HTTPS.
    • E. Enable the CloudFront option Restrict Viewer Access.
    Answer

    Correct Answer: BD

  34. An application is using Amazon DynamoDB as its data store, and should be able to read 100 items per second as strongly consistent reads. Each item is 5 KB in size. To what value should the table’s provisioned read throughput be set?

    • A. 50 read capacity units.
    • B. 100 read capacity units.
    • C. 200 read capacity units.
    • D. 500 read capacity units.
    Answer

    Correct Answer: C

  35. An application uses Lambda functions to extract metadata from files uploaded to an S3 bucket; the metadata is stored in Amazon DynamoDB. The application starts behaving unexpectedly, and the Developer wants to examine the logs of the Lambda function code for errors. Based on this system configuration, where would the Developer find the logs?

    • A. Amazon S3.
    • B. AWS CloudTrail.
    • C. Amazon CloudWatch.
    • D. Amazon DynamoDB
    Answer

    Correct Answer: C

  36. A Developer is creating a Lambda function that will generate and export a file. The function requires 100 MB of temporary storage for temporary files while executing. These files will not be needed after the function is complete. How can the Developer MOST efficiently handle the temporary files?

    • A. Store the files in EBS and delete the files at the end of the Lambda function.
    • B. Copy the files to EFS and delete the files at the end of the Lambda function.
    • C. Store the files in the /tmp directory and delete the files at the end of the Lambda function.
    • D. Copy the files to an S3 bucket with a lifecycle policy to delete the files.
    Answer

    Correct Answer: C

  37. A Developer has developed a web application and wants to deploy it quickly on a Tomcat server on AWS. The Developer wants to avoid having to manage the underlying infrastructure. What is the easiest way to deploy the application, based on these requirements?

    • A. AWS CloudFormation.
    • B. AWS Elastic Beanstalk.
    • C. Amazon S3.
    • D. AWS CodePipeline
    Answer

    Correct Answer: B

  38. An application runs on multiple EC2 instances behind an ELB. Where is the session data best written so that it can be served reliably across multiple requests?

    • A. Write data to Amazon ElastiCache.
    • B. Write data to Amazon Elastic Block Store.
    • C. Write data to Amazon EC2 Instance Store.
    • D. Write data to the root filesystem.
    Answer

    Correct Answer: A

  39. A company is migrating from a monolithic architecture to a microservices-based architecture. The Developers need to refactor the application so that the many microservices can asynchronously communicate with each other without impacting performance. Use of which managed AWS services will enable asynchronous message passing? (Choose TWO)

    • A. Amazon SQS.
    • B. Amazon Cognito.
    • C. Amazon Kinesis.
    • D. Amazon SNS.
    • E. Amazon ElastiCache.
    Answer

    Correct Answer: AD

  40. According to best practice, how should access keys be managed in AWS? (Choose TWO)

    • A. Use the same access key in all applications for consistency.
    • B. Delete all access keys for the account root user.
    • C. Leave unused access keys in the account for tracking purposes.
    • D. Embed and encrypt access keys in code for continuous deployment.
    • E. Use Amazon IAM roles instead of access keys where possible.
    Answer

    Correct Answer: BE

  41. An application running on an Amazon Linux EC2 instance needs to manage the AWS infrastructure. How can the EC2 instance be configured to make AWS API calls securely?

    • A. Sign the AWS CLI command using the signature version 4 process.
    • B. Run the aws configure AWS CLI command and specify the access key id and secret access key.
    • C. Specify a role for the EC2 instance with the necessary privileges.
    • D. Pass the access key id and secret access key as parameters for each AWS CLI command.
    Answer

    Correct Answer: C

  42. An application needs to use the IP address of the client in its processing. The application has been moved into AWS and has been placed behind an Application Load Balancer (ALB). However, all the client IP addresses now appear to be the same. The application must maintain the ability to scale horizontally. Based on this scenario, what is the MOST cost-effective solution to this problem?

    • A. Remove the application from the ALB. Delete the ALB and change Amazon Route 53 to direct traffic to the instance running the application.
    • B. Remove the application from the ALB. Create a Classic Load Balancer in its place. Direct traffic to the application using the HTTP protocol.
    • C. Alter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header.
    • D. Alter the application code to inspect a custom header. Alter the client code to pass the IP address in the custom header.
    Answer

    Correct Answer: C

  43. A development team is using AWS Elastic Beanstalk to deploy a two-tier application that consists of a load-balanced web tier and an Amazon RDS database tier in production. The team would like to separate the RDS instance from the Elastic Beanstalk. How can this be accomplished?

    • A. Use the Elastic Beanstalk CLI to disassociate the database.
    • B. Use the AWS CLI to disassociate the database.
    • C. Change the deployment policy to disassociate the database.
    • D. Recreate a new Elastic Beanstalk environment without Amazon RDS.
    Answer

    Correct Answer: D

  44. A company is using AWS CodePipeline to deliver one of its applications. The delivery pipeline is triggered by changes to the master branch of an AWS CodeCommit repository and uses AWS CodeBuild to implement the test and build stages of the process and AWS CodeDeploy to deploy the application. The pipeline has been operating successfully for several months and there have been no modifications. Following a recent change to the application’s source code, AWS CodeDeploy has not deployed the updates application as expected. What are the possible causes? (Choose TWO)

    • A. The change was not made in the master branch of the AWS CodeCommit repository.
    • B. One of the earlier stages in the pipeline failed and the pipeline has terminated.
    • C. One of the Amazon EC2 instances in the company’s AWS CodePipeline cluster is inactive.
    • D. The AWS CodePipeline is incorrectly configured and is not executing AWS CodeDeploy.
    • E. AWS CodePipeline does not have permissions to access AWS CodeCommit.
    Answer

    Correct Answer: AB

  45. A social media company is using Amazon Cognito in order to synchronize profiles across different mobile devices, to enable end users to have a seamless experience. Which of the following configurations can be used to silently notify users whenever an update is available on all other devices?

    • A. Modify the user pool to include all the devices which keep them in sync.
    • B. Use the SyncCallback interface to receive notifications on the application.
    • C. Use an Amazon Cognito stream to analyze the data and push the notifications.
    • D. Use the push synchronization feature with the appropriate IAM role.
    Answer

    Correct Answer: D

  46. An on-premises application is implemented using a Linux, Apache, MySQL and PHP (LAMP) stack. The Developer wants to run this application in AWS. Which of the following sets of AWS services can be used to run this stack?

    • A. Amazon API Gateway, Amazon S3.
    • B. AWS Lambda, Amazon DynamoDB.
    • C. Amazon EC2, Amazon Aurora.
    • D. Amazon Cognito, Amazon RDS.
    • E. Amazon ECS, Amazon EBS.
    Answer

    Correct Answer: C

  47. An application displays a status dashboard. The status is updated by 1 KB messages from an SQS queue. Although the status changes infrequently, the Developer must minimize the time between the message arrival in the queue and the dashboard update. What technique provides the shortest delay in updating the dashboard?

    • A. Retrieve the messages from the queue using long polling every 20 seconds.
    • B. Reduce the size of the messages by compressing them before sending.
    • C. Retrieve the messages from the queue using short polling every 10 seconds.
    • D. Reduce the size of each message payload by sending it in two parts.
    Answer

    Correct Answer: A

  48. An on-premises legacy application is caching data files locally and writing shared images to local disks. What is necessary to allow for horizontal scaling when migrating the application to AWS?

    • A. Modify the application to have both shared images and caching data written to Amazon EBS.
    • B. Modify the application to read and write cache data on Amazon S3, and also store shared images on S3.
    • C. Modify the application to use Amazon S3 for serving shared images; cache data can then be written to local disks.
    • D. Modify the application to read and write cache data on Amazon S3, while continuing to write shared images to local disks.
    Answer

    Correct Answer: B

  49. A Developer must trigger an AWS Lambda function based on the item lifecycle activity in an Amazon DynamoDB table. How can the Developer create the solution?

    • A. Enable a DynamoDB stream that publishes an Amazon SNS message. Trigger the Lambda function synchronously from the SNS message.
    • B. Enable a DynamoDB stream that publishes an SNS message. Trigger the Lambda function asynchronously from the SNS message.
    • C. Enable a DynamoDB stream, and trigger the Lambda function synchronously from the stream.
    • D. Enable a DynamoDB stream, and trigger the Lambda function asynchronously from the stream.
    Answer

    Correct Answer: C

  50. After installing the AWS CLI, a Developer tries to run the command aws configure but receives the following error: Error: aws: command not found. What is the most likely cause of this error?

    • A. The aws executable is not in the PATH environment variable.
    • B. Access to the aws executable has been denied to the installer.
    • C. Incorrect AWS credentials were provided.
    • D. The aws script does not have an executable file mode.
    Answer

    Correct Answer: A

  51. The Developer for a retail company must integrate a fraud detection solution into the order processing solution. The fraud detection solution takes between ten and thirty minutes to verify an order. At peak, the web site can receive one hundred orders per minute. What is the most scalable method to add the fraud detection solution to the order processing pipeline?

    • A. Add all new orders to an Amazon SQS queue. Configure a fleet of 10 EC2 instances spanning multiple AZs with the fraud detection solution installed on them to pull orders from this queue. Update the order with a pass or fails status.
    • B. Add all new orders to an SQS queue. Configure an Auto Scaling group that uses the queue depth metric as its unit of scale to launch a dynamically-sized fleet of EC2 instances spanning multiple AZs with the fraud detection solution installed on them to pull orders from this queue. Update the order with a pass or fails status.
    • C. Add all new orders to an Amazon Kinesis Stream. Subscribe a Lambda function to automatically read batches of records from the Kinesis Stream. The Lambda function includes the fraud detection software and will update the order with a pass or fail status.
    • D. Write all new orders to Amazon DynamoDB. Configure DynamoDB Streams to include all new orders. Subscribe a Lambda function to automatically read batches of records from the Kinesis Stream. The Lambda function includes the fraud detection software and will update the order with a pass or fail status.
    Answer

    Correct Answer: B

  52. When a Developer tries to run an AWS CodeBuild project, it raises an error because the length of all environment variables exceeds the limit for the combined maximum of characters. What is the recommended solution?

    • A. Add the export LC_ALL="en_US.utf8" command to the pre_build section to ensure POSIX localization.
    • B. Use Amazon Cognito to store key-value pairs for large numbers of environment variables.
    • C. Update the settings for the build project to use an Amazon S3 bucket for large numbers of environment variables.
    • D. Use AWS Systems Manager Parameter Store to store large numbers of environment variables.
    Answer

    Correct Answer: D

  53. A set of APIs are exposed to customers using the Amazon API Gateway. These APIs have caching enabled on the API Gateway. Customers have asked for an option to invalidate this cache for each of the APIs. What action can be taken to allow API customers to invalidate the API Cache?

    • A. Ask customers to use AWS credentials to call the InvalidateCache API.
    • B. Ask customers to invoke an AWS API endpoint which invalidates the cache.
    • C. Ask customers to pass an HTTP header called Cache-Control:max-age=0.
    • D. Ask customers to add a query string parameter called INVALIDATE_CACHE when making an API call.
    Answer

    Correct Answer: C

  54. A Developer has been asked to build a real-time dashboard web application to visualize the key prefixes and storage size of objects in Amazon S3 buckets. Amazon DynamoDB will be used to store the Amazon S3 metadata. What is the optimal and MOST cost-effective design to ensure that the real-time dashboard is kept up to date with the state of the objects in the Amazon S3 buckets?

    • A. Use an Amazon CloudWatch event backed by an AWS Lambda function. Issue an Amazon S3 API call to get a list of all Amazon S3 objects and persist the metadata within DynamoDB. Have the web application poll the DynamoDB table to reflect this change.
    • B. Use Amazon S3 Event Notification backed by a Lambda function to persist the metadata into DynamoDB. Have the web application poll the DynamoDB table to reflect this change.
    • C. Run a cron job within an Amazon EC2 instance to list all objects within Amazon S3 and persist the metadata into DynamoDB. Have the web application poll the DynamoDB table to reflect this change.
    • D. Create a new Amazon EMR cluster to get all the metadata about Amazon S3 objects; persist the metadata into DynamoDB. Have the web application poll the DynamoDB table to reflect this change.
    Answer

    Correct Answer: B

  55. A Developer must repeatedly and consistently deploy a serverless RESTful API on AWS. Which techniques will work? (Choose TWO)

    • A. Define a Swagger file. Use AWS Elastic Beanstalk to deploy the Swagger file.
    • B. Define a Swagger file. Use AWS CodeDeploy to deploy the Swagger file.
    • C. Deploy a SAM template with an inline Swagger definition.
    • D. Define a Swagger file. Deploy a SAM template that references the Swagger file.
    • E. Define an inline Swagger definition in a Lambda function. Invoke the Lambda function.
    Answer

    Correct Answer: CD

  56. An existing serverless application processes uploaded image files. The process currently uses a single Lambda function that takes an image file, performs the processing, and stores the file in Amazon S3. Users of the application now require thumbnail generation of the images. Users want to avoid any impact to the time it takes to perform the image uploads. How can thumbnail generation be added to the application, meeting user requirements while minimizing changes to existing code?

    • A. Change the existing Lambda function handling the uploads to create thumbnails at the time of upload. Have the function store both the image and thumbnail in Amazon S3.
    • B. Create a second Lambda function that handles thumbnail generation and storage. Change the existing Lambda function to invoke it asynchronously.
    • C. Create an S3 event notification with a Lambda function destination. Create a new Lambda function to generate and store thumbnails.
    • D. Create an S3 event notification to an SQS Queue. Create a scheduled Lambda function that processes the queue, and generates and stores thumbnails.
    Answer

    Correct Answer: C

  57. A company is using Amazon API Gateway to manage access to a set of microservices implemented as AWS Lambda functions. Following a bug report, the company makes a minor breaking change to one of the APIs. In order to avoid impacting existing clients when the new API is deployed, the company wants to allow clients six months to migrate from v1 to v2. Which approach should the Developer use to handle this change?

    • A. Update the underlying Lambda function and provide clients with the new Lambda invocation URL.
    • B. Use API Gateway to automatically propagate the change to clients, specifying 180 days in the phased deployment parameter.
    • C. Use API Gateway to deploy a new stage named v2 to the API and provide users with its URL.
    • D. Update the underlying Lambda function, create an Amazon CloudFront distribution with the updated Lambda function as its origin.
    Answer

    Correct Answer: C

  58. A company developed a set of APIs that are being served through the Amazon API Gateway. The API calls need to be authenticated based on OpenID identity providers such as Amazon or Facebook. The APIs should allow access based on a custom authorization model. Which is the simplest and MOST secure design to use to build an authentication and authorization model for the APIs?

    • A. Use Amazon Cognito user pools and a custom authorizer to authenticate and authorize users based on JSON Web Tokens.
    • B. Build a OpenID token broker with Amazon and Facebook. Users will authenticate with these identify providers and pass the JSON Web Token to the API to authenticate each API call.
    • C. Store user credentials in Amazon DynamoDB and have the application retrieve temporary credentials from AWS STS. Make API calls by passing user credentials to the APIs for authentication and authorization.
    • D. Use Amazon RDS to store user credentials and pass them to the APIs for authentications and authorization.
    Answer

    Correct Answer: A

  59. Where should an Elastic Beanstalk configuration file named healthcheckur1.config be placed in the application source bundle?

    • A. In the root of the application.
    • B. In the bin folder.
    • C. In healthcheckur1.config.ebextension under root.
    • D. In the .ebextensions folder.
    Answer

    Correct Answer: D

  60. A Developer has implemented a Lambda function that needs to add new customers to an RDS database that is expected to run hundreds of times per hour. The Lambda function is configured to use 512MB of RAM and is based on the following pseudo code. After testing the Lambda function, the Developer notices that the Lambda execution time is much longer than expected. What should the Developer do to improve performance? Question 385

    • A. Increase the amount of RAM allocated to the Lambda function, which will increase the number of threads the Lambda can use.
    • B. Increase the size of the RDS database to allow for an increased number of database connections each hour.
    • C. Move the database connection and close statement out of the handler. Place the connection in the global space.
    • D. Replace RDS wit Amazon DynamoDB to implement control over the number of writes per second.
    Answer
    Correct Answer: C
    
  61. A static website is hosted in an Amazon S3 bucket. Several HTML pages on the site use JavaScript to download images from another Amazon S3 bucket. These images are not displayed when users browse the site. What is the possible cause for the issue?

    • A. The referenced Amazon S3 bucket is in another region.
    • B. The images must be stored in the same Amazon S3 bucket.
    • C. Port 80 must be opened on the security group in which the Amazon S3 bucket is located.
    • D. Cross Origin Resource Sharing must be enabled on the Amazon S3 bucket.
    Answer

    Correct Answer: D

  62. Amazon S3 has the following structure: S3://BUCKET/FOLDERNAME/FILENAME.zip. Which S3 best practice would optimize performance with thousands of PUT request each second to a single bucket?

    • A. Prefix folder names with user id; for example, s3://BUCKET/2013-FOLDERNAME/FILENAME.zip.
    • B. Prefix file names with timestamps; for example, s3://BUCKET/FOLDERNAME/2013-26-05-15-00-00-FILENAME.zip.
    • C. Prefix file names with random hex hashes; for example, s3://BUCKET/FOLDERNAME/23a6-FILENAME.zip.
    • D. Prefix folder names with random hex hashes; for example, s3://BUCKET/23a6-FOLDERNAME/FILENAME.zip.
    Answer

    Correct Answer: D