Skip to content

Commit

Permalink
Add role for zoom reverse proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroslavPshenichnikov committed Sep 13, 2024
1 parent b241736 commit be1ac4c
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion develop-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Resources:
SnapStart:
ApplyOn: None
PackageType: Zip
Role: !GetAtt DocspaceReverseProxyRole.Arn
Role: !GetAtt ZoomReverseProxyRole.Arn

GlobalDynamoDBTable:
Type: AWS::DynamoDB::GlobalTable
Expand Down Expand Up @@ -138,6 +138,20 @@ Resources:
Service:
- "lambda.amazonaws.com"
- "edgelambda.amazonaws.com"

ZoomReverseProxyRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: sts:AssumeRole
Principal:
Service:
- "lambda.amazonaws.com"
- "edgelambda.amazonaws.com"

# ==== POLICIES ==== #
PublishLogsPolicy:
Type: AWS::IAM::ManagedPolicy
Expand All @@ -155,13 +169,31 @@ Resources:
- logs:PutLogEvents
- cloudwatch:PutMetricData
Resource: "*"

ZoomPublishLogsPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
Description: Allows functions to write logs for zoom
Roles:
- !Ref ZoomReverseProxyRole
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Deny
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- cloudwatch:PutMetricData
Resource: "*"

DyanmoDBFullAccessPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
Description: Set dynamodb permissions
Roles:
- !Ref DocspaceReverseProxyRole
- !Ref ZoomReverseProxyRole
PolicyDocument:
Version: 2012-10-17
Statement:
Expand Down

0 comments on commit be1ac4c

Please sign in to comment.