aws-lambda-fastify
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -10,3 +10,9 @@ module.exports = (app, options) => (event, context, callback) => { | ||
const method = event.httpMethod | ||
const url = event.path | ||
let url = event.path | ||
// NOTE: if used directly via API Gateway domain and /stage | ||
if (event.requestContext && event.requestContext.stage && event.requestContext.resourcePath && | ||
event.path.indexOf(`/${event.requestContext.stage}/`) === 0 && | ||
event.requestContext.resourcePath.indexOf(`/${event.requestContext.stage}/`) !== 0) { | ||
url = event.path.substring(event.requestContext.stage.length + 1) | ||
} | ||
const query = event.multiValueQueryStringParameters || event.queryStringParameters || {} | ||
@@ -13,0 +19,0 @@ const headers = Object.assign({}, event.headers) |
@@ -34,3 +34,3 @@ { | ||
], | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"main": "index.js", | ||
@@ -43,15 +43,15 @@ "scripts": { | ||
"devDependencies": { | ||
"aws-serverless-express": "3.3.6", | ||
"aws-serverless-fastify": "1.0.10", | ||
"benchmark": "2.1.4", | ||
"eslint": "6.3.0", | ||
"eslint-config-standard": "14.1.0", | ||
"eslint-plugin-import": "2.18.2", | ||
"eslint-plugin-node": "10.0.0", | ||
"eslint-plugin-promise": "4.2.1", | ||
"eslint-plugin-standard": "4.0.1", | ||
"fastify": "2.8.0", | ||
"serverless-http": "2.3.0", | ||
"tap": "14.6.2" | ||
"aws-serverless-express": "^3.3.6", | ||
"aws-serverless-fastify": "^1.0.13", | ||
"benchmark": "^2.1.4", | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"fastify": "^2.12.0", | ||
"serverless-http": "^2.3.2", | ||
"tap": "^14.10.6" | ||
} | ||
} |
@@ -94,3 +94,3 @@ # Introduction | ||
- Stateless only | ||
- API Gateway has a timeout of 29 seconds, and Lambda has a maximum execution time of 15 minutes. | ||
- API Gateway has a timeout of 29 seconds, and Lambda has a maximum execution time of 15 minutes. (Using Application Load Balancer has no timeout limit, so the lambda maximum execution time is relevant) | ||
- If you are using another web framework (Connect, Express, Koa, Restana, Sails, Hapi, Fastify, Restify) or want to use a more generic serverless proxy framework, have a look at: [serverless-http](https://github.com/dougmoscrop/serverless-http) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9926
71