Skip to content

Commit 05f50bb

Browse files
committed
fix: npmignore; change: logs inline role
1 parent 7fda134 commit 05f50bb

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ test
4141
/src
4242
main.js
4343
main.js.map
44+
tsconfig.json
4445

4546
__test/**/*
4647

src/cli/providers/cloudFormation/context/resources.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,21 +177,21 @@ export const logPolicy = async (context) => {
177177
"Action": [
178178
"logs:CreateLogStream",
179179
],
180-
"Resource": logGroupNames.map(n => {
181-
return {
182-
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:" + n + ":*"
180+
"Resource": [
181+
{
182+
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*-" + context.stage + ":*"
183183
}
184-
})
184+
]
185185
}, {
186186
"Effect": "Allow",
187187
"Action": [
188188
"logs:PutLogEvents"
189189
],
190-
"Resource": logGroupNames.map(n => {
191-
return {
192-
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:" + n + ":*:*"
190+
"Resource": [
191+
{
192+
"Fn::Sub": "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*-" + context.stage + ":*:*"
193193
}
194-
})
194+
]
195195
}]
196196
}
197197
}

0 commit comments

Comments
 (0)