The CloudFormation stack Data-lake-foundation-DataLakeFoundationStack-IS67G4LRJQIU-ElasticsearchStack-YY9NNQARTKAR failed to create the resource [CopyLambdaDeployment] due to an error in the CloudWatch Logs. The error message reads:
An error occurred (AccessDenied) when calling the CopyObject operation: Access Denied.
I attempted to resolve the issue by adding IAM permissions based on suggested solutions, but none of them worked. Below are the IAM permissions for the role being used.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
"s3:CreateBucket",
"s3:PutBucketPolicy",
"s3:DeleteBucket",
"s3:PutBucketNotification",
"s3:PutBucketAcl",
"s3:GetObjectTagging",
"s3:PutObjectTagging",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::datalake-submissions/*",
"arn:aws:s3:::datalake-curated-datasets/*",
"arn:aws:s3:::datalake-published-data/*",
"arn:aws:s3:::regional-lambda-bucket/*",
"arn:aws:s3:::datalake-athena-query-results/*"
]
},
{
"Effect": "Allow",
"Action": [
"kinesis:*",
"kinesisanalytics:*",
"lambda:*",
"glue:*",
"kinesis:CreateStream",
"kinesis:DescribeStream",
"kinesis:PutRecord",
"kinesis:PutRecords",
"lambda:CreateFunction",
"lambda:UpdateFunctionCode",
"lambda:UpdateFunctionConfiguration",
"lambda:GetFunction",
"lambda:DeleteFunction",
"lambda:ListFunctions",
"athena:*",
"redshift:*",
"quicksight:*",
"sns:*",
"sagemaker:*",
"ec2:Describe*",
"firehose:DescribeDeliveryStream",
"firehose:ListDeliveryStreams",
"firehose:PutRecord",
"firehose:PutRecordBatch",
"ec2:CreateLaunchTemplate",
"ec2:DescribeLaunchTemplates",
"ec2:RunInstances",
"ec2:DescribeInstances",
"ec2:CreateTags",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs",
"ssm:GetParameters",
"ssm:GetParameter",
"ssm:DescribeParameters",
"ec2:DeleteTags",
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:PassRole",
"iam:DeleteRole",
"ec2:CreateNetworkInterface",
"ec2:DeleteNetworkInterface",
"ec2:DescribeNetworkInterfaces",
"ec2:AttachNetworkInterface",
"ec2:DetachNetworkInterface",
"elasticloadbalancing:*",
"logs:*",
"cloudformation:*",
"cloudwatch:*",
"es:*"
],
"Resource": "*"
}
]
}