Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data doesn't go into DYNAMO DB #25

Open
tavleennagi opened this issue Aug 25, 2021 · 2 comments
Open

Data doesn't go into DYNAMO DB #25

tavleennagi opened this issue Aug 25, 2021 · 2 comments

Comments

@tavleennagi
Copy link

the entered data is not going into dynamo db and it pops the message well this is embarrassing everytime

@dalygbarron
Copy link

me 2

@alejandro-2awesome
Copy link

For anyone that will cross with this problem in the future. It took me for a while to workaround the problem.

Long story short, AWS changed how Elastic Beanstalk works a little bit.

In order to make the example work you need to do 2 things.

Step 1
In your Elastic Beanstalk environment settings:

  • Add to Environment properties (including the values for your account):
  • ACCESS_KEY_ID
  • SECRET_ACCESS_KEY

Step 2
then in the app.js before the following code:

var sns = new AWS.SNS(); var ddb = new AWS.DynamoDB();

Add this:

    AWS.config.update({
        region: process.env.AWS_REGION",
        accessKeyId: process.env.ACCESS_KEY_ID,
        secretAccessKey: process.env.SECRET_ACCESS_KEY
    });

With those 2 changes (and perhaps adding some IAM role if needed) the example app should work.

Note: Perhaps this is not the most security compliance way to solve this problem, but is a first step towards making the example work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants