Skip to content

Commit 9a50850

Browse files
committed
Merge branch 'unit-tests-in-serverless'
2 parents ae9e4c1 + 826d4d0 commit 9a50850

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

api-gateway-errors.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Resources:
2+
GatewayResponseDefault4XX:
3+
Type: 'AWS::ApiGateway::GatewayResponse'
4+
Properties:
5+
ResponseParameters:
6+
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
7+
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
8+
ResponseType: DEFAULT_4XX
9+
RestApiId:
10+
Ref: 'ApiGatewayRestApi'
11+
GatewayResponseDefault5XX:
12+
Type: 'AWS::ApiGateway::GatewayResponse'
13+
Properties:
14+
ResponseParameters:
15+
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
16+
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
17+
ResponseType: DEFAULT_5XX
18+
RestApiId:
19+
Ref: 'ApiGatewayRestApi'

serverless.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ functions:
115115
cors: true
116116
authorizer: aws_iam
117117

118+
<<<<<<< HEAD
118119
billing:
119120
handler: billing.main
120121
events:
@@ -126,6 +127,8 @@ functions:
126127

127128
# Create our resources with separate CloudFormation templates
128129
resources:
130+
# API Gateway Errors
131+
- ${file(resources/api-gateway-errors.yml)}
129132
# DynamoDB
130133
- ${file(resources/dynamodb-table.yml)}
131134
# S3

0 commit comments

Comments
 (0)