Skip to content

Commit 6811800

Browse files
authored
Merge pull request #471 from awsdocs/python-update
Update blank-python runtime
2 parents ba8ef0a + 1264c49 commit 6811800

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

sample-apps/blank-python/README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,35 @@ The project source includes function code and supporting resources:
1111
Use the following instructions to deploy the sample application.
1212

1313
# Requirements
14-
- [Python 3.7](https://www.python.org/downloads/). Sample also works with Python 3.8 and 3.9.
14+
- [Python 3.11](https://www.python.org/downloads/). Sample also works with Python 3.9.
1515
- The Bash shell. For Linux and macOS, this is included by default. In Windows 10, you can install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to get a Windows-integrated version of Ubuntu and Bash.
1616
- [The AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) v1.17 or newer.
1717

1818
# Setup
1919
Download or clone this repository.
2020

21-
$ git clone https://github.com/awsdocs/aws-lambda-developer-guide.git
22-
$ cd aws-lambda-developer-guide/sample-apps/blank-python
21+
git clone https://github.com/awsdocs/aws-lambda-developer-guide.git
22+
cd aws-lambda-developer-guide/sample-apps/blank-python
2323

2424
To create a new bucket for deployment artifacts, run `1-create-bucket.sh`.
2525

26-
blank-python$ ./1-create-bucket.sh
26+
./1-create-bucket.sh
27+
28+
Example output:
29+
2730
make_bucket: lambda-artifacts-a5e491dbb5b22e0d
2831

2932
To build a Lambda layer that contains the function's runtime dependencies, run `2-build-layer.sh`. Packaging dependencies in a layer reduces the size of the deployment package that you upload when you modify your code.
3033

31-
blank-python$ ./2-build-layer.sh
34+
./2-build-layer.sh
3235

3336
# Deploy
3437
To deploy the application, run `3-deploy.sh`.
3538

36-
blank-python$ ./3-deploy.sh
39+
./3-deploy.sh
40+
41+
Example output:
42+
3743
Uploading to e678bc216e6a0d510d661ca9ae2fd941 9519118 / 9519118.0 (100.00%)
3844
Successfully packaged artifacts and wrote output template to file out.yml.
3945
Waiting for changeset to be created..
@@ -45,7 +51,10 @@ This script uses AWS CloudFormation to deploy the Lambda functions and an IAM ro
4551
# Test
4652
To invoke the function, run `4-invoke.sh`.
4753

48-
blank-python$ ./4-invoke.sh
54+
./4-invoke.sh
55+
56+
Example output:
57+
4958
{
5059
"StatusCode": 200,
5160
"ExecutedVersion": "$LATEST"
@@ -65,4 +74,4 @@ Choose a node in the main function graph. Then choose **View traces** to see a l
6574
# Cleanup
6675
To delete the application, run `5-cleanup.sh`.
6776

68-
blank-python$ ./5-cleanup.sh
77+
./5-cleanup.sh

sample-apps/blank-python/template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: AWS::Serverless::Function
77
Properties:
88
Handler: lambda_function.lambda_handler
9-
Runtime: python3.8
9+
Runtime: python3.11
1010
CodeUri: function/.
1111
Description: Call the AWS Lambda API
1212
Timeout: 10
@@ -25,4 +25,4 @@ Resources:
2525
Description: Dependencies for the blank-python sample app.
2626
ContentUri: package/.
2727
CompatibleRuntimes:
28-
- python3.8
28+
- python3.11

0 commit comments

Comments
 (0)