AWS Codestar-未经授权的DynamoDB

时间:2018-12-08 22:16:14

标签: amazon-web-services aws-lambda amazon-dynamodb amazon-iam aws-iam

我有一个codestar项目,该项目调用python lambda函数。此函数尝试将项目放入DynamoDB中。我收到以下错误:

"errorMessage": "An error occurred (AccessDeniedException) when calling the PutItem operation: User: arn:aws:sts::13556632xxxx:assumed-role/CodeStar-split-lambda-Execution/awscodestar-split-lambda-lambda-CreateUser-RBA73BJH7NHY is not authorized to perform: dynamodb:PutItem on resource: arn:aws:dynamodb:us-east-1:1355663xxxx:table/split-users" }

我在AmazonDynamoDBFullAccess角色中加入了AWSLambdaBasicExecutionRoleAWSLambdaInvocation-DynamoDBCodeStar-split-lambda-Execution策略,但仍然出现错误。

我也制定了自己的政策并尝试了。

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "dynamodb:*"
            ],
            "Resource": [
                "arn:aws:dynamodb:us-east-1:13556632xxxx:table/split-users"
            ]
        }
    ]
}

我如何获得dynamoDB的授权来放置物品?

0 个答案:

没有答案