Feras Alkhouri
Feras Alkhouri

Reputation: 349

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?

Upvotes: 8

Views: 2099

Answers (1)

Daniela Miao
Daniela Miao

Reputation: 1373

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!

Upvotes: 3

Related Questions