Skip to content

Commit a9c01a3

Browse files
committed
feat: use promise resolution by default
1 parent 13f527f commit a9c01a3

File tree

9 files changed

+336
-385
lines changed

9 files changed

+336
-385
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Want to get up and running quickly? [Check out our basic starter example](exampl
3232
- [Serverless Application Model (SAM)](https://github.com/awslabs/serverless-application-model)/[CloudFormation](https://aws.amazon.com/cloudformation/aws-cloudformation-templates/) template
3333
- Helper scripts to configure, deploy, and manage your application
3434

35-
### Accessing the event and context objects
35+
## Accessing the event and context objects
3636

3737
This package exposes a function to easily get the `event` and `context` objects Lambda receives from the event source.
3838

@@ -49,7 +49,7 @@ app.get('/', (req, res) => {
4949

5050
1. ✅ Improved API - Simpler for end user to use and configure; extensible without breaking backwards compatibility or hurting API
5151
2. ✅ Node.js 8+ only - can upgrade dependencies to latest (Jest); can use latest syntax in source and tests; can use server.listening; future-proof for Node.js 10
52-
3. 🗓 Promise resolution mode by default? Requires benchmarking. Otherwise try callback with callbackWaitsForEventLoop=false (configurable by user); requires benchmarking. If context.succeed is still most performant, leave as default.
52+
3. Promise resolution mode by default
5353
4. 🛠 Additional event sources - currently only supports API Gateway Proxy; should also support Lambda@Edge (https://github.com/awslabs/aws-serverless-express/issues/152) and ALB; have had a customer request for DynamoDB; should make it easy to provide your own IO mapping function.
5454
1. Added ALB; requires example refactor.
5555
2. Need to add Lambda@Edge and example
@@ -58,11 +58,11 @@ app.get('/', (req, res) => {
5858
6. ✅ Configure logging - default winston and allow customers to provide their own; include option to respond to 500s with the stack trace instead of empty string currently
5959
7. 🗓Improved documentation
6060
8. ✅ Option to strip base path for custom domains (https://github.com/awslabs/aws-serverless-express/issues/86).
61-
9. 🗓 Update example to include optional parameter for setting up custom domain
61+
9. 🗓 Update example to include optional parameter for setting up custom domain
6262

63-
### Is AWS serverless right for my app?
63+
## Is AWS serverless right for my app?
6464

65-
#### Benefits
65+
### Benefits
6666

6767
- Pay for what you use
6868
- No infrastructure to manage
@@ -76,9 +76,13 @@ app.get('/', (req, res) => {
7676
- [Request Validation](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html)
7777
- [Documentation](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html)
7878

79-
#### Considerations
79+
### Considerations
8080

8181
- For apps that may not see traffic for several minutes at a time, you could see [cold starts](https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/)
8282
- Cannot use native libraries (aka [Addons](https://nodejs.org/api/addons.html)) unless you package your app on an EC2 machine running Amazon Linux
8383
- Stateless only
8484
- API Gateway has a timeout of 30 seconds, and Lambda has a maximum execution time of 15 minutes.
85+
86+
## Loadtesting
87+
88+
`npx loadtest --rps 100 -k -n 1500 -c 50 https://xxxx.execute-api.us-east-1.amazonaws.com/prod/users`

0 commit comments

Comments
 (0)