Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Update Lambda permission
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyanyu committed Feb 9, 2022
1 parent 584ed89 commit 69128d7
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions cloudformation/subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,31 @@ Resources:
Principal:
Service: 'lambda.amazonaws.com'
Action: 'sts:AssumeRole'
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
- arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess
- arn:aws:iam::aws:policy/AdministratorAccess
Policies:
- PolicyName: 'restHookLambdaPolicy'
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- logs:CreateLogStream
- logs:CreateLogGroup
- logs:PutLogEvents
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:*:*'
- Effect: Allow
Action:
- 'xray:PutTraceSegments'
- 'xray:PutTelemetryRecords'
Resource:
- '*'
- Effect: Allow
Action:
- 'kms:Decrypt'
Resource:
- !GetAtt SubscriptionsKey.Arn
- Effect: Allow
Action:
- 'sqs:DeleteMessage'
- 'sqs:ReceiveMessage'
- 'sqs:GetQueueAttributes'
Resource: !GetAtt RestHookQueue.Arn

0 comments on commit 69128d7

Please sign in to comment.