Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(subscriber): use iam:PassRole for Lambda #135

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion apps/subscriber/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Conditions:
UseStackName: !Equals
- !Ref NameOverride
- ''
HasRoleArn: !Not
- !Equals
- !Ref RoleArn
- ''
HasDiscoveryRate: !Not
- !Equals
- !Ref DiscoveryRate
Expand Down Expand Up @@ -158,6 +162,17 @@ Resources:
- logs:CreateLogStream
- logs:PutLogEvents
Resource: !GetAtt LogGroup.Arn
- !If
- HasRoleArn
- PolicyName: pass
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- iam:PassRole
Resource: !Ref RoleArn
- !Ref AWS::NoValue
- PolicyName: queue
PolicyDocument:
Version: 2012-10-17
Expand Down Expand Up @@ -230,7 +245,10 @@ Resources:
LOG_GROUP_NAME_PATTERNS: !Join
- ','
- !Ref LogGroupNamePatterns
ROLE_ARN: !Ref RoleArn
ROLE_ARN: !If
- HasRoleArn
- !Ref RoleArn
- !Ref AWS::NoValue
QUEUE_URL: !Ref Queue
VERBOSITY: 9
NUM_WORKERS: !Ref NumWorkers
Expand Down
Loading