Skip to content

Commit e7a0a72

Browse files
author
Sebastien Stormacq
committed
add ecurity and resilience notice in each template.yaml file
1 parent 9e748ec commit e7a0a72

File tree

10 files changed

+157
-0
lines changed

10 files changed

+157
-0
lines changed

Examples/APIGateway+LambdaAuthorizer/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for APIGateway Lambda Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# The API Gateway
723
MyProtectedApi:

Examples/APIGateway/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for APIGateway Lambda Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
APIGatewayLambda:

Examples/APIGatewayV1/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for APIGateway Lambda Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
APIGatewayLambda:

Examples/HummingbirdLambda/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for Hummingbird Lambda Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
HBLambda:

Examples/S3_AWSSDK/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for AWS SDK Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
AWSSDKExample:

Examples/S3_Soto/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for AWS SDK Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
SotoExample:

Examples/ServiceLifecycle+Postgres/template.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for ServiceLifecycle Lambda with PostgreSQL RDS
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
518
Parameters:
619

720
DBName:

Examples/Streaming+Codable/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for StreamingfromEvent Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
StreamingCodable:

Examples/Streaming/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for Streaming Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
StreamingNumbers:

Examples/Testing/template.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Transform: AWS::Serverless-2016-10-31
33
Description: SAM Template for APIGateway Lambda Example
44

5+
# This is an example SAM template for the purpose of this project.
6+
# When deploying such infrastructure in production environment,
7+
# we strongly encourage you to follow these best practices for improved security and resiliency
8+
# - Enable access loggin on API Gateway
9+
# See: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html)
10+
# - Ensure that AWS Lambda function is configured for function-level concurrent execution limit
11+
# See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html
12+
# https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
13+
# - Check encryption settings for Lambda environment variable
14+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html
15+
# - Ensure that AWS Lambda function is configured for a Dead Letter Queue(DLQ)
16+
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
17+
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
18+
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
19+
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
20+
521
Resources:
622
# Lambda function
723
APIGatewayLambda:

0 commit comments

Comments
 (0)