Skip to content

Commit 7a0604c

Browse files
committed
Merge pull request #1 from bbc/restrict-logs-perm
Restrict CW logs permissions to bare minimum
2 parents 8fde7ec + 86835f0 commit 7a0604c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.py?
33
lambda-monkey.zip
44
venv
5+
.DS_Store

cloudformation/src/lambda.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
{
2626
"Effect": "Allow",
2727
"Action": [
28-
"logs:*",
28+
"logs:CreateLogGroup",
29+
"logs:CreateLogStream",
30+
"logs:PutLogEvents"
2931
],
3032
"Resource": "arn:aws:logs:*:*:*"
3133
},

cloudformation/templates/lambda.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@
6868
"Statement": [
6969
{
7070
"Action": [
71-
"logs:*"
71+
"logs:CreateLogGroup",
72+
"logs:CreateLogStream",
73+
"logs:PutLogEvents"
7274
],
7375
"Effect": "Allow",
7476
"Resource": "arn:aws:logs:*:*:*"

0 commit comments

Comments
 (0)