Skip to content

Instantly share code, notes, and snippets.

@purdoo
Last active February 22, 2019 00:29
Show Gist options
  • Save purdoo/ba643fd3296e538559a8c7a9f137ec14 to your computer and use it in GitHub Desktop.
Save purdoo/ba643fd3296e538559a8c7a9f137ec14 to your computer and use it in GitHub Desktop.
Detailed solutions to the AWS-CDA Sample Exam Question

The following sample exam questions can be found here: https://d0.awsstatic.com/training-and-certification/docs-dev-associate/AWS_certified_developer_associate_examsample.pdf

Which of the following statements about SQS is true?

A. Messages will be delivered exactly once and messages will be delivered in First in, First out order

B. Messages will be delivered exactly once and message delivery order is indeterminate

C. Messages will be delivered one or more times and messages will be delivered in First in, First out order

D. Messages will be delivered one or more times and message delivery order is indeterminate

Answer: D

Explanation: One of the defining characteristics of SQS is that messages will be delivered AT LEAST once. Another characteristic is that message delivery order is not guarenteed. You should remember that when designing applications/services that poll SQS, you should include the ability to deal with potential duplicate messages. If message order is important, you can look into alternatives like FIFO queues or multiple SQS queues to handle items that are prioritized differently

EC2 instances are launched from Amazon Machine Images (AMIs). A given public AMI:

A. can be used to launch EC2 instances in any AWS region

B. can only be used to launch EC2 instances in the same country as the AMI is stored

C. can only be used to launch EC2 instances in the same AWS region as the AMI is stored

D. can only be used to launch EC2 instances in the same AWS availability zone as the AMI is stored

Answer: C

Pretty self explanitory as AMIs are confined at the region-level. By extension, AMIs cannot be launched into another region and must first be copied to the other region. Similarily, API calls such as DescribeImages will list the AMIs that are available in the current region as opposed to globally.

Company B provides an online image recognition service and utilizes SQS to decouple system components for scalability. The SQS consumers poll the imaging queue as often as possible to keep endto-end throughput as high as possible. However, Company B is realizing that polling in tight loops is burning CPU cycles and increasing costs with empty responses. How can Company B reduce the number of empty responses?

A. Set the imaging queue VisibilityTimeout attribute to 20 seconds

B. Set the imaging queue ReceiveMessageWaitTimeSeconds attribute to 20 seconds

C. Set the imaging queue MessageRetentionPeriod attribute to 20 seconds

D. Set the DelaySeconds parameter of a message to 20 seconds

Answer: B

Which operation could return temporarily inconsistent results?

A. Getting an object from Amazon S3 after it was deleted

B. Getting an object from Amazon S3 after it was initially created

C. Selecting a row from an Amazon RDS database after it was inserted

D. Selecting a row from an Amazon RDS database after it was deleted

Answer: A

S3 has read after write consistency for newly created objects. Deleting objects could produce temporarily inconsistent results. RDS deals with relational databases, which do not suffer from the same potential consistency concerns that services like S3 DynamoDB do.

You have reached your account limit for the number of CloudFormation stacks in a region. How do you increase your limit?

A. Make an API call

B. Contact AWS

C. Use the console

D. You cannot increase your limit

Answer: B

Like S3 buckets per account (100) and DynamoDB tables per region (256), your CloudFormation stack limit (200) can be increased through contacting AWS. For these types of questions, the answer is almost never a work-around option...it's either you can increase your limit somehow or you simply cannot. Before going into the exam, it is advisable to read up on some limits that are classified as 'default' (can be increased somehow, usually through contacting AWS) and limits that are more or less set in stone (5TB max object size on S3, for example).

Which statements about DynamoDB are true? (Pick 2 correct answers)

A. DynamoDB uses a pessimistic locking model

B. DynamoDB uses optimistic concurrency control

C. DynamoDB uses conditional writes for consistency

D. DynamoDB restricts item access during reads

E. DynamoDB restricts item access during writes

Answer: B and C

What is one key difference between an Amazon EBS-backed and an instance-store backed instance?

A. Instance-store backed instances can be stopped and restarted

B. Auto scaling requires using Amazon EBS-backed instances

C. Amazon EBS-backed instances can be stopped and restarted

D. Virtual Private Cloud requires EBS backed instances

Answer: C

Remember that EBS-backed instances can be stopped and restarted since they maintain their data when stopped. Instance-store backed instances are ephemeral and are functionally wiped when the instance stops. Options B and D are false, there are no such requirements.

A corporate web application is deployed within an Amazon VPC, and is connected to the corporate data center via IPSec VPN. The application must authenticate against the on-premise LDAP server. Once authenticated, logged-in users can only access an S3 keyspace specific to the user. Which two approaches can satisfy the objectives?

A. The application authenticates against LDAP. The application then calls the IAM Security Service to login to IAM using the LDAP credentials. The application can use the IAM temporary credentials to access the appropriate S3 bucket.

B. The application authenticates against LDAP, and retrieves the name of an IAM role associated with the user. The application then calls the IAM Security Token Service to assume that IAM Role. The application can use the temporary credentials to access the appropriate S3 bucket.

C. The application authenticates against IAM Security Token Service using the LDAP credentials. The application uses those temporary AWS security credentials to access the appropriate S3 bucket.

D. Develop an identity broker which authenticates against LDAP, and then calls IAM Security Token Service to get IAM federated user credentials. The application calls the identity broker to get IAM federated user credentials with access to the appropriate S3 bucket.

E. Develop an identity broker which authenticates against IAM Security Token Service to assume an IAM Role to get temporary AWS security credentials. The application calls the identity broker to get AWS temporary security credentials with access to the appropriate S3 bucket.

Answer: B and D

Gonna be straight up with you...I memorized this specific question. Have fun!

You run an ad-supported photo sharing website using S3 to serve photos to visitors of your site. At some point you find out that other sites have been linking to the photos on your site, causing loss to your business. What is an effective method to mitigate this?

A. Use CloudFront distributions for static content.

B. Remove public read access and use signed URLs with expiry dates.

C. Block the IPs of the offending websites in Security Groups.

D. Store photos on an EBS volume of the web server.

Answer: B

Answer A will not work for actually mitigating your losses. C is blatantly unviable, unless your revenue loss was tied to a single user on a single device (and even then, how long before he/she starts using a VPN or discovers IP Spoofing?). D is just nonsense.

Your application is trying to upload a 6 GB file to Simple Storage Service and receive a "Your proposed upload exceeds the maximum allowed object size." error message. What is a possible solution for this?

A. None, Simple Storage Service objects are limited to 5 GB

B. Use the multi-part upload API for this object

C. Use the large object upload API for this object

D. Contact support to increase your object size limit

E. Upload to a different region

Answer: B

Option A is false since the limit for objects is 5TB. Option C is the right idea, but the wrong API name. Option D is not valid since S3 object limits cannot be increased through contacting AWS and also because 6GB is well within the valid limits for an S3 object. E would not work, and is also not a viable option in general since uploading to a different region is functionally not achieving what you may want.

@lasred
Copy link

lasred commented May 22, 2017

Thanks!! How did you find the answer to the LDAP one?

@nmvega
Copy link

nmvega commented Sep 8, 2018

For the very first question, it appears that the answer is A for FIFO SQS queues, and D and STANDARD SQS queues:

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-message-order

The question does not specify a particular kind of SQS queue, and perhaps this was a multi-answer question about them.

@philrice
Copy link

@nmvega - this set of questions is quite old and is for the older aws developer exam so Im guessing it was referencing standard sqs queues only as I think FIFO queues were only made available late 2016 - the exam questions often run a fair bit behind the actual ever changing reality of aws services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment