-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.domain.yml
56 lines (53 loc) · 1.86 KB
/
serverless.domain.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
AWSTemplateFormatVersion: "2010-09-09"
Description: Template to generate minimum required permissions to run serverless domain manager plugin
Outputs:
ServerlessDomainManagerDeployPolicyArn:
Description: Serverless domain manager deployment iam policy arn
Value:
Ref: ServerlessDomainManagerDeployPolicy
Parameters:
HostedZoneId:
AllowedPattern: '[A-Za-z0-9]+'
Description: ID of the hosted zone to grant permissions to
Type: String
Resources:
ServerlessDomainManagerDeployPolicy:
Type: "AWS::IAM::ManagedPolicy"
Properties:
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- apigateway:POST
- apigateway:PATCH
Resource:
- !Sub arn:aws:apigateway:${AWS::Region}::/domainnames/*/basepathmappings
- !Sub arn:aws:apigateway:${AWS::Region}::/domainnames/*/basepathmappings/*
- Effect: Allow
Action:
- apigateway:GET
- apigateway:DELETE
Resource: !Sub arn:aws:apigateway:${AWS::Region}::/domainnames/*
- Effect: Allow
Action:
- apigateway:POST
Resource: !Sub arn:aws:apigateway:${AWS::Region}::/domainnames/*/basepathmappings
- Effect: Allow
Action:
- cloudfront:UpdateDistribution
Resource: '*'
- Effect: Allow
Action:
- route53:ListHostedZones
Resource: '*'
- Effect: Allow
Action:
- acm:ListCertificates
Resource: '*'
- Effect: Allow
Action:
- route53:ChangeResourceRecordSets
- route53:GetHostedZone
- route53:ListResourceRecordSets
Resource: !Sub arn:aws:route53:::hostedzone/${HostedZoneId}