Skip to content

Commit 7060619

Browse files
Addressing Heitor's feedback
1 parent 6e53ea4 commit 7060619

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

docs/automation.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@ This is a snapshot of our automated checks at a glance.
8989

9090
## Lambda layer pipeline
9191

92-
We fetch the latest PyPi release, then build Python **3.8-3.12** for **x86_64** and **arm64** architectures, using QEMU emulation for arm64. We create **a single CDK Asset** with x86_64 and arm for each Python version to optimize deployment performance.
92+
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. It provides a way to efficiently include libraries and other resources in your Lambda functions, promoting code reusability and reducing deployment package sizes.
93+
94+
To build and deploy the Lambda Layers, we run a pipeline with the following steps:
95+
96+
* We fetch the latest PyPi release and use it as the source for our layer.
97+
* We build Python versions ranging from **3.8 to 3.12** for x86_64 and arm64 architectures. This is necessary because we use pre-compiled libraries like **Pydantic** and **Cryptography**, which require specific Python versions for each layer.
98+
* We provide layer distributions for both the **x86_64** and **arm64** architectures.
99+
* For each Python version, we create a single CDK package containing both x86_64 and arm64 assets to optimize deployment performance.
93100

94101
Next, we deploy these CDK Assets to the beta account across all AWS regions. Once the beta deployment is complete, we run:
95102

@@ -117,16 +124,16 @@ graph LR
117124
P311 --> P311arm64[build arm64]
118125
P312 --> P312x86[build x86_64]
119126
P312 --> P312arm64[build arm64]
120-
P38x86 --> CDKP1[CDK Asset]
121-
P38arm64 --> CDKP1[CDK Asset]
122-
P39x86 --> CDKP2[CDK Asset]
123-
P39arm64 --> CDKP2[CDK Asset]
124-
P310x86 --> CDKP3[CDK Asset]
125-
P310arm64 --> CDKP3[CDK Asset]
126-
P311x86 --> CDKP4[CDK Asset]
127-
P311arm64 --> CDKP4[CDK Asset]
128-
P312x86 --> CDKP5[CDK Asset]
129-
P312arm64 --> CDKP5[CDK Asset]
127+
P38x86 --> CDKP1[CDK Package]
128+
P38arm64 --> CDKP1[CDK Package]
129+
P39x86 --> CDKP2[CDK Package]
130+
P39arm64 --> CDKP2[CDK Package]
131+
P310x86 --> CDKP3[CDK Package]
132+
P310arm64 --> CDKP3[CDK Package]
133+
P311x86 --> CDKP4[CDK Package]
134+
P311arm64 --> CDKP4[CDK Package]
135+
P312x86 --> CDKP5[CDK Package]
136+
P312arm64 --> CDKP5[CDK Package]
130137
end
131138
132139
subgraph beta ["BETA (all regions)"]
@@ -135,10 +142,10 @@ graph LR
135142
CDKP3 --> DeployBeta
136143
CDKP4 --> DeployBeta
137144
CDKP5 --> DeployBeta
138-
DeployBeta --> RunBetaCanary["Beta canary tests<br> <i>(all assets)</i>"]
145+
DeployBeta --> RunBetaCanary["Beta canary tests<br> <i>(all packages)</i>"]
139146
end
140147
subgraph prod ["PROD (all regions)"]
141148
RunBetaCanary---|<strong>If successful</strong>|DeployProd[Deploy to Prod]
142-
DeployProd --> RunProdCanary["Prod canary tests<br> <i>(all assets)</i>"]
149+
DeployProd --> RunProdCanary["Prod canary tests<br> <i>(all packages)</i>"]
143150
end
144151
```

0 commit comments

Comments
 (0)