From 68b41bd182cff0cd211bc7c423c3356cb463964f Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Mon, 6 Apr 2020 08:36:08 -0700 Subject: [PATCH 1/2] Add js-yaml --- src/api/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/package.json b/src/api/package.json index 30db930..cdf6a30 100644 --- a/src/api/package.json +++ b/src/api/package.json @@ -3,5 +3,8 @@ "version": "1.0.0", "devDependencies": { "aws-sdk": "~2" + }, + "dependencies": { + "js-yaml": "3.0.0" } } From 10cdcdd57a34728daf1b319d6f9e3e2af3d2d4d7 Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Thu, 2 Apr 2020 10:02:01 -0700 Subject: [PATCH 2/2] Switch to $default route --- template.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/template.yaml b/template.yaml index 4460187..c8d6fde 100644 --- a/template.yaml +++ b/template.yaml @@ -10,9 +10,10 @@ Resources: title: !Sub ${AWS::StackName}-HttpApi version: '1.0' paths: - /{proxy+}: + /$default: x-amazon-apigateway-any-method: responses: {} + isDefaultRoute: true FailOnWarnings: true Api: Type: AWS::Serverless::Function @@ -36,10 +37,10 @@ Resources: TABLE_NAME: !Ref Users TABLE_ARN: !GetAtt Users.Arn Events: - HttpApiANYproxy: + HttpApiANYdefault: Type: HttpApi Properties: - Path: /{proxy+} + Path: /$default Method: ANY ApiId: !Ref HttpApi PayloadFormatVersion: '2.0'