Cấu hình hàm Lambda của bạn để sao chép các bản ghi đã thay đổi từ Orders Kinesis Data Stream sang bảng OrdersHistory.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:DeleteItem",
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:Scan",
"dynamodb:UpdateItem"
],
"Resource": "arn:aws:dynamodb:{aws-region}:{aws-account-id}:table/*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"kinesis:DescribeStream",
"kinesis:GetRecords",
"kinesis:GetShardIterator",
"kinesis:ListStreams"
],
"Resource": "arn:aws:kinesis:{aws-region}:{aws-account-id}:stream/Orders"
},
{
"Effect": "Allow",
"Action": "dynamodb:PutItem",
"Resource": "arn:aws:dynamodb:{aws-region}:{aws-account-id}:table/OrdersHistory"
},
{
"Effect": "Allow",
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:{aws-region}:{aws-account-id}:orders-kds-dlq"
}
]
}
Thay thế {aws-region} và {aws-account-id} trong câu lệnh chính sách trên bằng AWS region và ID tài khoản AWS của bạn tương ứng.


arn:aws:lambda:{aws-region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:58

Thay thế {aws-region} bằng ID cho AWS region mà bạn đang làm việc.



