Reputation: 2404
I'd like to use AWS Lambda and Cognito in a serverless architecture and was curious people's thoughts to use an S3 bucket for a user data store versus something like DynamoDb? What would be the pros/cons?
Upvotes: 2
Views: 2852
Reputation: 19738
You can use either one or both based on different types of user data and query needs. In addition you can also keep basic user profile data in Cognito Sync store.
AWS S3
AWS Dynamodb
Its a common pattern to use them together to get the best out of cost and performance by storing files in S3 and file metadata and frequently querying attributes in Dynamodb for fast queries. Also you can setup event driven patterns to update Dynamodb upon changes in S3.
Upvotes: 6
Reputation: 200682
Do you want to index, query and update the data quickly (DynamoDB)?
Or do you just want to store it in a flat file that has to be completely overwritten whenever it is updated and can't easily be queried for its contents (S3)?
Upvotes: 0