1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
"AmazonKinesisFullAccess" and "AWSLambda_FullAccess" do not have enough policies to execute put_item in DynamoDB.
Therefore, accessing DynamoDB from Lambda may be failing.
So, try setting the following IAM policy for Lambda's IAM role.
If you are performing other operations on DynamoDB, the policy examples in the following document will be helpful.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/iam-policy-example-data-crud.html
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "test",
"Effect": "Allow",
"Action": [
"dynamodb:PutItem"
],
"Resource": [
"*"
]
}
]
}
Relevant content
- asked a year ago
- asked 2 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
In your code, it is "partitionkey", but if it is not "partitionKey", an error will occur. The "K" in "partitionKey" should be capitalized.