Skip to content

Commit

Permalink
Merge branch 'unit-tests-in-serverless'
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Jan 27, 2019
2 parents ae9e4c1 + 826d4d0 commit 9a50850
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions api-gateway-errors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Resources:
GatewayResponseDefault4XX:
Type: 'AWS::ApiGateway::GatewayResponse'
Properties:
ResponseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
ResponseType: DEFAULT_4XX
RestApiId:
Ref: 'ApiGatewayRestApi'
GatewayResponseDefault5XX:
Type: 'AWS::ApiGateway::GatewayResponse'
Properties:
ResponseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
ResponseType: DEFAULT_5XX
RestApiId:
Ref: 'ApiGatewayRestApi'
3 changes: 3 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ functions:
cors: true
authorizer: aws_iam

<<<<<<< HEAD
billing:
handler: billing.main
events:
Expand All @@ -126,6 +127,8 @@ functions:

# Create our resources with separate CloudFormation templates
resources:
# API Gateway Errors
- ${file(resources/api-gateway-errors.yml)}
# DynamoDB
- ${file(resources/dynamodb-table.yml)}
# S3
Expand Down

0 comments on commit 9a50850

Please sign in to comment.