baopham/laravel-dynamodb

Question about dynamodb.php config file

Dumk0 opened this issue · 2 comments

Dumk0 commented

There is aws_iam_role block In the project config sample. What for it is?

Another thing I have faced, is that 'debug' takes much more memory and may cause Memory Limit Error on local dynamodb instance. Maybe this option should also be depending on DYNAMODB_DEBUG env var?

Similar guestion about dynamodb.php

There is token field but how can I acquire token from EC2 instance role?

I would like to access DynamoDB from Laravel on EC2 but I do not want to use ACCESS_KEY & SECRET.

If you've got an instance role associated with the EC2 instance, you can remove the access key, secret and token from the dynamodb.php file the AWS SDK is smart enough to grab this information for you.

You could, if you really wanted to, grab this information manually through the instance metadata api, however I would not recommend doing this.
You can read more here https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html