You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skeleton/README.md.jinja
+41-8Lines changed: 41 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -36,14 +36,47 @@ just lint_full_ff # (fast-fail mode)
36
36
just all # (lint + tests)
37
37
just all_ff # (lint + tests in fast-fail mode)
38
38
```
39
-
40
39
{%- ifis_lambda_project%}
41
-
## Deployment to AWS Lambda
42
-
1. Package the application:
43
-
```bash
44
-
just build
45
-
```
46
40
47
-
2. You will see in `/build` directory a zip file ready for deployment to AWS Lambda.
48
-
{%- endif%}
41
+
## Building and Deployment
42
+
43
+
### Building the Lambda Package
44
+
45
+
The project includes a build system that packages the application for AWS Lambda deployment:
46
+
47
+
```bash
48
+
just build
49
+
```
50
+
51
+
This command:
52
+
1. Clears the previous build directory (`build/pkg`)
53
+
2. Generates a frozen requirements file without dev dependencies
54
+
3. Installs all dependencies targeting `x86_64-manylinux2014` platform (compatible with AWS Lambda)
55
+
4. Copies the lambda handler shim (`lambda_function.py`) to the package
56
+
5. Creates a timestamped zip file in the `build/` directory (e.g., `{{ project_name_snake_case }}_20260201_005935.zip`)
49
57
58
+
The resulting zip file contains:
59
+
- All Python dependencies
60
+
- The `{{ source_catalog_name }}` package with your application code
61
+
- A `lambda_function.py` shim that exposes the handler
62
+
63
+
### Lambda Handler Shim
64
+
65
+
The project uses a shim file (`lambda_function.py`) at the root level to expose the Lambda handler:
66
+
67
+
This allows AWS Lambda to use the default handler configuration `lambda_function.lambda_handler` while keeping the actual implementation inside the `{{ source_catalog_name }}` package.
68
+
69
+
**Package Structure:**
70
+
```
71
+
build/pkg/
72
+
├── lambda_function.py # Shim that exposes the handler
73
+
├── {{ source_catalog_name }}/
74
+
│ ├── __init__.py
75
+
│ ├── lambda_function.py # Actual handler implementation
76
+
│ └── ...
77
+
├── aws_lambda_powertools/
78
+
└── ... (other dependencies)
79
+
```
80
+
81
+
**Note:** The shim file can be safely deleted if you update the AWS Lambda **Runtime settings** → **Handler** configuration to point directly to `{{ project_name_snake_case }}.lambda_function.lambda_handler`.
0 commit comments