March 2019
Intermediate to advanced
168 pages
4h 33m
English
We created the IAM policies and roles manually in the AWS Management Console. We will now look at how we can create these using the AWS CLI.
Here is a JSON policy, dynamo-readonly-user-visits.json, that we have created under the ./IAM/ directory:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:BatchGetItem",
"dynamodb:DescribeTable",
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:Scan"
],
"Resource": [
"arn:aws:dynamodb:eu-west-1:000000000000: table/user-visits",
"arn:aws:dynamodb:eu-west-1:000000000000: table/user-visits-sam"
]
}
]
}
To summarize the policy, it says that we have Query and Scan access to two DynamoDB tables called user-visits that we created manually ...
Read now
Unlock full access