Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what the ideal way to query dynamoDB from web app?

I'm trying to query DynamoDB from my web application.

I successfully did that after using IAM and creating 3rd party Roles and make users log in my web app through Facebook or Google, my app obtained a token and created the AWS credentials.

Now, I want any user of my website, to be able to query one of my dynamoDB tables, which should be a public table, I tried doing that with Roles -mocking the previous way- but I always get an error"Missing credentials in config"?

How to avoid that? Is there a way to create AWS Credentials without a token from 3rd party and attach them to the IAM Role, or Did I have to create an IAM user instead with secret key, or is there any other better way to do that?

like image 224
Feras Alkhouri Avatar asked Jan 25 '15 21:01

Feras Alkhouri


1 Answers

It sounds like Amazon Cognito is what you need here. If you are looking for an example web application, a recent blog post was published on a sample application using Amazon Cognito to authenticate users to access a DynamoDB table. http://www.infoq.com/articles/mars-rover-application-DynamoDB

Specifically, you may find the section "Application authenticates user via Amazon Cognito" useful.

Hopefully that helps! Good luck!

like image 50
Daniela Miao Avatar answered Oct 02 '22 21:10

Daniela Miao