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" } } 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'