Update AWS Lambda runtimes to PYTHON_3_12, which uses AL2023 (ref)
Update CodeBuild image to AMAZON_LINUX_2_5, which is also based on AL2023, and supports python3.12 (ref)
Update Cloud9Setup scripts, since the default Cloud9 platform is now AL2023:
Use node v20.12.2 for AL2023.
Use Python 3.11 for AL2023. Unfortunately, setting python3 through alternatives breaks yum and dnf, unless you explicitly set the system Python 3.9 as the interpreter, so included logic for that step.
Note: the Python version in the Cloud9 environment is one minor version behind the runtimes on 3.11, but the Cloud9 environment was also one minor version behind previously - so hopefully this isn't an issue. AL2023 did not have a python3.12 package available at time of writing (ref).
Bump sam-cli version to 1.115.0 (latest) to support python3.12 container image (based on AL2023).
Include conditional logic in Cloud9Setup/pre-requisites.sh to ensure backward compatibility with AL2 for python3.8 and node, since I'm not sure how many users will select that platform instead, but LMK if we should assume AL2023 in all cases and remove.
Bootstrapping on Cloud9 has been tested for both the default Amazon Linux 2023 and Amazon Linux 2 platform on t3.large. Note for Amazon Linux 2, I did not change the default pre-loaded node version, since 16.X is EOL. Default node version through nvm on an Amazon Linux 2 Cloud9 instance below:
$ node --version
v18.17.1
$ npm --version
10.5.2
I can submit a PR for the associated workshop as well once changes are discussed and approved.
Manual e2e tests performed (based on workshop, lab 1 through 5):
Add a Tenant (tenant1) through SaaS Admin.
As Tenant Admin for tenant1, add product on SaaS Commerce Application. Add order for product.
Add a Tenant (tenant2) through Landing page.
As a Tenant Admin for tenant2, add product on SaaS Commerce Application. Add erder for product. Verify isolation from tenant1 in Application, and entries in the Product-pooled and Order-pooled DynamoDB tables.
Add a Tenant (tenant3) through Landing page as Platinum tier.
Verify the CodePipeline serverless-saas-pipeline workflow completes successfully, and a new environment for the platinum tenant is deployed through CloudFormation successfully (i.e. - stack-<tenantId>).
As a Tenant Admin for tenant3, add Product on SaaS Commerce Application. Add order for product. Verify product and order items are added to their respective, isolated tenant3 DynamoDB tables.
I believe the client environment files are tracked in this repo intentionally. I did not remove and add them to .gitignore. On my local branch, I used git update-index to skip the respective clients/{Admin,Application,Landing}/environments/* files. I also skipped server/samconfig-boostrap.toml and clients/Admin/src/aws-exports.ts. This shouldn't have any effect on the remote branches, but JFYI and for posterity.
i.e. -
git update-index --skip-worktree clients/Admin/src/environments/*
Thanks!
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes:
Update AWS Lambda runtimes to
PYTHON_3_12
, which uses AL2023 (ref)Update CodeBuild image to
AMAZON_LINUX_2_5
, which is also based on AL2023, and supports python3.12 (ref)Update
Cloud9Setup
scripts, since the default Cloud9 platform is now AL2023:v20.12.2
for AL2023.python3
through alternatives breaksyum
anddnf
, unless you explicitly set the system Python 3.9 as the interpreter, so included logic for that step.sam-cli
version to1.115.0
(latest) to supportpython3.12
container image (based on AL2023).Cloud9Setup/pre-requisites.sh
to ensure backward compatibility with AL2 for python3.8 and node, since I'm not sure how many users will select that platform instead, but LMK if we should assume AL2023 in all cases and remove.Bootstrapping on Cloud9 has been tested for both the default Amazon Linux 2023 and Amazon Linux 2 platform on
t3.large
. Note for Amazon Linux 2, I did not change the default pre-loaded node version, since 16.X is EOL. Defaultnode
version through nvm on an Amazon Linux 2 Cloud9 instance below:I can submit a PR for the associated workshop as well once changes are discussed and approved.
Manual e2e tests performed (based on workshop, lab 1 through 5):
serverless-saas-pipeline
workflow completes successfully, and a new environment for the platinum tenant is deployed through CloudFormation successfully (i.e. -stack-<tenantId>
).I believe the client environment files are tracked in this repo intentionally. I did not remove and add them to
.gitignore
. On my local branch, I usedgit update-index
to skip the respectiveclients/{Admin,Application,Landing}/environments/*
files. I also skippedserver/samconfig-boostrap.toml
andclients/Admin/src/aws-exports.ts
. This shouldn't have any effect on the remote branches, but JFYI and for posterity.i.e. -
git update-index --skip-worktree clients/Admin/src/environments/*
Thanks!
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.