{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CloudFormationPermissions",
"Effect": "Allow",
"Action": [
"cloudformation:DescribeStackEvents",
"cloudformation:CreateStack",
"cloudformation:GetTemplate",
"cloudformation:DeleteStack",
"cloudformation:DescribeStackResources",
"cloudformation:UpdateStack",
"cloudformation:DescribeStacks",
"cloudformation:ValidateTemplate"
],
"Resource": "arn:aws:cloudformation:*:<aws_account_id>:stack/*"
},
{
"Sid": "DynamoDBPermissions",
"Effect": "Allow",
"Action": [
"dynamodb:CreateTable",
"dynamodb:UpdateTimeToLive",
"dynamodb:TagResource",
"dynamodb:UntagResource",
"dynamodb:DescribeTable",
"dynamodb:DescribeTimeToLive",
"dynamodb:DeleteTable",
"dynamodb:UpdateTable"
],
"Resource": "arn:aws:dynamodb:*:<aws_account_id>:table/PolyAI*"
},
{
"Sid": "IAMPermissions",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:PassRole",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy",
"iam:TagRole",
"iam:CreateRole",
"iam:DeleteRole",
"iam:AttachRolePolicy",
"iam:PutRolePolicy"
],
"Resource": [
"arn:aws:iam::<aws_account_id>:role/PolyAI*",
"arn:aws:iam::<aws_account_id>:policy/PolyAI*"
]
},
{
"Sid": "LambdaPermissions",
"Effect": "Allow",
"Action": [
"lambda:CreateFunction",
"lambda:UpdateFunctionCode",
"lambda:TagResource",
"lambda:AddPermission",
"lambda:GetFunction",
"lambda:UpdateFunctionConfiguration",
"lambda:DeleteFunction",
"lambda:PutFunctionConcurrency",
"lambda:ListTags"
],
"Resource": "arn:aws:lambda:*:<aws_account_id>:function:PolyAI*"
},
{
"Sid": "CloudWatchLogsPermissions",
"Effect": "Allow",
"Action": [
"logs:TagLogGroup",
"logs:DeleteRetentionPolicy",
"logs:TagResource",
"logs:PutRetentionPolicy",
"logs:CreateLogGroup",
"logs:DescribeLogGroups",
"logs:DeleteLogGroup"
],
"Resource": "arn:aws:logs:*:<aws_account_id>:log-group:/aws/lambda/PolyAIWriteContactAttributesToDDB*"
},
{
"Sid": "S3ReadPermissions",
"Effect": "Allow",
"Action": "s3:Get*",
"Resource": "*"
}
]
}