Skip to content
Draft
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
15 changes: 15 additions & 0 deletions wps-cloudformation-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Conditions:
CreateWpsApiGatewayDomainName: !Not [!Equals ['', !Ref wpsDomainName]]
HasExternalDomainName: !Not [!Equals ['', !Ref externalDomainName]]
HasCustomDomain: !Or [!Condition CreateWpsApiGatewayDomainName, !Condition HasExternalDomainName]
UseSourceArn: !Not [!Equals ['', !Ref sourceArn]]
UseCustomAmi: !Not [!Equals ['', !Ref CustomAmiId]]
UseTestCustomAmi: !Not [!Equals ['', !Ref TestCustomAmiId]]
Resources:
Expand Down Expand Up @@ -240,6 +241,18 @@ Resources:
Properties:
Roles:
- !Ref EcsInstanceRole
AssumeSesIdentityPolicy:
Type: AWS::IAM::ManagedPolicy
Condition: UseSourceArn
Properties:
Description: Policy for sending mail using the SES identity
Path: /
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: sts:AssumeRole
Resource: !Ref sourceArn
EcsInstanceRole:
Type: AWS::IAM::Role
Properties:
Expand All @@ -253,6 +266,7 @@ Resources:
Action: sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role
- !If [ UseSourceArn, !Ref AssumeSesIdentityPolicy, !Ref 'AWS::NoValue' ]
JobInstanceRole:
Type: AWS::IAM::Role
Properties:
Expand Down Expand Up @@ -643,6 +657,7 @@ Resources:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
- arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole
- arn:aws:iam::aws:policy/AWSBatchFullAccess
- !If [ UseSourceArn, !Ref AssumeSesIdentityPolicy, !Ref 'AWS::NoValue' ]
Policies:
- PolicyName: PublishVersion
PolicyDocument:
Expand Down