Skip to content

Commit e4be57c

Browse files
committed
proxy all path
1 parent f32b75d commit e4be57c

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

cloudformation/main.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,30 @@ Resources:
119119
Name: !Sub ${ApplicationPrefix}-gateway
120120
Description: !Sub "${ApplicationFriendlyName} API Gateway"
121121
AlwaysDeploy: True
122-
DefinitionBody:
123-
Fn::Transform:
124-
Name: AWS::Include
125-
Parameters:
126-
Location: ../docs/swagger.yml
122+
DefinitionBody:
123+
/{proxy+}:
124+
x-amazon-apigateway-any-method:
125+
produces:
126+
- "application/json"
127+
responses: {}
128+
x-amazon-apigateway-integration:
129+
uri: !Sub arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${ApplicationPrefix}-lambda/invocations
130+
responses:
131+
default:
132+
statusCode: "200"
133+
passthroughBehavior: "when_no_match"
134+
httpMethod: "POST"
135+
type: "aws_proxy"
136+
basePath: "/"
137+
schemes:
138+
- "https"
139+
x-amazon-apigateway-policy:
140+
Version: "2012-10-17"
141+
Statement:
142+
- Effect: "Allow"
143+
Principal: "*"
144+
Action: "execute-api:Invoke"
145+
Resource: "execute-api:/*"
127146
Domain:
128147
DomainName: !Sub
129148
- "${ApplicationPrefix}.${BaseDomainName}"

0 commit comments

Comments
 (0)