Skip to content

ci: deploy examples with SAM stack#517

Draft
zhongkechen wants to merge 1 commit into
mainfrom
codex/sam-deploy-examples
Draft

ci: deploy examples with SAM stack#517
zhongkechen wants to merge 1 commit into
mainfrom
codex/sam-deploy-examples

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • deploy all Python examples through a SAM stack instead of one Lambda at a time
  • run cloud example tests once per supported Python version (3.11, 3.12, 3.13, 3.14)
  • serialize cloud deployments per Python version with a job concurrency group
  • prefix deployed stack/function names with the Python version prefix, for example Py314
  • generate the SAM template on the fly from the examples catalog and remove the checked-in template/update workflow
  • replace the examples deploy CLI with a SAM packaging build script
  • assume the test deployment role from TEST_ROLE_ARN and verify it lands in TEST_ACCOUNT_ID
  • use the pre-existing Lambda execution role from TEST_LAMBDA_EXECUTION_ROLE_ARN for all example functions
  • pass a full example-to-function map into cloud tests and update docs for stack deployment
  • remove the deploy workflow path filter so it runs for every PR targeting main

Testing

  • hatch fmt --check
  • python3 -m py_compile packages/aws-durable-execution-sdk-python-examples/scripts/generate_sam_template.py packages/aws-durable-execution-sdk-python-examples/scripts/generate_function_name_map.py packages/aws-durable-execution-sdk-python-examples/scripts/build_examples.py packages/aws-durable-execution-sdk-python-examples/test/conftest.py
  • hatch run examples:generate-sam-template
  • generated-template assertion: 61 functions use LambdaExecutionRoleArn and no DurableFunctionRole resource is present
  • python3 packages/aws-durable-execution-sdk-python-examples/scripts/generate_function_name_map.py --function-name-prefix PythonPr517-
  • sam validate --template-file packages/aws-durable-execution-sdk-python-examples/template.generated.json --region us-west-2
  • sam build --template-file packages/aws-durable-execution-sdk-python-examples/template.generated.json
  • git diff --check

Previously also ran:

  • hatch run dev-examples:test -k test_hello_world
  • hatch run examples:build

Did not run an actual AWS deploy locally.

@zhongkechen zhongkechen force-pushed the codex/sam-deploy-examples branch 2 times, most recently from 00edfd0 to 65c6d03 Compare July 7, 2026 21:47
@zhongkechen zhongkechen self-assigned this Jul 7, 2026
@zhongkechen zhongkechen force-pushed the codex/sam-deploy-examples branch 6 times, most recently from b2e0bdd to fa5354d Compare July 7, 2026 22:28
@zhongkechen zhongkechen force-pushed the codex/sam-deploy-examples branch from fa5354d to fe57dcf Compare July 7, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant