Skip to content

Commit

Permalink
Merge pull request #1228 from awslabs/DocsUpdate
Browse files Browse the repository at this point in the history
chore(all): doc update - newer lambda runtime versions
  • Loading branch information
biffgaut authored Oct 28, 2024
2 parents 204a5e7 + 03ad111 commit 6f0cb72
Show file tree
Hide file tree
Showing 33 changed files with 153 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const certificate = acm.Certificate.fromCertificateArn(
const constructProps: AlbToLambdaProps = {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
listenerProps: {
Expand Down Expand Up @@ -85,7 +85,7 @@ certificate = acm.Certificate.from_certificate_arn(
# MyStack(app, 'id', env=cdk.Environment(account='123456789012', region='us-east-1'))
AlbToLambda(self, 'new-construct',
lambda_function_props=_lambda.FunctionProps(
runtime=_lambda.Runtime.PYTHON_3_7,
runtime=_lambda.Runtime.Python_3_11,
code=_lambda.Code.from_asset('lambda'),
handler='index.handler',
),
Expand Down Expand Up @@ -121,7 +121,7 @@ ListenerCertificate listenerCertificate = ListenerCertificate
// .build());
new AlbToLambda(this, "AlbToLambdaPattern", new AlbToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';

new ApiGatewayToLambda(this, 'ApiGatewayToLambdaPattern', {
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(`lambda`)
}
Expand All @@ -51,7 +51,7 @@ from constructs import Construct

ApiGatewayToLambda(self, 'ApiGatewayToLambdaPattern',
lambda_function_props=_lambda.FunctionProps(
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler',
code=_lambda.Code.from_asset('lambda')
)
Expand All @@ -71,7 +71,7 @@ import software.amazon.awsconstructs.services.apigatewaylambda.*;

new ApiGatewayToLambda(this, "ApiGatewayToLambdaPattern", new ApiGatewayToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
new CloudFrontToApiGatewayToLambda(this, 'test-cloudfront-apigateway-lambda', {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
apiGatewayProps: {
Expand All @@ -57,7 +57,7 @@ from constructs import Construct
CloudFrontToApiGatewayToLambda(
self, 'CloudFrontApiGatewayToLambda',
lambda_function_props=_lambda.FunctionProps(
runtime=_lambda.Runtime.PYTHON_3_7,
runtime=_lambda.Runtime.Python_3_11,
code=_lambda.Code.from_asset('lambda'),
handler='hello.handler',
),
Expand Down Expand Up @@ -86,7 +86,7 @@ import software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.CloudFr

new CloudFrontToApiGatewayToLambda(this, "ApiGatewayToLambdaPattern", new CloudFrontToApiGatewayToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X) // execution environment
.runtime(Runtime.NODEJS_20_X) // execution environment
.code(Code.fromAsset("lambda")) // code loaded from the `lambda` directory (under root, next to `src`)
.handler("hello.handler") // file is `hello`, function is `handler`
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import * as api from 'aws-cdk-lib/aws-apigateway';

const lambdaProps: lambda.FunctionProps = {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
};

Expand Down Expand Up @@ -69,7 +69,7 @@ from constructs import Construct
lambda_function = _lambda.Function(self, 'LambdaFunction',
code=_lambda.Code.from_asset(
'lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler')

api_gateway = api.LambdaRestApi(self, 'LambdaRestApi',
Expand Down Expand Up @@ -99,7 +99,7 @@ import software.amazon.awscdk.services.apigateway.*;
import software.amazon.awsconstructs.services.cloudfrontapigateway.*;

final Function lambdaFunction = Function.Builder.create(this, "IndexHandler")
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
new CognitoToApiGatewayToLambda(this, 'test-cognito-apigateway-lambda', {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
}
});
Expand All @@ -55,7 +55,7 @@ from constructs import Construct
CognitoToApiGatewayToLambda(self, 'test-cognito-apigateway-lambda',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
)
)
Expand All @@ -75,7 +75,7 @@ import software.amazon.awsconstructs.services.cognitoapigatewaylambda.*;
new CognitoToApiGatewayToLambda(this, "test-cognito-apigateway-lambda",
new CognitoToApiGatewayToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand All @@ -94,7 +94,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
const construct = new CognitoToApiGatewayToLambda(this, 'test-cognito-apigateway-lambda', {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
apiGatewayProps: {
Expand Down Expand Up @@ -127,7 +127,7 @@ construct = CognitoToApiGatewayToLambda(self, 'test-cognito-apigateway-lambda',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset(
'lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
),
api_gateway_props=gateway_props(
Expand Down Expand Up @@ -163,7 +163,7 @@ final CognitoToApiGatewayToLambda construct = new CognitoToApiGatewayToLambda(th
"test-cognito-apigateway-lambda",
new CognitoToApiGatewayToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
const constructProps: DynamoDBStreamsToLambdaToElasticSearchAndKibanaProps = {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
domainName: 'test-domain',
Expand All @@ -69,7 +69,7 @@ DynamoDBStreamsToLambdaToElasticSearchAndKibana(
self, 'test-dynamodbstreams-lambda-elasticsearch-kibana',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
),
domain_name='test-domain',
Expand All @@ -91,7 +91,7 @@ import software.amazon.awsconstructs.services.dynamodbstreamslambdaelasticsearch
new DynamoDBStreamsToLambdaToElasticSearchAndKibana(this, "test-dynamodb-stream-lambda-elasticsearch-kibana",
new DynamoDBStreamsToLambdaToElasticSearchAndKibanaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
new DynamoDBStreamsToLambda(this, 'test-dynamodbstreams-lambda', {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
});
Expand All @@ -55,7 +55,7 @@ from constructs import Construct
DynamoDBStreamsToLambda(self, 'test-dynamodbstreams-lambda',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
)
)
Expand All @@ -74,7 +74,7 @@ import software.amazon.awsconstructs.services.dynamodbstreamslambda.*;
new DynamoDBStreamsToLambda(this, "test-dynamodbstreams-lambda",
new DynamoDBStreamsToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import * as events from 'aws-cdk-lib/aws-events';
const constructProps: EventbridgeToLambdaProps = {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
eventRuleProps: {
Expand All @@ -59,7 +59,7 @@ from constructs import Construct
EventbridgeToLambda(self, 'test-eventbridge-lambda',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
),
event_rule_props=events.RuleProps(
Expand All @@ -83,7 +83,7 @@ import software.amazon.awsconstructs.services.eventbridgelambda.*;
new EventbridgeToLambda(this, "test-eventbridge-lambda",
new EventbridgeToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
const constructProps: IotToLambdaToDynamoDBProps = {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
iotTopicRuleProps: {
Expand Down Expand Up @@ -66,7 +66,7 @@ from constructs import Construct
IotToLambdaToDynamoDB(self, 'test-iot-lambda-dynamodb-stack',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
),
iot_topic_rule_props=iot.CfnTopicRuleProps(
Expand Down Expand Up @@ -94,7 +94,7 @@ import software.amazon.awsconstructs.services.iotlambdadynamodb.*;

new IotToLambdaToDynamoDB(this, "test-iot-lambda-dynamodb-stack", new IotToLambdaToDynamoDBProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
const constructProps: IotToLambdaProps = {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
iotTopicRuleProps: {
Expand Down Expand Up @@ -66,7 +66,7 @@ from constructs import Construct
IotToLambda(self, 'test_iot_lambda',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
),
iot_topic_rule_props=iot.CfnTopicRuleProps(
Expand Down Expand Up @@ -94,7 +94,7 @@ import software.amazon.awsconstructs.services.iotlambda.*;

new IotToLambda(this, "test-iot-lambda-integration", new IotToLambdaProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ new KinesisStreamsToLambda(this, 'KinesisToLambdaPattern', {
batchSize: 1
},
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(`lambda`)
}
Expand All @@ -60,7 +60,7 @@ KinesisStreamsToLambda(self, 'KinesisToLambdaPattern',
batch_size=1
),
lambda_function_props=_lambda.FunctionProps(
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler',
code=_lambda.Code.from_asset(
'lambda')
Expand All @@ -86,7 +86,7 @@ new KinesisStreamsToLambda(this, "KinesisToLambdaPattern", new KinesisStreamsToL
.batchSize(1)
.build())
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
const constructProps: LambdaToDynamoDBProps = {
lambdaFunctionProps: {
code: lambda.Code.fromAsset(`lambda`),
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler'
},
};
Expand All @@ -54,7 +54,7 @@ LambdaToDynamoDB(self, 'test_lambda_dynamodb_stack',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset(
'lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
))
```
Expand All @@ -71,7 +71,7 @@ import software.amazon.awsconstructs.services.lambdadynamodb.*;

new LambdaToDynamoDB(this, "test_lambda_dynamodb_stack", new LambdaToDynamoDBProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';

new LambdaToElasticachememcached(this, 'LambdaToElasticachememcachedPattern', {
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_20_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(`lambda`)
}
Expand All @@ -51,7 +51,7 @@ from constructs import Construct
LambdaToElasticachememcached(self, 'LambdaToCachePattern',
lambda_function_props=_lambda.FunctionProps(
code=_lambda.Code.from_asset('lambda'),
runtime=_lambda.Runtime.PYTHON_3_9,
runtime=_lambda.Runtime.Python_3_11,
handler='index.handler'
)
)
Expand All @@ -69,7 +69,7 @@ import software.amazon.awsconstructs.services.lambdaelasticachememcached.*;

new LambdaToElasticachememcached(this, "LambdaToCachePattern", new LambdaToElasticachememcachedProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_16_X)
.runtime(Runtime.NODEJS_20_X)
.code(Code.fromAsset("lambda"))
.handler("index.handler")
.build())
Expand Down
Loading

0 comments on commit 6f0cb72

Please sign in to comment.