Skip to content

Commit bc75eb1

Browse files
committed
Scope down ApiVersionMap permissions
1 parent 52a3ef6 commit bc75eb1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

infrastructure/parallelcluster-ui.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,13 @@ Resources:
325325
stage = api_url.split('/')[3]
326326
api_gateway_arns.append(f"arn:{get_partition(os.environ['AWS_REGION'])}:execute-api:{os.environ['AWS_REGION']}:{account_id}:{gateway}/{stage}/*")
327327

328-
print(f"Version={version}, ApiURL={api_url, ")
328+
print(f"Version={version}, ApiURL={api_url}")
329329
break
330-
331-
result = result[:-1]
332330

333331
except Exception as e:
334332
print(f"Error processing stack {stack['StackName']}: {str(e)}")
335333
continue
334+
result = result[:-1]
336335
print(f"Result: {result}")
337336

338337
response_data = {"ApiVersionMapping": result, "ApiArns": ','.join(api_gateway_arns)}
@@ -365,6 +364,9 @@ Resources:
365364
- Effect: Allow
366365
Action:
367366
- cloudformation:ListStacks
367+
Resource: '*'
368+
- Effect: Allow
369+
Action:
368370
- cloudformation:DescribeStacks
369371
Resource: '*'
370372
Condition:

0 commit comments

Comments
 (0)