Skip to content

Commit 56b3080

Browse files
committed
Use unique names for the lambda policies
1 parent b7027fc commit 56b3080

29 files changed

+42
-42
lines changed

lib/shortcuts/lambda.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class Lambda {
203203
Condition,
204204
DependsOn: (RoleArn) ? undefined : `${LogicalName}Role`,
205205
Properties: {
206-
PolicyName: 'lambda-log-access',
206+
PolicyName: `${LogicalName}-lambda-log-access`,
207207
Roles: [roleName],
208208
PolicyDocument: {
209209
Version: '2012-10-17',

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/shortcuts/event-lambda-custom-eventbus.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"Type": "AWS::IAM::Policy",
8888
"DependsOn": "MyLambdaRole",
8989
"Properties": {
90-
"PolicyName": "lambda-log-access",
90+
"PolicyName": "MyLambda-lambda-log-access",
9191
"Roles": [
9292
{
9393
"Ref": "MyLambdaRole"

test/fixtures/shortcuts/event-lambda-defaults.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"Type": "AWS::IAM::Policy",
8888
"DependsOn": "MyLambdaRole",
8989
"Properties": {
90-
"PolicyName": "lambda-log-access",
90+
"PolicyName": "MyLambda-lambda-log-access",
9191
"Roles": [
9292
{
9393
"Ref": "MyLambdaRole"

test/fixtures/shortcuts/event-lambda-full.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"Type": "AWS::IAM::Policy",
8888
"DependsOn": "MyLambdaRole",
8989
"Properties": {
90-
"PolicyName": "lambda-log-access",
90+
"PolicyName": "MyLambda-lambda-log-access",
9191
"Roles": [
9292
{
9393
"Ref": "MyLambdaRole"

test/fixtures/shortcuts/hookshot-github-compatible-legacy-node-runtimes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
},
176176
"Handler": "index.lambda",
177177
"MemorySize": 128,
178-
"Runtime": "nodejs16.x",
178+
"Runtime": "nodejs22.x",
179179
"Timeout": 30,
180180
"Role": {
181181
"Fn::GetAtt": [
@@ -225,7 +225,7 @@
225225
"Type": "AWS::IAM::Policy",
226226
"DependsOn": "PassFunctionRole",
227227
"Properties": {
228-
"PolicyName": "lambda-log-access",
228+
"PolicyName": "PassFunction-lambda-log-access",
229229
"Roles": [
230230
{
231231
"Ref": "PassFunctionRole"
@@ -366,7 +366,7 @@
366366
"Type": "AWS::IAM::Policy",
367367
"DependsOn": "DestinationRole",
368368
"Properties": {
369-
"PolicyName": "lambda-log-access",
369+
"PolicyName": "Destination-lambda-log-access",
370370
"Roles": [
371371
{
372372
"Ref": "DestinationRole"

test/fixtures/shortcuts/hookshot-github-secret-ref.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
"Type": "AWS::IAM::Policy",
232232
"DependsOn": "PassFunctionRole",
233233
"Properties": {
234-
"PolicyName": "lambda-log-access",
234+
"PolicyName": "PassFunction-lambda-log-access",
235235
"Roles": [
236236
{
237237
"Ref": "PassFunctionRole"
@@ -372,7 +372,7 @@
372372
"Type": "AWS::IAM::Policy",
373373
"DependsOn": "DestinationRole",
374374
"Properties": {
375-
"PolicyName": "lambda-log-access",
375+
"PolicyName": "Destination-lambda-log-access",
376376
"Roles": [
377377
{
378378
"Ref": "DestinationRole"

test/fixtures/shortcuts/hookshot-github-secret-string.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
"Type": "AWS::IAM::Policy",
226226
"DependsOn": "PassFunctionRole",
227227
"Properties": {
228-
"PolicyName": "lambda-log-access",
228+
"PolicyName": "PassFunction-lambda-log-access",
229229
"Roles": [
230230
{
231231
"Ref": "PassFunctionRole"
@@ -366,7 +366,7 @@
366366
"Type": "AWS::IAM::Policy",
367367
"DependsOn": "DestinationRole",
368368
"Properties": {
369-
"PolicyName": "lambda-log-access",
369+
"PolicyName": "Destination-lambda-log-access",
370370
"Roles": [
371371
{
372372
"Ref": "DestinationRole"

test/fixtures/shortcuts/hookshot-github.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
"Type": "AWS::IAM::Policy",
234234
"DependsOn": "PassFunctionRole",
235235
"Properties": {
236-
"PolicyName": "lambda-log-access",
236+
"PolicyName": "PassFunction-lambda-log-access",
237237
"Roles": [
238238
{
239239
"Ref": "PassFunctionRole"
@@ -374,7 +374,7 @@
374374
"Type": "AWS::IAM::Policy",
375375
"DependsOn": "DestinationRole",
376376
"Properties": {
377-
"PolicyName": "lambda-log-access",
377+
"PolicyName": "Destination-lambda-log-access",
378378
"Roles": [
379379
{
380380
"Ref": "DestinationRole"

test/fixtures/shortcuts/hookshot-passthrough-access-log-format.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
"Type": "AWS::IAM::Policy",
230230
"DependsOn": "PassFunctionRole",
231231
"Properties": {
232-
"PolicyName": "lambda-log-access",
232+
"PolicyName": "PassFunction-lambda-log-access",
233233
"Roles": [
234234
{
235235
"Ref": "PassFunctionRole"
@@ -370,7 +370,7 @@
370370
"Type": "AWS::IAM::Policy",
371371
"DependsOn": "DestinationRole",
372372
"Properties": {
373-
"PolicyName": "lambda-log-access",
373+
"PolicyName": "Destination-lambda-log-access",
374374
"Roles": [
375375
{
376376
"Ref": "DestinationRole"

0 commit comments

Comments
 (0)