mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-06-02 07:27:33 +00:00
Apply recommendation for security and reliability (#573)
Apply recommendations in code and documentation - [CI] restrict permissions to read-all instead of the default write-all - All examples README.md : add a note about Lambda functions configuration with improved security and scalability changes for production environment - Swift docc documentation: add a note about Lambda functions configuration with improved security and scalability changes for production environment --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
This commit is contained in:
co-authored by
Sebastien Stormacq
parent
d8aa38be78
commit
74e4efdbac
@@ -77,4 +77,14 @@ When done testing, you can delete the Lambda function with this command.
|
||||
|
||||
```bash
|
||||
aws lambda delete-function --function-name HelloJSON
|
||||
```
|
||||
```
|
||||
|
||||
## ⚠️ Security and Reliability Notice
|
||||
|
||||
These are example applications for demonstration purposes. When deploying such infrastructure in production environments, we strongly encourage you to follow these best practices for improved security and resiliency:
|
||||
|
||||
- Enable access logging on API Gateway ([documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html))
|
||||
- Ensure that AWS Lambda function is configured for function-level concurrent execution limit ([concurrency documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html), [configuration guide](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html))
|
||||
- Check encryption settings for Lambda environment variables ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html))
|
||||
- Ensure that AWS Lambda function is configured for a Dead Letter Queue (DLQ) ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq))
|
||||
- Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html), [code example](https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres))
|
||||
Reference in New Issue
Block a user