The answer has already been given, but it is best practice to use the policy for your user or AWS role.
Get an object only from a specific table
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "dynamodb:DescribeTable", "dynamodb:GetItem" ], "Resource": "arn:aws:dynamodb:us-west-2:<account_number>:table/dev-panels" } ] }
Check
aws dynamodb describe-table
Put object
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "dynamodb:DescribeTable", "dynamodb:PutItem" ], "Resource": "arn:aws:dynamodb:us-west-2:<account_number>:table/dev-panels" } ] }
Allow all actions on one table.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllAPIActionsOnBooks", "Effect": "Allow", "Action": "dynamodb:*", "Resource": "arn:aws:dynamodb:us-west-2:123456789012:table/<youtable_name>" } ] }
To check a role or user
aws dynamodb put-item --table-name dev-panels --item file://user.json --return-consumed-capacity TOTAL
user.json
{ "Name": {"S": "adiii"}, }
Adiii
source share