-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate.yaml
More file actions
70 lines (63 loc) · 1.48 KB
/
Copy pathtemplate.yaml
File metadata and controls
70 lines (63 loc) · 1.48 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: ARN services
Parameters:
DomainName:
Type: String
Default: arn.services
ACMCertificateArn:
Type: String
Globals:
Function:
Timeout: 30
Api:
Cors:
AllowMethods: "'*'"
AllowHeaders: "'*'"
AllowOrigin: "'*'"
Resources:
ExplodeFunc:
Type: AWS::Serverless::Function
Properties:
CodeUri: bin/
Handler: explode
Runtime: go1.x
Tracing: Active
Events:
ApiEvent:
Type: Api
Properties:
Path: /explode/{arnstr+}
Method: GET
RestApiId: !Ref TheProdAPI
Policies:
- AWSLambdaExecute
GenerateFunc:
Type: AWS::Serverless::Function
Properties:
CodeUri: bin/
Handler: generate
Runtime: go1.x
Tracing: Active
Events:
ApiEvent:
Type: Api
Properties:
Path: /generate
Method: POST
RestApiId: !Ref TheProdAPI
Policies:
- AWSLambdaExecute
TheProdAPI:
Type: AWS::Serverless::Api
Properties:
OpenApiVersion: 3.0.1
StageName: prod
Domain:
DomainName: !Ref DomainName
CertificateArn: !Ref ACMCertificateArn
EndpointConfiguration: REGIONAL
Outputs:
ASEndpoint:
Description: "The ASN services HTTP API Gateway endpoint"
Value: !Sub "https://${TheProdAPI}.execute-api.${AWS::Region}.amazonaws.com/prod"