Where can I find my dynamoDB table's ARN?

0

Hi, I'm building a project which consists of a php lambda that can write items to dynamoDB, in short.

My DynamoDB table has been created manually in the same region as my CF stack. I need to update my CF template's IAM policy in order to allow various actions for dynamoDB. Here is my policy

{
    "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"
        }
    ]
}

I just need to put my tables' real ARN into the "Resource" index. But I cannot find it in AWS console. How can I get it? Thanks for reading, Best regards

2 Answers
0
Accepted Answer

You can find the table's ARN in the console by opening the table and expanding the "Additional info" section under the "General information" section.

EXPERT
answered a year ago
profile picture
EXPERT
reviewed a year ago
  • thanks! I figured it out, it's easy to reconstruct with userID and table name but yes, very helpful.

0

...found it ARN is easily constructed from your account and table details it's arn:aws:dynamodb:{region}:{userID}:table/{tableName}

answered a year ago
  • small correction, it's accountID instead of userID (i.e. a bit more general):

    arn:aws:dynamodb:{region}:{accountID}:table/{tableName}

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions