Do you know you can allow the user or group of IAM users to access AWS DynamoDB table with a single policy. In this quick tutorial you will learn How to create IAM policy to access AWS DynamoDB table. Lets get started.
Prerequisites
- AWS account
Creating IAM Policy to Access DynamoDB table
- Version is Policy version which is fixed.
- Effect is Allow in each statement as we want to Allow users or group be able to list all the DynamoDB table.
- For Specific table effect is allow as we want user to perform any action on Mytable bucket.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListandDescribe",
"Effect": "Allow",
"Action": [
"dynamodb:List*",
"dynamodb:DescribeReservedCapacity*",
"dynamodb:DescribeLimits",
"dynamodb:DescribeTimeToLive"
],
"Resource": "*",
},
{
"Sid": "SpecificTable",
"Effect": "Allow",
"Action": [
"dynamodb:BatchGet*",
"dynamodb:DescribeStream",
"dynamodb:DescribeTable",
"dynamodb:Get*",
"dynamodb:Query",
"dynamodb:Scan",
"dynamodb:BatchWrite*",
"dynamodb:CreateTable",
"dynamodb:Delete*",
"dynamodb:Update*",
"dynamodb:PutItem"
],
"Resource": "arn:aws:dynamodb:*:*:table/MyTable"
}
]
}
Conclusion
This tutorial demonstrated that how to create IAM policy to access AWS DynamoDB table..