Skip to content

Commit

Permalink
Update permissions on execution role
Browse files Browse the repository at this point in the history
  • Loading branch information
estohlmann committed Nov 12, 2024
1 parent afad1a3 commit c0a6dd6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/models/model-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ export class ModelsApi extends Construct {
new PolicyStatement({
effect: Effect.ALLOW,
actions: [
'ec2:TerminateInstances',
'ec2:CreateNetworkInterface',
'ec2:DescribeNetworkInterfaces',
'ec2:DescribeSubnets',
Expand All @@ -188,6 +187,13 @@ export class ModelsApi extends Construct {
'ec2:UnassignPrivateIpAddresses'
],
resources: ['*'],
}),
new PolicyStatement({
effect: Effect.ALLOW,
actions: [
'ec2:TerminateInstances'
],
resources: ['*'],
conditions: {
'StringEquals': {'aws:ResourceTag/lisa_temporary_instance': 'true'}
}
Expand Down

0 comments on commit c0a6dd6

Please sign in to comment.