You are developing a new mobile application and are considering storing user preferences in AWS.2w This
would provide a more uniform cross-device experience to users using multiple mobile devices to access the
application. The preference data for each user is estimated to be 50KB in size Additionally 5 million customers
are expected to use the application on a regular basis. The solution needs to be cost-effective, highly available,
scalable and secure, how would you design a solution to meet the above requirements?
A.
Setup an RDS MySQL instance in 2 availability zones to store the user preference data. Deploy a public facing application on a server in front of the database to manage security and access
credentials
B.
Setup a DynamoDB table with an item for each user having the necessary attributes to hold the user
preferences. The mobile application will query the user preferences directly from the DynamoDB table. Utilize
STS. Web Identity Federation, and DynamoDB Fine Grained Access Control to authenticate and authorize
access.
C.
Setup an RDS MySQL instance with multiple read replicas in 2 availability zones to store the user preference
data .The mobile application will query the user preferences from the read replicas. Leverage the MySQL user
management and access privilege system to manage security and access credentials.
D.
Store the user preference data in S3 Setup a DynamoDB table with an item for each user and an item attribute
pointing to the user’ S3 object. The mobile application will retrieve the S3 URL from DynamoDB and then
access the S3 object directly utilize STS, Web identity Federation, and S3 ACLs to authenticate and authorize
access.
I assume B.
Or D looks better.
D is more complex and expensive, no way.
B is correct
I will go for B.
Source: https://aws.amazon.com/blogs/aws/fine-grained-access-control-for-amazon-dynamodb/
Here are some of the things that you can build using fine-grained access control:
A mobile app that displays information for nearby airports, based on the user’s location. The app can access and display attributes such airline names, arrival times, and flight numbers. However, it cannot access or display pilot names or passenger counts.
A mobile game which stores high scores for all users in a single table. Each user can update their own scores, but has no access to the other ones.
B looks correct.
D. User preferences are not going to change and s3 will allow for better costs and scalability.
I now think B. S3 ACLs are rally not used that much and are considered deprecated to bucket policies.
B
B is not a good choice because “…The mobile application will query the user preferences directly from the DynamoDB table…”
– This methodology require us to have DynamoDB to be published to the outside, so that it’s not so secure.
– It is also not a good way for scalability
Fine Grained access controls can be used to lock down DynamoDB so it can be accessed from a mobile app without an proxy tier acting as an intermediary, if you so desire:
https://aws.amazon.com/blogs/aws/fine-grained-access-control-for-amazon-dynamodb/
(Search that web page for “without the need for a middle-tier proxy as illustrated above”)
B is the right answer.
D is not the right answer because S3 doesn’t bring significant value while making it more complex. If the data size of each item is over 400K than it would be the right answer.
See http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#limits-items
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.
You have made a point here the preference data is only 50KB an S3 URL stored in dynamo db would be around 1KB would that significantly change the cost is what needs to be thought of also the total preference data based on my calculation is 250 TB
5.000.000 * 50KB = 250GB
I agree with Amit here
Storage with option be will be very expensive.
First 25 GB stored per month is free
$0.25 per GB-month thereafter
For 250TB of data, storing these data on S3 is cost effective than dynamodb.
Therefor my answer is D
B
B maybe good
I say D is the correct answer.
“cost-effective, highly available,scalable and secure,”
-For better performance, storing 1K on DynamoDB (just the URL) instead of the 50k data, will be faster!
-S3 will be cheaper and scale forever.