exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 188 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 188
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is creating an application that will give users the ability to store photos from their cellphones in the cloud. The application needs to support tens of thousands of users. The application uses an Amazon API Gateway REST API that is integrated with AWS Lambda functions to process the photos. The application stores details about the photos in Amazon DynamoDB.

Users need to create an account to access the application. In the application, users must be able to upload photos and retrieve previously uploaded photos. The photos will range in size from 300 KB to 5 MB.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos and details in the DynamoDB table. Retrieve previously uploaded photos directly from the DynamoDB table.
  • B. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
  • C. Create an IAM user for each user of the application during the sign-up process. Use IAM authentication to access the API Gateway API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
  • D. Create a user’s table in DynamoDB. Use the table to manage user accounts. Create a Lambda authorizer that validates user credentials against the users table. Integrate the Lambda authorizer with API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
jayvarma
1 year, 9 months ago
As it is not a good practice to create a new IAM user for each user that signs up for the application, Option C is ruled out. Amazon Cognito user pools primary purpose is to authenticate and authorize web and mobile applications. As the solution requires the application to store images that are between 300KB and 5MB in size, The idea of storing the images in the DynamoDB is ruled out because the object size in a dynamoDb table cannot exceed 400kb. The ideal solution for this problem would be to store the photos in S3 and store the object's key in the DynamoDB table. So, Option B is the right answer
upvoted 1 times
...
rcaliandro
1 year, 11 months ago
Selected Answer: B
Part 1) The authentication process is managed by Amazon Cognito users pools. For this reason we can exclude C and D (it's ridicolous to create a IAM user for each user) and can create an user table and manage the authentication but this doesn't meet the requirements because we want the least possible overhead. Since congnito user pools gives us only authorization mechanism, we have to create a cognito authorizer in API Gateway and use this authorizer when we release the methods in order to deny the requests for unauthorized access. So far A and B are both valid.
upvoted 2 times
rcaliandro
1 year, 11 months ago
Part 2) Since we have constraing regarding the pictures (size between 300KB and 5MB), we can't memorize those information on DynamoDB, because the limit for each row in DynamoDB is 400KB even if we don't have this constraint, it is better to memorize the uploaded pictures on a permanent storage rather than the DB. That's why it's better to use S3. Finally in order to retrieve the right object, we have to memorize a key (like the name of the bucket, path and object name) on DynamoDB plus other information, like the username, date and so on. Between A and B I would say that B is the correct one!
upvoted 2 times
...
...
rcaliandro
1 year, 11 months ago
Selected Answer: B
test BBB
upvoted 1 times
...
GARGMOH
2 years, 3 months ago
B is the answer which matches the requirement of the scenario.
upvoted 1 times
...
sichilam
2 years, 4 months ago
B it is
upvoted 2 times
...
BelloMio
2 years, 5 months ago
Why not A?
upvoted 1 times
Duded12121
2 years, 4 months ago
BBB because pictures are not stored in DynamoDB
upvoted 2 times
pancman
2 years, 3 months ago
You actually can store images in DynamoDB if the images are small in size. It is a NoSQL database, that's why it's possible. But the filesizes given in the question are too big to store in DynamoDB. Hence, the answer is B.
upvoted 1 times
GARGMOH
2 years, 3 months ago
You can refer the s3 bucket object link in DynamoDB which will make it more simpler way.
upvoted 1 times
...
...
...
Krok
2 years, 1 month ago
It's B. Because the max size of DynamoDB item is 400KB.
upvoted 1 times
...
...
michaldavid
2 years, 6 months ago
Selected Answer: B
bbbbbb
upvoted 1 times
...
k1kavi1
2 years, 6 months ago
Selected Answer: B
I agree
upvoted 1 times
k1kavi1
2 years, 6 months ago
DynamoDB Item limits :The maximum item size in DynamoDB is 400 KB, which includes both attribute name binary length (UTF-8 length) and attribute value lengths (again binary length). The attribute name counts towards the size limit. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ServiceQuotas.html Best practices for storing large items and attributes - https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-use-s3-too.html
upvoted 5 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...