-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.yaml
More file actions
94 lines (94 loc) · 2.43 KB
/
template.yaml
File metadata and controls
94 lines (94 loc) · 2.43 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
ApiGateway:
Type: AWS::Serverless::Api
Properties:
Name: zeroweb-api
StageName: Prod
Cors:
AllowMethods: "'POST, GET'"
AllowOrigin: "'*'"
AllowHeaders: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'"
Auth:
DefaultAuthorizer: 'NONE'
InvokeRole: 'NONE'
ApiLambda:
Type: AWS::Serverless::Function
Properties:
FunctionName: zeroweb-api
Handler: graphql.handler
Runtime: nodejs14.x
CodeUri: ./api-server
Policies:
- AmazonDynamoDBFullAccess
Events:
AnyRequest:
Type: Api
Properties:
Path: /graphql
Method: post
RestApiId:
Ref: ApiGateway
Auth:
Authorizer: 'AWS_IAM'
AuthLambda:
Type: AWS::Serverless::Function
Properties:
FunctionName: zeroweb-auth
Handler: app.handler
Runtime: nodejs14.x
CodeUri: ./auth-server
Policies:
- AmazonCognitoDeveloperAuthenticatedIdentities
- AmazonCognitoPowerUser
Events:
CognitoToken:
Type: Api
Properties:
Path: /token
Method: post
RestApiId:
Ref: ApiGateway
DeleteCognitoIdentity:
Type: Api
Properties:
Path: /identity
Method: delete
RestApiId:
Ref: ApiGateway
TwitterRequestToken:
Type: Api
Properties:
Path: /twitter/oauth/request_token
Method: post
RestApiId:
Ref: ApiGateway
TwitterAccessToken:
Type: Api
Properties:
Path: /twitter/oauth/access_token
Method: post
RestApiId:
Ref: ApiGateway
TwitterUserInfo:
Type: Api
Properties:
Path: /twitter/user
Method: post
RestApiId:
Ref: ApiGateway
GithubAccessToken:
Type: Api
Properties:
Path: /github/oauth/access_token
Method: post
RestApiId:
Ref: ApiGateway
GithubUserInfo:
Type: Api
Properties:
Path: /github/user
Method: post
RestApiId:
Ref: ApiGateway