Skip to content

Commit de360f0

Browse files
authored
update lambda sqs policy
1 parent b2ba2e4 commit de360f0

File tree

1 file changed

+28
-97
lines changed

1 file changed

+28
-97
lines changed

sqs/lambda_sqs_s3-role.json

Lines changed: 28 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,29 @@
11
{
2-
"Version": "2012-10-17",
3-
"Statement": [
4-
{
5-
"Sid": "S3Access",
6-
"Effect": "Allow",
7-
"Action": [
8-
"s3:List*",
9-
"s3:Get*",
10-
"s3:CreateBucket",
11-
"s3:PutBucketOwnershipControls",
12-
"s3:PutBucketPublicAccessBlock",
13-
"s3:PutObjectAcl",
14-
"health:*",
15-
"s3:PutObject",
16-
"s3:PutBucketPolicy"
17-
],
18-
"Resource": "*",
19-
"Condition": {
20-
"StringEquals": {
21-
"aws:RequestedRegion": "us-east-1"
22-
}
23-
}
24-
},
25-
{
26-
"Sid": "S3AccessDeny",
27-
"Effect": "Deny",
28-
"Action": "s3:*",
29-
"Resource": "*",
30-
"Condition": {
31-
"ForAllValues:StringNotEqualsIfExists": {
32-
"aws:RequestedRegion": "us-east-1"
33-
}
34-
}
35-
},
36-
{
37-
"Sid": "S3StorageClassRestriction",
38-
"Effect": "Deny",
39-
"Action": [
40-
"s3:PutObject"
41-
],
42-
"Resource": "*",
43-
"Condition": {
44-
"StringNotLike": {
45-
"s3:x-amz-storage-class": [
46-
"STANDARD"
47-
]
48-
}
49-
}
50-
},
51-
{
52-
"Sid": "SQSAccess",
53-
"Effect": "Allow",
54-
"Action": [
55-
"sqs:TagQueue",
56-
"sqs:SendMessage",
57-
"sqs:CreateQueue",
58-
"sqs:Get*",
59-
"sqs:List*"
60-
],
61-
"Resource": "*",
62-
"Condition": {
63-
"StringEquals": {
64-
"aws:RequestedRegion": "us-east-1"
65-
}
66-
}
67-
},
68-
{
69-
"Sid": "LambdaandIAMAccess",
70-
"Effect": "Allow",
71-
"Action": [
72-
"lambda:CreateFunction",
73-
"lambda:UpdateFunctionCode",
74-
"lambda:UpdateFunctionEventInvokeConfig",
75-
"lambda:TagResource",
76-
"lambda:UpdateEventSourceMapping",
77-
"lambda:InvokeFunction",
78-
"lambda:List*",
79-
"lambda:UpdateFunctionConfiguration",
80-
"lambda:Get*",
81-
"lambda:CreateEventSourceMapping",
82-
"iam:CreateServiceLinkedRole",
83-
"iam:PassRole",
84-
"iam:Get*",
85-
"iam:List*",
86-
"kms:List*",
87-
"tag:Describe*",
88-
"tag:Get*"
89-
],
90-
"Resource": "*",
91-
"Condition": {
92-
"StringEquals": {
93-
"aws:RequestedRegion": "us-east-1"
94-
}
95-
}
96-
}
97-
]
98-
}
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": [
7+
"logs:*"
8+
],
9+
"Resource": "arn:aws:logs:*:*:*"
10+
},
11+
{
12+
"Effect": "Allow",
13+
"Action": [
14+
"s3:GetObject",
15+
"s3:PutObject"
16+
],
17+
"Resource": "arn:aws:s3:::*"
18+
},
19+
{
20+
"Effect": "Allow",
21+
"Action": [
22+
"s3:*",
23+
"SQS:*",
24+
"s3-object-lambda:*"
25+
],
26+
"Resource": "*"
27+
}
28+
]
29+
}

0 commit comments

Comments
 (0)