Skip to content

Instantly share code, notes, and snippets.

@prakshalj0512
Last active September 1, 2020 22:53
Show Gist options
  • Save prakshalj0512/1c10a53ba1ece57aeadad0ff1fc115c2 to your computer and use it in GitHub Desktop.
Save prakshalj0512/1c10a53ba1ece57aeadad0ff1fc115c2 to your computer and use it in GitHub Desktop.
AWS IAM Policy
/* UPDATE THE FOLLOWING VARIABLES IN THE CODE
s3-bucket-name: name of the S3 bucket
dynamodb-region: the region of the Dynamodb table (such as us-west-2)
dynamodb-act-no: the account number associated with the Dynamodb table (such as 657065845823
dynamodb-table-name: name of the Dynamodb table
*/
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": ["arn:aws:s3:::<s3-bucket-name>/*"]
},
{
"Effect": "Allow",
"Action": ["dynamodb:DescribeTable", "dynamodb:Scan"],
"Resource": [
"arn:aws:dynamodb:<dynamodb-region>:<dynamodb-act-no>:table/<dynamodb-table-name>*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment