Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/deploy-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,8 @@ jobs:
FUNCTION_NAME="${EXAMPLE_NAME_CLEAN}-Python"
fi

# Extract handler file name
HANDLER_FILE=$(echo "${{ matrix.example.handler }}" | sed 's/\.handler$//')

echo "Deploying $HANDLER_FILE as $FUNCTION_NAME"
hatch run examples:deploy "$HANDLER_FILE" "$FUNCTION_NAME"
echo "Deploying ${{ matrix.example.name }} as $FUNCTION_NAME"
hatch run examples:deploy "${{ matrix.example.name }}" --function-name "$FUNCTION_NAME"

# Store function name for later steps
echo "FUNCTION_NAME=$FUNCTION_NAME" >> $GITHUB_ENV
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ dist/
.kiro/
.idea
.env

examples/build/*
examples/*.zip
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,47 @@ Mimic the package structure in the src/aws_durable_execution_sdk_python director
Name your module so that src/mypackage/mymodule.py has a dedicated unit test file
tests/mypackage/mymodule_test.py

## Examples and Deployment

The project includes a unified CLI tool for managing examples, deployment, and AWS account setup:

### Bootstrap AWS Account
```bash
# Set up IAM role and KMS key for durable functions
export AWS_ACCOUNT_ID=your-account-id
hatch run examples:bootstrap
```

### Build and Deploy Examples
```bash
# Build all examples with dependencies
hatch run examples:build

# Generate SAM template for all examples
hatch run examples:generate-sam

# List available examples
hatch run examples:list

# Deploy specific example (when durable functions are available)
hatch run examples:deploy "Hello World"
```

### Other CLI Commands
```bash
# Invoke deployed function
hatch run examples:invoke function-name --payload '{}'

# Get execution details
hatch run examples:get execution-arn

# Get execution history
hatch run examples:history execution-arn

# Clean build artifacts
hatch run examples:clean
```

## Coverage
```
hatch run test:cov
Expand Down
6 changes: 0 additions & 6 deletions examples/.env.template

This file was deleted.

4 changes: 0 additions & 4 deletions examples/.gitignore

This file was deleted.

44 changes: 0 additions & 44 deletions examples/README.md

This file was deleted.

49 changes: 0 additions & 49 deletions examples/build.py

This file was deleted.

Loading