AWS powertools documentation change
Summary
Restructured documentation to streamline installation instructions, updated feature listings, and reorganized content sections. Removed detailed Lambda Layer/SAR implementation guides and replaced with concise installation overview. Added 'Development mode' section replacing 'Optimizing for non-production environments'.
Security assessment
Changes focus on documentation reorganization and installation simplification. No security vulnerabilities, fixes, or new security features are mentioned. The Data Masking feature remains documented but isn't newly added in this change.
Diff
diff --git a/powertools/python/latest.md b/powertools/python/latest.md index 8d77c191a..6b27c5672 100644 --- a//powertools/python/latest.md +++ b//powertools/python/latest.md @@ -30,0 +31 @@ Homepage + * [ Installation ](getting-started/install/) @@ -146,6 +146,0 @@ Table of contents - * Install - * Extra dependencies - * Local development - * Lambda Layer - * SAR - * Quick getting started @@ -152,0 +148 @@ Table of contents + * Examples @@ -154,2 +150 @@ Table of contents - * Optimizing for non-production environments - * Debug mode + * Development mode @@ -157 +151,0 @@ Table of contents - * Using Lambda Layers @@ -165,0 +160,2 @@ Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverles +Ready to use Powertools for AWS Lambda? Jump to [Installation](getting-started/install/). + @@ -174 +170 @@ All features - *  **Support this project** + * **Installation** @@ -178 +174 @@ All features -Become a public reference customer, share your work, contribute, use Lambda Layers, etc. +Install via pip, Lambda Layers, or SAR. @@ -180 +176 @@ Become a public reference customer, share your work, contribute, use Lambda Laye -Support +[ Get started](getting-started/install/) @@ -182 +178 @@ Support - * **Available languages** + *  **Support this project** @@ -186,1900 +182 @@ Support -Powertools for AWS Lambda is also available in other languages - -[Java](https://docs.aws.amazon.com/powertools/java/), [TypeScript](https://docs.aws.amazon.com/powertools/typescript/latest/), and [.NET](https://docs.aws.amazon.com/powertools/dotnet/) - - - - -## Install¶ - -You can install Powertools for AWS Lambda (Python) using your favorite dependency management, or Lambda Layers: - -PipLambda LayerLambda Layer (China)Lambda Layer (GovCloud)Serverless Application Repository (SAR)Alpha releases - -Most features use Python standard library and the AWS SDK _(boto3)_ that are available in the AWS Lambda runtime. - - * **pip** : **`pip install "aws-lambda-powertools"`** - * **poetry** : **`poetry add "aws-lambda-powertools"`** - * **pdm** : **`pdm add "aws-lambda-powertools"`** - * **uv** : **`uv add "aws-lambda-powertools"`** - - - -### Extra dependencies¶ - -However, you will need additional dependencies if you are using any of the features below: - -Feature | Install | Default dependency ----|---|--- -**[Tracer](core/tracer/#install)** | **`pip install "aws-lambda-powertools[tracer]"`** | `aws-xray-sdk` -**[Validation](utilities/validation/#install)** | **`pip install "aws-lambda-powertools[validation]"`** | `fastjsonschema` -**[Parser](utilities/parser/#install)** | **`pip install "aws-lambda-powertools[parser]"`** | `pydantic` _(v2)_ -**[Data Masking](utilities/data_masking/#install)** | **`pip install "aws-lambda-powertools[datamasking]"`** | `aws-encryption-sdk`, `jsonpath-ng` -**All extra dependencies at once** | **`pip install "aws-lambda-powertools[all]"`** | -**Two or more extra dependencies only, not all** | **`pip install "aws-lambda-powertools[tracer,parser,datamasking]"`** | - -[Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) is a .zip file archive that can contain additional code, pre-packaged dependencies, data, or configuration files. We compile and optimize all dependencies, and remove duplicate dependencies [already available in the Lambda runtime](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/layer_v3/docker/Dockerfile#L34) to achieve the most optimal size. - -For the latter, make sure to replace `{region}` with your AWS region, e.g., `eu-west-1`, and the `{python_version}` without the period (.), e.g., `python314` for `Python 3.14`. - -Architecture | Layer ARN ----|--- -x86_64 | **arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86_64:18** -ARM | **arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:18** - -AWS ConsoleAWS SSM Parameter StoreInfrastructure as Code (IaC)Inspect Lambda Layer contents - -You can add our layer using the [AWS Lambda Console _(direct link)_](https://console.aws.amazon.com/lambda/home#/add/layer): - - * Under Layers, choose `AWS layers` or `Specify an ARN` - * Click to copy the correct ARN value based on your AWS Lambda function architecture and region - - - -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: - -**CloudFormation** - -Sample Placeholders: - - * `{arch}` is either `arm64` (Graviton based functions) or `x86_64` - * `{python_version}` is the Python runtime version, e.g., `python3.14` for `Python 3.14`. - * `{version}` is the semantic version number (e,g. 3.1.0) for a release or `latest` - - - - - 1 - 2 - 3 - 4 - 5 - 6 - -| - - - MyFunction: - Type: "AWS::Lambda::Function" - Properties: - ... - Layers: - - {{resolve:ssm:/aws/service/powertools/python/{arch}/{python_version}/{version}}} - - ----|--- - -**Terraform** - -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. - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - -| - - - data "aws_ssm_parameter" "powertools_version" { - name = "/aws/service/powertools/python/{arch}/{python_version}/{version}" - } - - resource "aws_lambda_function" "test_lambda" { - ... - - runtime = "python3.14" - - layers = [data.aws_ssm_parameter.powertools_version.value] - } - - ----|--- - -> Are we missing a framework? please create [a documentation request](https://github.com/aws-powertools/powertools-lambda-python/issues/new?assignees=&labels=documentation%2Ctriage&projects=&template=documentation_improvements.yml&title=Docs%3A+TITLE). - -Thanks to the community, we've covered most popular frameworks on how to add a Lambda Layer to an existing function. - -x86_64arm64 - -SAMServerless frameworkCDKTerraformPulumiAmplify - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - -| - - - AWSTemplateFormatVersion: '2010-09-09' - Transform: AWS::Serverless-2016-10-31 - - Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Runtime: python3.12 - Handler: app.lambda_handler - Layers: - - !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:27 - - ----|--- - - - 1 - 2