Δඞཁ͕͋Γগ͠खؒ ٕज़બఆͷ؍ αʔόϨε ࢀߟɿhttps://dev.classmethod.jp/articles/receive-data-from-soracom-on-aws-using-terraform/#toc-3 ࢀߟɿhttps://summit-online-japan-cdk.workshop.aws/20-typescript/40-hit-counter/600-permissions.html resource aws_dynamodb_table iot_sample { name = "Terraform_Iot_Sample" … } … resource "aws_iam_role" "role" { name = "IotRuleToDynamoDBAccessRole" assume_role_policy = = <<EOF {…} EOF } resource "aws_iam_role_policy" "iam_policy_for_iot" { … policy = <<EOF { … "Action": [ "dynamodb:PutItem" ], "Resource": “${aws_dynamodb_table.iot_sample.arn}" } } EOF } export class HitCounter extends cdk.Construct { … const table = new dynamodb.Table(this, 'Hits', { … }); this.handler = new lambda.Function(this, 'HitCounterHandler', { … }); // grant the lambda role read/write permissions to our table table.grantReadWriteData(this.handler); } }