Skip to content

Commit e23f482

Browse files
committed
Add S3 allow policy for football lambda
1 parent a9c002d commit e23f482

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

cdk/lib/__snapshots__/footballnotificationslambda.test.ts.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,11 @@ exports[`The FootballNotificationsLambda stack matches the snapshot for CODE 1`]
759759
],
760760
},
761761
},
762+
{
763+
"Action": "s3:GetObject",
764+
"Effect": "Allow",
765+
"Resource": "arn:aws:s3:::mobile-pa-football-data/*",
766+
},
762767
],
763768
"Version": "2012-10-17",
764769
},
@@ -1593,6 +1598,11 @@ exports[`The FootballNotificationsLambda stack matches the snapshot for PROD 1`]
15931598
],
15941599
},
15951600
},
1601+
{
1602+
"Action": "s3:GetObject",
1603+
"Effect": "Allow",
1604+
"Resource": "arn:aws:s3:::mobile-pa-football-data/*",
1605+
},
15961606
],
15971607
"Version": "2012-10-17",
15981608
},

cdk/lib/footballnotificationslambda.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ export class FootballNotificationsLambda extends GuStack {
125125
}),
126126
);
127127

128+
footballnotificationslambda.addToRolePolicy(
129+
new PolicyStatement({
130+
actions: ['s3:GetObject'],
131+
effect: Effect.ALLOW,
132+
resources: [`arn:aws:s3:::mobile-pa-football-data/*`],
133+
}),
134+
);
135+
128136
// Read Throttle Events Alarm
129137
new GuAlarm(this, 'MobileNotificationsFootballConsumedReadThrottleEvents', {
130138
app,

0 commit comments

Comments
 (0)