diff --git a/.tools/README.md b/.tools/README.md index 7e2f516829b..5db274ddf6f 100644 --- a/.tools/README.md +++ b/.tools/README.md @@ -67,7 +67,7 @@ Python 3.8 - [PEP 586](http://www.python.org/dev/peps/pep-0586), Literal types. - [PEP 589](http://www.python.org/dev/peps/pep-0589), TypedDict. -Python 3.7 +Python 3.9 - [PEP 557](http://www.python.org/dev/peps/pep-0557), Data Classes. diff --git a/.tools/test/stacks/plugin/python/consumer_stack/consumer_stack.py b/.tools/test/stacks/plugin/python/consumer_stack/consumer_stack.py index cc66ec1625a..4991243fa34 100644 --- a/.tools/test/stacks/plugin/python/consumer_stack/consumer_stack.py +++ b/.tools/test/stacks/plugin/python/consumer_stack/consumer_stack.py @@ -178,7 +178,7 @@ def init_batch_lambda(self, job_queue, job_definition): function = _lambda.Function( self, f"SubmitBatchJob-{tool_name}", - runtime=_lambda.Runtime.PYTHON_3_8, + runtime=_lambda.Runtime.PYTHON_3_9, handler="submit_job.handler", role=execution_role, code=_lambda.Code.from_asset("lambda"), @@ -301,7 +301,7 @@ def init_log_function(self, admin_bucket_name): lambda_function = _lambda.Function( self, "BatchJobCompleteLambda", - runtime=_lambda.Runtime.PYTHON_3_8, + runtime=_lambda.Runtime.PYTHON_3_9, handler="export_logs.handler", role=execution_role, code=_lambda.Code.from_asset("lambda"), diff --git a/.tools/test/stacks/plugin/typescript/plugin_stack.ts b/.tools/test/stacks/plugin/typescript/plugin_stack.ts index a182f13f3f2..33d6b341dbe 100644 --- a/.tools/test/stacks/plugin/typescript/plugin_stack.ts +++ b/.tools/test/stacks/plugin/typescript/plugin_stack.ts @@ -192,7 +192,7 @@ class PluginStack extends cdk.Stack { ); return new lambda.Function(this, `SubmitBatchJob-${toolName}`, { - runtime: lambda.Runtime.PYTHON_3_8, + runtime: lambda.Runtime.PYTHON_3_9, handler: "submit_job.handler", code: lambda.Code.fromAsset("lambda"), environment: { @@ -314,7 +314,7 @@ class PluginStack extends cdk.Stack { // Define the Lambda function. const lambdaFunction = new lambda.Function(this, "BatchJobCompleteLambda", { - runtime: lambda.Runtime.PYTHON_3_8, + runtime: lambda.Runtime.PYTHON_3_9, handler: "export_logs.handler", role: executionRole, code: lambda.Code.fromAsset("lambda"), diff --git a/cpp/example_code/lambda/get_started_with_functions_scenario.cpp b/cpp/example_code/lambda/get_started_with_functions_scenario.cpp index aeea20be9e7..a9a16991636 100644 --- a/cpp/example_code/lambda/get_started_with_functions_scenario.cpp +++ b/cpp/example_code/lambda/get_started_with_functions_scenario.cpp @@ -188,7 +188,7 @@ bool AwsDoc::Lambda::getStartedWithFunctionsScenario( #error "Unimplemented architecture" #endif // defined(architecture) #else - request.SetRuntime(Aws::Lambda::Model::Runtime::python3_8); + request.SetRuntime(Aws::Lambda::Model::Runtime::python3_9); #endif request.SetRole(roleArn); request.SetHandler(LAMBDA_HANDLER_NAME); diff --git a/gov2/lambda/actions/functions.go b/gov2/lambda/actions/functions.go index 55ff0bc461e..332c261d2c5 100644 --- a/gov2/lambda/actions/functions.go +++ b/gov2/lambda/actions/functions.go @@ -62,7 +62,7 @@ func (wrapper FunctionWrapper) CreateFunction(ctx context.Context, functionName Role: iamRoleArn, Handler: aws.String(handlerName), Publish: true, - Runtime: types.RuntimePython38, + Runtime: types.RuntimePython39, }) if err != nil { var resConflict *types.ResourceConflictException diff --git a/python/cross_service/apigateway_covid-19_tracker/README.md b/python/cross_service/apigateway_covid-19_tracker/README.md index 100fcc67c52..5fa5f937632 100644 --- a/python/cross_service/apigateway_covid-19_tracker/README.md +++ b/python/cross_service/apigateway_covid-19_tracker/README.md @@ -24,7 +24,7 @@ tutorials in the - You must have an AWS account, and have your default credentials and AWS Region configured as described in the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- Python 3.7 or later +- Python 3.9 or later - An Amazon S3 bucket ## Cautions diff --git a/python/cross_service/aurora_rest_lending_library/README.md b/python/cross_service/aurora_rest_lending_library/README.md index 81584547b18..11f7fb9bcf4 100644 --- a/python/cross_service/aurora_rest_lending_library/README.md +++ b/python/cross_service/aurora_rest_lending_library/README.md @@ -19,7 +19,7 @@ and out of the database. - You must have an AWS account, and have your default credentials and AWS Region configured as described in the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- Python 3.7 or later +- Python 3.9 or later ## Cautions diff --git a/python/cross_service/stepfunctions_messenger/README.md b/python/cross_service/stepfunctions_messenger/README.md index e0d6080c590..0034c6587f7 100644 --- a/python/cross_service/stepfunctions_messenger/README.md +++ b/python/cross_service/stepfunctions_messenger/README.md @@ -18,7 +18,7 @@ integrations. - You must have an AWS account, and have your default credentials and AWS Region configured as described in the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- Python 3.7 or later +- Python 3.9 or later - Boto3 1.14.47 or later - PyTest 5.3.5 or later (to run unit tests) diff --git a/python/example_code/dynamodb/README.md b/python/example_code/dynamodb/README.md index ba6dfeff760..0853a0648a6 100644 --- a/python/example_code/dynamodb/README.md +++ b/python/example_code/dynamodb/README.md @@ -152,7 +152,7 @@ The tutorial shows you how to set up the following additional resources: - A VPC from Amazon Virtual Private Cloud (Amazon VPC) - A DAX cluster set up in your VPC - An EC2 instance running in your VPC with the following installed: - - Python 3.7 or later + - Python 3.9 or later - Boto3 1.11.10 or later - Amazon DAX Client for Python 1.1.7 or later diff --git a/python/example_code/greengrass/README.md b/python/example_code/greengrass/README.md index 0bc29981dc5..87feff26e4c 100644 --- a/python/example_code/greengrass/README.md +++ b/python/example_code/greengrass/README.md @@ -14,7 +14,7 @@ and are not intended to be used out of context. - You must have an AWS account, and have your default credentials and AWS Region configured as described in the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- Python 3.7 +- Python 3.9 - GreengrassSdk 1.6.0 or later - PyTest 5.3.5 or later (to run unit tests) diff --git a/python/example_code/lambda/lambda_basics.py b/python/example_code/lambda/lambda_basics.py index 7708963f447..f94e5cadcd0 100644 --- a/python/example_code/lambda/lambda_basics.py +++ b/python/example_code/lambda/lambda_basics.py @@ -160,7 +160,7 @@ def create_function( response = self.lambda_client.create_function( FunctionName=function_name, Description="AWS Lambda doc example", - Runtime="python3.8", + Runtime="python3.9", Role=iam_role.arn, Handler=handler_name, Code={"ZipFile": deployment_package}, diff --git a/python/example_code/s3/file_transfer/README.md b/python/example_code/s3/file_transfer/README.md index f8a5f50aaf8..10fc127d21b 100644 --- a/python/example_code/s3/file_transfer/README.md +++ b/python/example_code/s3/file_transfer/README.md @@ -39,7 +39,7 @@ amount of data at any time, from anywhere on the web.* - You must have an AWS account, and have your default credentials and AWS Region configured as described in the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- Python 3.7 or later +- Python 3.9 or later - Boto3 1.11.10 or later - PyTest 5.3.5 or later (to run unit tests) diff --git a/python/example_code/s3/s3_versioning/batch_versioning.py b/python/example_code/s3/s3_versioning/batch_versioning.py index d77d03fff0a..4d3d833f7b0 100644 --- a/python/example_code/s3/s3_versioning/batch_versioning.py +++ b/python/example_code/s3/s3_versioning/batch_versioning.py @@ -185,7 +185,7 @@ def create_lambda_function( response = custom_retry( lambda: aws_lambda.create_function( FunctionName=function_name, - Runtime="python3.8", + Runtime="python3.9", Role=iam_role.arn, Handler=handler, Code={ diff --git a/resources/cdk/python_example_code_apigateway_websocket/setup.ts b/resources/cdk/python_example_code_apigateway_websocket/setup.ts index 7a48c57c227..69a14d81fc6 100644 --- a/resources/cdk/python_example_code_apigateway_websocket/setup.ts +++ b/resources/cdk/python_example_code_apigateway_websocket/setup.ts @@ -9,7 +9,7 @@ // * An AWS Identity and Access Management (IAM) role and policy that grants // AWS Lambda permission to access the DynamoDB table and have basic rights to // run functions. -// * A Lambda function that runs on Python 3.7 and has an environment variable +// * A Lambda function that runs on Python 3.9 and has an environment variable // that contains the DynamoDB table name. The function code is updated as part // of the example. // @@ -64,7 +64,7 @@ export class SetupStack extends cdk.Stack { ); const fn = new Function(this, "doc-example-apigateway-websocket-connect", { - runtime: Runtime.PYTHON_3_7, + runtime: Runtime.PYTHON_3_9, handler: "lambda_chat.lambda_handler", code: Code.fromInline( "# This placeholder is replaced during code example deployment." diff --git a/resources/cdk/python_example_code_stepfunctions_demo/setup.ts b/resources/cdk/python_example_code_stepfunctions_demo/setup.ts index c9b912103e1..b928c81b5d0 100644 --- a/resources/cdk/python_example_code_stepfunctions_demo/setup.ts +++ b/resources/cdk/python_example_code_stepfunctions_demo/setup.ts @@ -66,7 +66,7 @@ export class SetupStack extends cdk.Stack { this, "doc-example-stepfunctions-scan-messages", { - runtime: Runtime.PYTHON_3_7, + runtime: Runtime.PYTHON_3_9, handler: "index.lambda_handler", code: Code.fromInline( "import boto3\n" + diff --git a/sap-abap/services/lambda/zcl_aws1_lmd_actions.clas.testclasses.abap b/sap-abap/services/lambda/zcl_aws1_lmd_actions.clas.testclasses.abap index 89ddfa7618b..dfd415fde9d 100644 --- a/sap-abap/services/lambda/zcl_aws1_lmd_actions.clas.testclasses.abap +++ b/sap-abap/services/lambda/zcl_aws1_lmd_actions.clas.testclasses.abap @@ -299,7 +299,7 @@ CLASS ltc_zcl_aws1_lmd_actions IMPLEMENTATION. DATA(lo_result) = ao_lmd_actions->update_function_configuration( iv_function_name = cv_function_name - iv_runtime = `python3.8` + iv_runtime = `python3.9` iv_memory_size = 150 ). @@ -321,7 +321,7 @@ CLASS ltc_zcl_aws1_lmd_actions IMPLEMENTATION. ). cl_abap_unit_assert=>assert_equals( - exp = `python3.8` + exp = `python3.9` act = lo_result->get_runtime( ) msg = |Function's runtime did not match expected value | ).