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
| ARM | __arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:4__{: .copyMe}:clipboard: |
74
74
75
-
We offer Parameter Store aliases for releases too, allowing you to specify either specific versions or use the latest version on every deploy. To use these you can add these snippets to your AWS CloudFormation or Terraform projects:
76
-
77
-
**CloudFormation**
78
-
79
-
Sample Placeholders:
80
-
- `{arch}` is either `arm64` (Graviton based functions) or `x86_64`
81
-
- `{python_version}` is the Python version without the period (.), e.g., `python313` for `Python 3.13`.
82
-
- `{version}` is the semantic version number (e,g. 3.1.0) for a release or `latest`
You can add our layer using the [AWS Lambda Console _(direct link)_](https://console.aws.amazon.com/lambda/home#/add/layer){target="_blank"}:
94
78
95
-
Using the [`aws_ssm_parameter`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) data provider from the AWS Terraform provider allows you to lookup the value of parameters to use later in your project.
79
+
* Under Layers, choose `AWS layers` or `Specify an ARN`
80
+
* Click to copy the [correct ARN](#lambda-layer) value based on your AWS Lambda function architecture and region
96
81
97
-
```
98
-
data "aws_ssm_parameter" "powertools_version" {
99
-
name = "/aws/service/powertools/python/{arch}/{python_version}/{version}"
100
-
}
101
82
102
-
resource "aws_lambda_function" "test_lambda" {
103
-
...
83
+
=== "AWS SSM Parameter Store"
84
+
We offer Parameter Store aliases for releases too, allowing you to specify either specific versions or use the latest version on every deploy. To use these you can add these snippets to your AWS CloudFormation or Terraform projects:
- `{arch}` is either `arm64` (Graviton based functions) or `x86_64`
91
+
- `{python_version}` is the Python version without the period (.), e.g., `python313` for `Python 3.13`.
92
+
- `{version}` is the semantic version number (e,g. 3.1.0) for a release or `latest`
112
93
113
-
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install), and remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-layer-cdk/blob/d24716744f7d1f37617b4998c992c4c067e19e64/layer/Python/Dockerfile#L36){target="_blank"} to achieve the most optimal size.
For the latter, make sure to replace `{python_version}` without the period (.), e.g., `python313` for `Python 3.13`.
103
+
**Terraform**
116
104
117
-
**AWS GovCloud (us-gov-east-1)**
105
+
Using the [`aws_ssm_parameter`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) data provider from the AWS Terraform provider allows you to lookup the value of parameters to use later in your project.
@@ -227,6 +210,26 @@ You can install Powertools for AWS Lambda (Python) using your favorite dependenc
227
210
228
211
You'll find the pre-signed URL under `Location` key as part of the CLI command output.
229
212
213
+
=== "Lambda Layer (GovCloud)"
214
+
215
+
[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html){target="_blank"} is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize [all dependencies](#install), and remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-layer-cdk/blob/d24716744f7d1f37617b4998c992c4c067e19e64/layer/Python/Dockerfile#L36){target="_blank"} to achieve the most optimal size.
216
+
217
+
For the latter, make sure to replace `{python_version}` without the period (.), e.g., `python313` for `Python 3.13`.
0 commit comments