Skip to content

Commit 6bfa597

Browse files
committed
Added permission in the Lambda Role required for ParallelCluster.
1 parent f6b8bb6 commit 6bfa597

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

‎python/src/wrfcloud/aws/resources/cf_imagebuilder_wrf_intel.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ Resources:
499499
- git clone ${GIT_CLONE_OPTS} https://github.com/NCAR/wrfcloud
500500
- python3.12 -m pip install wrfcloud/python/src
501501
- FC=gfortran F90=gfortran python3.12 -m pip install git+https://github.com/NCAR/wrf-python.git@v1.4.2
502-
- su - ec2-user -c "/usr/local/bin/wrfcloud-run --help
503502
504503
ComponentWrf:
505504
Type: AWS::ImageBuilder::Component

‎python/src/wrfcloud/setup/aws/cf_wrfcloud_webapp.yaml‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ Resources:
117117
Resource:
118118
- !Sub 'arn:aws:s3:::${WrfCloudBucket}'
119119
- !Sub 'arn:aws:s3:::${WrfCloudBucket}/*'
120+
# Note: AWS-Managed Policy for ParallelCluster is not available, but here is some documentation on required permissions for reference:
121+
# https://docs.aws.amazon.com/parallelcluster/latest/ug/iam-roles-in-parallelcluster-v3.html
120122
- Effect: Allow
121123
Action: iam:PassRole
122124
Condition:
@@ -167,6 +169,12 @@ Resources:
167169
- iam:GetRolePolicy
168170
- iam:PutRolePolicy
169171
- iam:SimulatePrincipalPolicy
172+
- iam:TagRole
173+
- iam:UntagRole
174+
- iam:TagInstanceProfile
175+
- iam:ListAttachedRolePolicies
176+
- iam:ListRolePolicies
177+
- iam:ListInstanceProfilesForRole
170178
- secretsmanager:DescribeSecret
171179
Resource:
172180
- !Sub 'arn:aws:dynamodb:*:${AWS::AccountId}:table/parallelcluster-*'
@@ -260,6 +268,34 @@ Resources:
260268
- Effect: Allow
261269
Action: elasticfilesystem:*
262270
Resource: !Sub 'arn:aws:elasticfilesystem:*:${AWS::AccountId}:*'
271+
- Effect: Allow
272+
Action:
273+
- ssm:GetParameter
274+
- ssm:PutParameter
275+
- ssm:DeleteParameter
276+
- ssm:AddTagsToResource
277+
- ssm:ListTagsForResource
278+
Resource: !Sub 'arn:aws:ssm:*:${AWS::AccountId}:parameter/parallelcluster/*'
279+
- Effect: Allow
280+
Action:
281+
- sns:CreateTopic
282+
- sns:DeleteTopic
283+
- sns:Subscribe
284+
- sns:Unsubscribe
285+
- sns:GetTopicAttributes
286+
- sns:SetTopicAttributes
287+
- sns:TagResource
288+
- sns:ListTagsForResource
289+
Resource: !Sub 'arn:aws:sns:*:${AWS::AccountId}:parallelcluster-*'
290+
- Effect: Allow
291+
Action:
292+
- sqs:CreateQueue
293+
- sqs:DeleteQueue
294+
- sqs:GetQueueAttributes
295+
- sqs:SetQueueAttributes
296+
- sqs:TagQueue
297+
- sqs:ListQueueTags
298+
Resource: !Sub 'arn:aws:sqs:*:${AWS::AccountId}:parallelcluster-*'
263299
LambdaLayerPythonDeps:
264300
Type: AWS::Lambda::LayerVersion
265301
Properties:

0 commit comments

Comments
 (0)