{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "dynamodb:GetItem"
            ],
            "Resource": [
                "arn:aws:dynamodb:us-east-1:${account_id}:table/${environment}-ows-request-authorization"
            ],
            "Condition": {
                "ForAllValues:StringLike": {
                    "dynamodb:LeadingKeys": [
                        "lambda-podcast-assets-encoding-route:*"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "dynamodb:PutItem"
            ],
            "Resource": [
                "arn:aws:dynamodb:us-east-1:${account_id}:table/${environment}-ows-request-authorization"
            ],
            "Condition": {
                "ForAllValues:StringNotLike": {
                    "dynamodb:LeadingKeys": [
                        "lambda-podcast-assets-encoding-route:*"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Resource": "arn:aws:s3:::*",
            "Action": "s3:ListAllMyBuckets"
        },
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::${environment}-orcd-podcast-input-assets"
            ],
            "Action": [
                "s3:ListBucket"
            ]
        },
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::${environment}-orcd-podcast-input-assets/*"
            ],
            "Action": [
                "s3:GetObject",
                "s3:GetObjectAcl"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "sns:GetPlatformApplicationAttributes",
                "sns:GetTopicAttributes",
                "sns:Publish"
            ],
            "Resource": [
                "arn:aws:sns:us-east-1:${account_id}:${environment}-podcast_asset_general_status"
            ]
        },
        {
            "Effect": "Allow",
            "Resource": "*",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "ec2:CreateNetworkInterface",
                "ec2:DescribeNetworkInterfaces",
                "ec2:DeleteNetworkInterface"
            ]
        }
    ]
}
