Вы уже можете использовать параметры пути, например ::10000
{
"myFunction": {
"handler": "src/myFunction/index.index",
"description": "Does awesome things",
"events": [
{
"http": {
"path": "apiPath/{parameterOne}",
"method": "GET",
"integration": "lambda",
"request": {
"parameters": {
"parameterOne": true
},
"template": {
"application/json": "{ \"parameterOne\": \"$input.params(\"parameterOne\")\" }"
}
},
"response": {
"statusCodes": {
"200": {
"pattern": ""
},
"400": {
"pattern": "[\\s\\S]*\\[400\\][\\s\\S]*",
"template": "$input.path('$.errorMessage')"
},
"500": {
"pattern": "[\\s\\S]*(Process\\s?exited\\s?before\\s?completing\\s?request|\\[500\\])[\\s\\S]*",
"template": "$input.path('$.errorMessage')"
}
},
"headers": {
"Cache-Control": "'no-cache, no-store'",
"Pragma": "'no-cache'",
"Expires": "'0'",
"Strict-Transport-Security": "'max-age=31536000; includeSubdomains; preload'"
}
},
"cors": {
"origin": "*",
"headers": [
"Content-Type",
"Pragma",
"Cache-Control",
"X-Amz-Date",
"Authorization",
"X-Api-Key",
"X-Amz-Security-Token",
"X-Amz-User-Agent"
],
"allowCredentials": false
}
}
}
]
}
}
Параметр parameterOne
будет сопоставлен с лямбда-событием.