All notable changes to this project will be documented in this file.
This project follows Keep a Changelog format for changes and adheres to Semantic Versioning.
- apigateway: allow list of HTTP methods in route method (#838)
- event-sources: pass authorizer data to APIGatewayEventAuthorizer (#897)
- event-sources: handle claimsOverrideDetails set to null (#878)
- idempotency: include decorated fn name in hash (#869)
- metrics: explicit type to single_metric ctx manager (#865)
- parameters: mypy appconfig transform and return types (#877)
- parser: mypy overload parse when using envelope (#885)
- parser: kinesis sequence number is str, not int (#907)
- parser: mypy support for payload type override as models (#883)
- tracer: add warm start annotation (ColdStart=False) (#851)
- nav: reference cloudformation custom resource helper (CRD) (#914)
- add new public Slack invite
- disable search blur in non-prod env
- update Lambda Layers version
- apigateway: add new not_found feature (#915)
- apigateway: fix sample layout provided (#864)
- appsync: fix users.py typo to locations #830
- lambda_layer: fix CDK layer syntax
- apigateway: add exception_handler support (#898)
- apigateway: access parent api resolver from router (#842)
- batch: new BatchProcessor for SQS, DynamoDB, Kinesis (#886)
- logger: allow handler with custom kwargs signature (#913)
- tracer: add service annotation when service is set (#861)
- minor housekeeping before release (#912)
- correct pr label order
- ci: split latest docs workflow
- deps: bump fastjsonschema from 2.15.1 to 2.15.2 (#891)
- deps: bump actions/setup-python from 2.2.2 to 2.3.0 (#831)
- deps: support arm64 when developing locally (#862)
- deps: bump actions/setup-python from 2.3.0 to 2.3.1 (#852)
- deps: bump aws-xray-sdk from 2.8.0 to 2.9.0 (#876)
- deps-dev: bump mypy from 0.910 to 0.920 (#903)
- deps-dev: bump flake8 from 3.9.2 to 4.0.1 (#789)
- deps-dev: bump black from 21.10b0 to 21.11b1 (#839)
- deps-dev: bump black from 21.11b1 to 21.12b0 (#872)
Tenet update! We've updated Idiomatic tenet to Progressive to reflect the new Router feature in Event Handler, and more importantly the new wave of customers coming from SRE, Data Analysis, and Data Science background.
- BEFORE: Idiomatic. Utilities follow programming language idioms and language-specific best practices.
- AFTER: Progressive. Utilities are designed to be incrementally adoptable for customers at any stage of their Serverless journey. They follow language idioms and their community’s common practices.
- ci: change supported python version from 3.6.1 to 3.6.2, bump black (#807)
- ci: skip sync master on docs hotfix
- parser: body and query strings can be null or omitted in ApiGatewayProxyEventModel and ApiGatewayProxyEventV2Model (#820)
- apigateway: Add BaseRouter and duplicate route check (#757)
- docs: updated Lambda Layers definition & limitations. (#775)
- docs: Idiomatic tenet updated to Progressive
- docs: use higher contrast font to improve accessibility (#822)
- docs: fix indentation of SAM snippets in install section (#778)
- docs: improve public lambda layer wording, add clipboard buttons to improve UX (#762)
- docs: add amplify-cli instructions for public layer (#754)
- api-gateway: add new router feature to allow route splitting in API Gateway and ALB (#767)
- apigateway: re-add sample layout, add considerations (#826)
- appsync: add new router feature to allow GraphQL Resolver composition (#821)
- idempotency: add support for DynamoDB composite keys (#808)
- tenets: update Idiomatic tenet to Progressive (#823)
- docs: remove Lambda Layer version tag
- apigateway: add Router to allow large routing composition (#645)
- appsync: add Router to allow large resolver composition (#776)
- data-classes: ActiveMQ and RabbitMQ support (#770)
- logger: add ALB correlation ID support (#816)
- deps: bump boto3 from 1.19.6 to 1.20.3 (#809)
- deps: bump boto3 from 1.18.58 to 1.18.59 (#760)
- deps: bump urllib3 from 1.26.4 to 1.26.5 (#787)
- deps: bump boto3 from 1.18.61 to 1.19.6 (#783)
- deps: bump boto3 from 1.18.56 to 1.18.58 (#755)
- deps: bump boto3 from 1.18.59 to 1.18.61 (#766)
- deps: bump boto3 from 1.20.3 to 1.20.5 (#817)
- deps-dev: bump coverage from 6.0.1 to 6.0.2 (#764)
- deps-dev: bump pytest-asyncio from 0.15.1 to 0.16.0 (#782)
- deps-dev: bump flake8-eradicate from 1.1.0 to 1.2.0 (#784)
- deps-dev: bump flake8-comprehensions from 3.6.1 to 3.7.0 (#759)
- deps-dev: bump flake8-isort from 4.0.0 to 4.1.1 (#785)
- deps-dev: bump coverage from 6.0 to 6.0.1 (#751)
- deps-dev: bump mkdocs-material from 7.3.3 to 7.3.5 (#781)
- deps-dev: bump mkdocs-material from 7.3.5 to 7.3.6 (#791)
- deps-dev: bump mkdocs-material from 7.3.2 to 7.3.3 (#758)
- metrics: typing regression on log_metrics callable (#744)
- add new public layer ARNs (#746)
- ignore constants in test cov (#745)
- github-actions: add support for publishing fallback
- deps: bump boto3 from 1.18.54 to 1.18.56 (#742)
- deps-dev: bump mkdocs-material from 7.3.1 to 7.3.2 (#741)
- data-classes: use correct asdict funciton (#666)
- feature-flags: rules should evaluate with an AND op (#724)
- idempotency: sorting keys before hashing (#722)
- idempotency: sorting keys before hashing
- logger: push extra keys to the end (#722)
- mypy: a few return types, type signatures, and untyped areas (#718)
- data-classes: clean up internal logic for APIGatewayAuthorizerResponse (#643)
- Terraform reference for SAR Lambda Layer (#716)
- event-handler: document catch-all routes (#705)
- idempotency: fix misleading idempotent examples (#661)
- jmespath: clarify envelope terminology
- parser: fix incorrect import in root_validator example (#735)
- expose jmespath powertools functions (#736)
- boto3 sessions in batch, parameters & idempotency (#717)
- feature-flags: add get_raw_configuration property in store; expose store (#720)
- feature-flags: Bring your own logger for debug (#709)
- feature-flags: improve "IN/NOT_IN"; new rule actions (#710)
- feature-flags: get_raw_configuration property in Store (#720)
- feature_flags: Added inequality conditions (#721)
- idempotency: makes customers unit testing easier (#719)
- validator: include missing data elements from a validation error (#686)
- add python 3.9 support
- deps: bump boto3 from 1.18.51 to 1.18.54 (#733)
- deps: bump boto3 from 1.18.32 to 1.18.38 (#671)
- deps: bump boto3 from 1.18.38 to 1.18.41 (#677)
- deps: bump boto3 from 1.18.49 to 1.18.51 (#713)
- deps: bump boto3 from 1.18.41 to 1.18.49 (#703)
- deps: bump codecov/codecov-action from 2.0.2 to 2.1.0 (#675)
- deps-dev: bump coverage from 5.5 to 6.0 (#732)
- deps-dev: bump mkdocs-material from 7.2.8 to 7.3.0 (#695)
- deps-dev: bump mkdocs-material from 7.2.6 to 7.2.8 (#682)
- deps-dev: bump flake8-bugbear from 21.4.3 to 21.9.1 (#676)
- deps-dev: bump flake8-bugbear from 21.9.1 to 21.9.2 (#712)
- deps-dev: bump radon from 4.5.2 to 5.1.0 (#673)
- deps-dev: bump mkdocs-material from 7.3.0 to 7.3.1 (#731)
- deps-dev: bump xenon from 0.7.3 to 0.8.0 (#669)
- event-handler: fix issue with strip_prefixes and root level resolvers (#646)
- deps: bump boto3 from 1.18.26 to 1.18.32 (#663)
- deps-dev: bump mkdocs-material from 7.2.4 to 7.2.6 (#665)
- deps-dev: bump pytest from 6.2.4 to 6.2.5 (#662)
- deps-dev: bump mike from 0.6.0 to 1.0.1 (#453)
- license: add third party license to pyproject.toml (#641)
- event-handler: fix issue with strip_prefixes and root level resolvers (#646)
- deps: bump boto3 from 1.18.26 to 1.18.32 (#663)
- deps-dev: bump mkdocs-material from 7.2.4 to 7.2.6 (#665)
- deps-dev: bump pytest from 6.2.4 to 6.2.5 (#662)
- deps-dev: bump mike from 0.6.0 to 1.0.1 (#453)
- license: add third party license to pyproject.toml (#641)
- idempotency: sorting keys before hashing (#639)
- api-gateway: HTTP API strip stage name from request path (#622)
- event-handler: match to match_results; 3.10 new keyword (#616)
- data-classes: make authorizer concise; use enum (#630)
- feature-flags: correct link and json examples (#605)
- data-class: fix invalid syntax in new AppSync Authorizer
- api-gateway: add new API mapping support
- data-classes: authorizer for API Gateway HTTP and REST API (#620)
- data-classes: new data_as_bytes property in KinesisStreamRecordPayload (#628)
- data-classes: AppSync Lambda authorizer event (#610)
- event-handler: prefixes to strip for custom domain mapping paths (#579)
- general: support for Python 3.9 (#626)
- idempotency: support for any synchronous function (#625)
- actions: include new labels
- api-docs: enable allow_reuse to fix the docs (#612)
- deps: bump boto3 from 1.18.25 to 1.18.26 (#627)
- deps: bump boto3 from 1.18.24 to 1.18.25 (#623)
- deps: bump boto3 from 1.18.22 to 1.18.24 (#619)
- deps: bump boto3 from 1.18.17 to 1.18.21 (#608)
- deps: bump boto3 from 1.18.21 to 1.18.22 (#614)
- deps-dev: bump flake8-comprehensions from 3.5.0 to 3.6.0 (#609)
- deps-dev: bump flake8-comprehensions from 3.6.0 to 3.6.1 (#615)
- deps-dev: bump mkdocs-material from 7.2.3 to 7.2.4 (#607)
- docs: correct markdown based on markdown lint (#603)
- shared: fix cyclic import & refactor data extraction fn (#613)
- deps: bump poetry to latest (#592)
- feature-flags: bug handling multiple conditions (#599)
- parser: API Gateway WebSocket validation under check_message_id; plus some housekeeping (#553)
- feature-toggles: correct cdk example (#601)
- feature-flags: add debug statements for all feature evaluations (#590)
- feature-flags: optimize UX and maintenance (#563)
- event-handler: new custom serializer option
- feature-flags: create concrete documentation (#594)
- feature-flags: correct docs and typing (#588)
- parameters: auto-transforming values based on suffix (#573)
- readme: add code coverage badge (#577)
- tracer: update wording that it auto-disables on non-Lambda env
- feature-flags: fix SAM infra, convert CDK to Python
- feature-flags: fix sample feature name in evaluate method
- feature-flags: add guidance when to use vs env vars vs parameters
- api-gateway: add support for custom serializer (#568)
- data-classes: decode json_body if based64 encoded (#560)
- feature-flags: Add not_in action and rename contains to in (#589)
- params: expose params
max_age
,raise_on_transform_error
to high level functions (#567) - tracer: auto-disable tracer for non-Lambda environments to ease testing (#598)
- deps: bump boto3 from 1.18.1 to 1.18.15 (#591)
- deps: bump codecov/codecov-action from 2.0.1 to 2.0.2 (#558)
- deps: bump boto3 from 1.18.15 to 1.18.17 (#597)
- deps-dev: bump mkdocs-material from 7.2.2 to 7.2.3 (#596)
- deps-dev: bump mkdocs-material from 7.2.1 to 7.2.2 (#582)
- deps-dev: bump pdoc3 from 0.9.2 to 0.10.0 (#584)
- deps-dev: bump isort from 5.9.2 to 5.9.3 (#574)
- deps-dev: bump mkdocs-material from 7.2.0 to 7.2.1 (#566)
- deps-dev: bump mkdocs-material from 7.1.11 to 7.2.0 (#551)
- deps-dev: bump flake8-black from 0.2.1 to 0.2.3 (#541)
- api-gateway: route regression for non-word and unsafe URI chars (#556)
- api-gateway: non-greedy route pattern regex which incorrectly mapped certain route params to function params (#533)
- api-gateway: incorrect plain text mimetype constant #506
- data-classes: include milliseconds in scalar types to correctly align with AppSync scalars (#504)
- mypy: addresses lack of optional types (#521)
- parser: make ApiGateway version, authorizer fields optional (#532)
- tracer: mypy generic to preserve decorated method signature (#529)
- feature-toggles: code coverage and housekeeping (#530)
- api-gateway: add debug mode (#507)
- api-gateway: add common HTTP service errors (#506)
- event-handler: Support AppSyncResolverEvent subclassing (#526)
- feat-toggle: New simple feature toggles rule engine (WIP) (#494)
- logger: add get_correlation_id method (#516)
- mypy: add mypy support to makefile (#508)
- deps: bump codecov/codecov-action from 1 to 2.0.1 (#539)
- deps: bump boto3 from 1.18.0 to 1.18.1 (#528)
- deps: bump boto3 from 1.17.110 to 1.18.0 (#527)
- deps: bump boto3 from 1.17.102 to 1.17.110 (#523)
- deps-dev: bump mkdocs-material from 7.1.10 to 7.1.11 (#542)
- deps-dev: bump mkdocs-material from 7.1.9 to 7.1.10 (#522)
- deps-dev: bump isort from 5.9.1 to 5.9.2 (#514)
- event-handler: adjusts API Gateway/ALB service errors exception docstrings to not confuse AppSync customers
- Validator: Handle built-in custom formats like
date-time
when type isstring
(#498)
- Layers: Add Layers example for Serverless framework & CDK (#500)
- Misc.: Enable dark mode switch (#471)
- Tracer: Additional scenario when to disable auto-capture for responses larger than 64K (#499)
- deps: bump boto3 from 1.17.101 to 1.17.102 (#493)
- deps: bump boto3 from 1.17.91 to 1.17.101 (#490)
- deps: bump email-validator from 1.1.2 to 1.1.3 (#478)
- deps: bump boto3 from 1.17.89 to 1.17.91 (#473)
- deps-dev: bump flake8-eradicate from 1.0.0 to 1.1.0 (#492)
- deps-dev: bump isort from 5.8.0 to 5.9.1 (#487)
- deps-dev: bump mkdocs-material from 7.1.7 to 7.1.9 (#491)
- Documentation: Include new public roadmap (#452)
- Documentation: Remove old todo in idempotency docs
- Data classes: New
AttributeValueType
to get type and value from data inDynamoDBStreamEvent
(#462) - Data classes: New decorator
event_source
to instantiate data_classes (#442) - Logger: New
clear_state
parameter to clear previously added custom keys upon invocation (#467) - Parser: Support for API Gateway HTTP API #434 (#441)
- deps: bump xenon from 0.7.1 to 0.7.3 (#446)
- assited changelog pre-generation, auto-label PR (#443)
- enable dependabot for dep upgrades (#444)
- enable mergify (#450)
- deps: bump mkdocs-material from 7.1.5 to 7.1.6 (#451)
- deps: bump boto3 from 1.17.78 to 1.17.84 (#449)
- update mergify to require approval on dependabot (#456)
- deps: bump actions/setup-python from 1 to 2.2.2 (#445)
- deps: bump boto3 from 1.17.87 to 1.17.88 (#463)
- deps: bump boto3 from 1.17.88 to 1.17.89 (#466)
- deps: bump boto3 from 1.17.84 to 1.17.85 (#455)
- deps: bump boto3 from 1.17.85 to 1.17.86 (#458)
- deps: bump boto3 from 1.17.86 to 1.17.87 (#459)
- deps-dev: bump mkdocs-material from 7.1.6 to 7.1.7 (#464)
- deps-dev: bump pytest-cov from 2.12.0 to 2.12.1 (#454)
- mergify: disable check for matrix jobs
- mergify: use job name to match GH Actions
- Parser: Upgrade Pydantic to 1.8.2 due to CVE-2021-29510
- data-classes(API Gateway, ALB): New method to decode base64 encoded body (#425)
- data-classes(CodePipeline): Support for CodePipeline job event and methods to handle artifacts more easily (#416)
- Logger: Fix a regression with the
%s
operator
- Event handlers: New API Gateway and ALB utility to reduce routing boilerplate and more
- Documentation: Logger enhancements such as bring your own formatter, handler, UTC support, and testing for Python 3.6
- Parser: Support for API Gateway REST Proxy event and envelope
- Logger: Support for bringing custom formatter, custom handler, custom JSON serializer and deserializer, UTC support, expose
LambdaPowertoolsFormatter
- Metrics: Support for persisting default dimensions that should always be added
- Documentation: Fix highlights, Parser types
- Validator: Fix event type annotations for
validate
standalone function - Parser: Improve and fix types
- Internal: Remove X-Ray SDK version pinning as serialization regression has been fixed in 2.8.0
- Internal: Latest documentation correctly includes a copy of API docs reference
- Event handlers: New core utility to easily handle incoming requests tightly integrated with Data Classes; AppSync being the first as we gauge from the community what additional ones would be helpful
- Documentation: Enabled versioning to access docs on a per release basis or staging docs (
develop
branch) - Documentation: Links now open in a new tab and improved snippet line highlights
- Documentation(validation): JSON Schema snippets and more complete examples
- Documentation(idempotency): Table with expected configuration values for hash key and TTL attribute name when using the default behaviour
- Documentation(logger): New example on how to set logging record timestamps in UTC
- Parser(S3): Support for the new S3 Object Lambda Event model (
S3ObjectLambdaEvent
) - Parameters: Support for DynamoDB Local via
endpoint_url
parameter, including docs - Internal: Include
make pr
in pre-commit hooks when contributing to shorten feedback loop on pre-commit specific linting
- Parser: S3Model now supports keys with 0 length
- Tracer: Lock X-Ray SDK to 2.6.0 as there's been a regression upstream in 2.7.0 on serializing & capturing exceptions
- Data Classes(API Gateway): Add missing property
operationName
within request context - Misc.: Numerous typing fixes to better to support MyPy across all utilities
- Internal: Downgraded poetry to 1.1.4 as there's been a regression with
importlib-metadata
in 1.1.5 not yet fixed
- Data Classes: New S3 Object Lambda event
- Docs: Lambda Layer SAM template reference example
- Parameters: New
force_fetch
param to always fetch the latest and bypass cache, if available - Data Classes: New AppSync Lambda Resolver event covering both Direct Lambda Resolver and Amplify GraphQL Transformer Resolver
@function
- Data Classes: New AppSync scalar utilities to easily compose Lambda Resolvers with date utils, uuid, etc.
- Logger: Support for Correlation ID both in
inject_lambda_context
decorator andset_correlation_id
method - Logger: Include new
exception_name
key to help customers easily enumerate exceptions across all functions
- Tracer: Type hint on return instance that made PyCharm no longer recognize autocompletion
- Idempotency: Error handling for missing idempotency key and
save_in_progress
errors
- Tracer: Lazy loads X-Ray SDK to increase perf by 75% for those not instantiating Tracer
- Metrics: Optimize validation and serialization to increase perf by nearly 50% for large operations (<1ms)
- Dataclass: Add new Amazon Connect contact flow event
- Idempotency: New Idempotency utility
- Docs: Add example on how to integrate Batch utility with Sentry.io
- Internal: Added performance SLA tests for high level imports and Metrics validation/serialization
No changes. Bumped version to trigger new pipeline build for layer publishing.
- Docs: Fix anchor tags to be lower case
- Docs: Correct the docs location for the labeller
- Docs: Migrated from Gatsby to MKdocs documentation system
- Docs: Included Getting started and Advanced sections in Core utilities, including additional examples
- Tracer: Disabled batching segments as X-Ray SDK does not flush traces upon reaching limits
- Parser: Model type is now compliant with mypy
- Utilities: Correctly handle and list multiple exceptions in SQS batch processing utility.
- *Docs:: Fix typos on AppConfig docstring import, and
SnsModel
typo in parser. - Utilities:
typing_extensions
package is now only installed in Python < 3.8
- Utilities: Added
SnsSqsEnvelope
inparser
to dynamically adjust model mismatch when customers use SNS + SQS instead of SNS + Lambda, since we've discovered three payload keys are slightly different.
- Utilities: Added support for AppConfig in Parameters utility
- Logger: Added support for
extra
parameter to add additional root fields when logging messages - Logger: Added support to Pytest Live Log feat. via feature toggle
POWERTOOLS_LOG_DEDUPLICATION_DISABLED
- Tracer: Added support to disable auto-capturing response and exception as metadata
- Utilities: Added support to handle custom string/integer formats in JSON Schema in Validator utility
- Install: Added new Lambda Layer with all extra dependencies installed, available in Serverless Application Repository (SAR)
- Docs: Added missing SNS parser model
- Docs: Added new environment variables for toggling features in Logger and Tracer:
POWERTOOLS_LOG_DEDUPLICATION_DISABLED
,POWERTOOLS_TRACER_CAPTURE_RESPONSE
,POWERTOOLS_TRACER_CAPTURE_ERROR
- Docs: Fixed incorrect import for Cognito data classes in Event Sources utility
- Logger: Bugfix to prevent parent loggers with the same name being configured more than once
- Docs: Add clarification to Tracer docs for how
capture_method
decorator can cause function responses to be read and serialized. - Utilities: Added equality to ease testing Event source data classes
- Package: Added
py.typed
for initial work needed for PEP 561 compliance
- Utilities: Added Kinesis, S3, CloudWatch Logs, Application Load Balancer, and SES support in
Parser
- Docs: Sidebar menu are now always expanded
- Docs: Broken link to GitHub to homepage
- Utilities: Added support for new EventBridge Replay field in
Parser
andEvent source data classes
- Utilities: Added SNS support in
Parser
- Utilities: Added API Gateway HTTP API data class support for new IAM and Lambda authorizer in
Event source data classes
- Docs: Add new FAQ section for Logger on how to enable debug logging for boto3
- Docs: Add explicit minimal set of permissions required to use Layers provided by Serverless Application Repository (SAR)
- Docs: Fix typo in Dataclasses example for SES when fetching common email headers
- Utilities: Add new
Parser
utility to provide parsing and deep data validation using Pydantic Models - Utilities: Add case insensitive header lookup, and Cognito custom auth triggers to
Event source data classes
- Logger: keeps Lambda root logger handler, and add log filter instead to prevent child log records duplication
- Docs: Improve wording on adding log keys conditionally
- Utilities: Fix issue with boolean values in DynamoDB stream event data class.
- Metrics: Support adding multiple metric values to a single metric name
- Utilities: Add new
Validator
utility to validate inbound events and responses using JSON Schema - Utilities: Add new
Event source data classes
utility to easily describe event schema of popular event sources - Docs: Add new
Testing your code
section to both Logger and Metrics page, and content width is now wider - Tracer: Support for automatically disable Tracer when running a Chalice app
- Docs: Improve wording on log sampling feature in Logger, and removed duplicate content on main page
- Utilities: Remove DeleteMessageBatch API call when there are no messages to delete
- Logger: Add
xray_trace_id
to log output to improve integration with CloudWatch Service Lens - Logger: Allow reordering of logged output
- Utilities: Add new
SQS batch processing
utility to handle partial failures in processing message batches - Utilities: Add typing utility providing static type for lambda context object
- Utilities: Add
transform=auto
in parameters utility to deserialize parameter values based on the key name
- Logger: The value of
json_default
formatter is no longer written to logs
- All: Official Lambda Layer via Serverless Application Repository
- Tracer:
capture_method
andcapture_lambda_handler
now support capture_response=False parameter to prevent Tracer to capture response as metadata to allow customers running Tracer with sensitive workloads
- Metrics: Cold start metric is now completely separate from application metrics dimensions, making it easier and cheaper to visualize.
- This is a breaking change if you were graphing/alerting on both application metrics with the same name to compensate this previous malfunctioning
- Marked as bugfix as this is the intended behaviour since the beginning, as you shouldn't have the same application metric with different dimensions
- Utilities: SSMProvider within Parameters utility now have decrypt and recursive parameters correctly defined to support autocompletion
- Tracer: capture_lambda_handler and capture_method decorators now support
capture_response
parameter to not include function's response as part of tracing metadata
- Tracer: capture_method decorator did not properly handle nested context managers
- Utilities: Add new
parameters
utility to retrieve a single or multiple parameters from SSM Parameter Store, Secrets Manager, DynamoDB, or your very own
- Tracer: capture_method decorator now supports generator functions (including context managers)
- Logger: Logs emitted twice, structured and unstructured, due to Lambda configuring the root handler
- Docs: Clarify confusion on Tracer reuse and
auto_patch=False
statement - Logger: Autocomplete for log statements in PyCharm
- Logger: Regression on
Logger
level not acceptingint
i.e.Logger(level=logging.INFO)
- Logger: Support for logger inheritance with
child
parameter
- Logger: Log level is now case insensitive via params and env var
- Tracer: Correct AWS X-Ray SDK dependency to support 2.5.0 and higher
- Logger: Fix a bug with
inject_lambda_context
causing existing Logger keys to be overridden ifstructure_logs
was called before
- Metrics:
add_metadata
method to add any metric metadata you'd like to ease finding metric related data via CloudWatch Logs - Set status as General Availability
- Imports can now be made from top level of module, e.g.:
from aws_lambda_powertools import Logger, Metrics, Tracer
- Metrics: Fix a bug with Metrics causing an exception to be thrown when logging metrics if dimensions were not explicitly added.
- Metrics: No longer throws exception by default in case no metrics are emitted when using the log_metrics decorator.
- Metrics:
capture_cold_start_metric
parameter added tolog_metrics
decorator - Metrics: Optional
namespace
andservice
parameters added to Metrics constructor to more closely resemble other core utils
- Metrics: Default dimension is now created based on
service
parameter orPOWERTOOLS_SERVICE_NAME
env var
- Metrics:
add_namespace
method deprecated in favor of usingnamespace
parameter to Metrics constructor orPOWERTOOLS_METRICS_NAMESPACE
env var
- Metrics: Coerce non-string dimension values to string
- Logger: Correct
cold_start
,function_memory_size
values from string to bool and int respectively
- Metrics: Fix issue where metrics were not correctly flushed, and cleared on every invocation
- Tracer: Fix Runtime Error for nested sync due to incorrect loop usage
- Tracer: Import aiohttp lazily so it's not a hard dependency
- Tracer: Support for async functions in
Tracer
viacapture_method
decorator - Tracer: Support for
aiohttp
viaaiohttp_trace_config
trace config - Tracer: Support for patching specific modules via
patch_modules
param - Tracer: Document escape hatch mechanisms via
tracer.provider
- Metrics: Fix metric unit casting logic if one passes plain string (value or key)
- Metrics:: Fix
MetricUnit
enum values forBytesPerSecond
KilobytesPerSecond
MegabytesPerSecond
GigabytesPerSecond
TerabytesPerSecond
BitsPerSecond
KilobitsPerSecond
MegabitsPerSecond
GigabitsPerSecond
TerabitsPerSecond
CountPerSecond
- Logger: Introduced
Logger
class for structured logging as a replacement forlogger_setup
- Logger: Introduced
Logger.inject_lambda_context
decorator as a replacement forlogger_inject_lambda_context
- Logger: Raise
DeprecationWarning
exception for bothlogger_setup
,logger_inject_lambda_context
- Middleware factory: Introduced Middleware Factory to build your own middleware via
lambda_handler_decorator
- Metrics: Fixed metrics dimensions not being included correctly in EMF
- Logger: Fix
log_metrics
decorator logic not calling the decorated function, and exception handling
- Metrics: Introduces Metrics middleware to utilise CloudWatch Embedded Metric Format
- Metrics: Added deprecation warning for
log_metrics
- Logger: Introduced log sampling for debug - Thanks to Danilo's contribution
- Public beta release