From fef70b0f98951b91969c510853df24351c9a0f0b Mon Sep 17 00:00:00 2001 From: Heitor Lessa Date: Fri, 8 Jul 2022 16:00:48 +0200 Subject: [PATCH 01/24] docs(core): match code snippet name with filename (#1286) --- docs/core/event_handler/api_gateway.md | 62 +++++----- docs/core/logger.md | 111 +++++++++--------- docs/core/metrics.md | 34 +++--- docs/core/tracer.md | 16 +-- ...son => append_and_remove_keys_output.json} | 0 ....json => set_correlation_id_jmespath.json} | 0 ...nt.json => set_correlation_id_method.json} | 0 examples/tracer/src/tracer_reuse.py | 2 +- ...euse_payment.py => tracer_reuse_module.py} | 0 9 files changed, 115 insertions(+), 110 deletions(-) rename examples/logger/src/{append_and_remove_keys.json => append_and_remove_keys_output.json} (100%) rename examples/logger/src/{set_correlation_id_jmespath_event.json => set_correlation_id_jmespath.json} (100%) rename examples/logger/src/{set_correlation_id_method_event.json => set_correlation_id_method.json} (100%) rename examples/tracer/src/{tracer_reuse_payment.py => tracer_reuse_module.py} (100%) diff --git a/docs/core/event_handler/api_gateway.md b/docs/core/event_handler/api_gateway.md index 9db219e994e..6d8f441d661 100644 --- a/docs/core/event_handler/api_gateway.md +++ b/docs/core/event_handler/api_gateway.md @@ -48,13 +48,13 @@ Here's an example on how we can handle the `/todos` path. ???+ info We automatically serialize `Dict` responses as JSON, trim whitespace for compact responses, and set content-type to `application/json`. -=== "app.py" +=== "getting_started_rest_api_resolver.py" ```python hl_lines="5 11 14 28" --8<-- "examples/event_handler_rest/src/getting_started_rest_api_resolver.py" ``` -=== "Request" +=== "getting_started_rest_api_resolver.json" This utility uses `path` and `httpMethod` to route to the right function. This helps make unit tests and local invocation easier too. @@ -62,7 +62,7 @@ Here's an example on how we can handle the `/todos` path. --8<-- "examples/event_handler_rest/src/getting_started_rest_api_resolver.json" ``` -=== "Response" +=== "getting_started_rest_api_resolver_output.json" ```json --8<-- "examples/event_handler_rest/src/getting_started_rest_api_resolver_output.json" @@ -96,13 +96,13 @@ Each dynamic route you set must be part of your function signature. This allows ???+ note For brevity, we will only include the necessary keys for each sample request for the example to work. -=== "app.py" +=== "dynamic_routes.py" ```python hl_lines="14 16" --8<-- "examples/event_handler_rest/src/dynamic_routes.py" ``` -=== "Request" +=== "dynamic_routes.json" ```json --8<-- "examples/event_handler_rest/src/dynamic_routes.json" @@ -123,13 +123,13 @@ You can also combine nested paths with greedy regex to catch in between routes. ???+ warning We choose the most explicit registered route that matches an incoming event. -=== "app.py" +=== "dynamic_routes_catch_all.py" ```python hl_lines="11" --8<-- "examples/event_handler_rest/src/dynamic_routes_catch_all.py" ``` -=== "Request" +=== "dynamic_routes_catch_all.json" ```json --8<-- "examples/event_handler_rest/src/dynamic_routes_catch_all.json" @@ -139,13 +139,13 @@ You can also combine nested paths with greedy regex to catch in between routes. You can use named decorators to specify the HTTP method that should be handled in your functions. That is, `app.`, where the HTTP method could be `get`, `post`, `put`, `patch`, `delete`, and `options`. -=== "app.py" +=== "http_methods.py" ```python hl_lines="14 17" --8<-- "examples/event_handler_rest/src/http_methods.py" ``` -=== "Request" +=== "http_methods.json" ```json --8<-- "examples/event_handler_rest/src/http_methods.json" @@ -225,13 +225,13 @@ When using [Custom Domain API Mappings feature](https://docs.aws.amazon.com/apig To address this API Gateway behavior, we use `strip_prefixes` parameter to account for these prefixes that are now injected into the path regardless of which type of API Gateway you're using. -=== "app.py" +=== "custom_api_mapping.py" ```python hl_lines="8" --8<-- "examples/event_handler_rest/src/custom_api_mapping.py" ``` -=== "Request" +=== "custom_api_mapping.json" ```json --8<-- "examples/event_handler_rest/src/custom_api_mapping.json" @@ -253,13 +253,13 @@ This will ensure that CORS headers are always returned as part of the response w ???+ tip Optionally disable CORS on a per path basis with `cors=False` parameter. -=== "app.py" +=== "setting_cors.py" ```python hl_lines="5 11-12 34" --8<-- "examples/event_handler_rest/src/setting_cors.py" ``` -=== "Response" +=== "setting_cors_output.json" ```json --8<-- "examples/event_handler_rest/src/setting_cors_output.json" @@ -290,13 +290,13 @@ For convenience, these are the default values when using `CORSConfig` to enable You can use the `Response` class to have full control over the response, for example you might want to add additional headers or set a custom Content-type. -=== "app.py" +=== "fine_grained_responses.py" ```python hl_lines="7 24-28" --8<-- "examples/event_handler_rest/src/fine_grained_responses.py" ``` -=== "Response" +=== "fine_grained_responses_output.json" ```json --8<-- "examples/event_handler_rest/src/fine_grained_responses_output.json" @@ -309,19 +309,19 @@ You can compress with gzip and base64 encode your responses via `compress` param ???+ warning The client must send the `Accept-Encoding` header, otherwise a normal response will be sent. -=== "app.py" +=== "compressing_responses.py" ```python hl_lines="14" --8<-- "examples/event_handler_rest/src/compressing_responses.py" ``` -=== "Request" +=== "compressing_responses.json" ```json --8<-- "examples/event_handler_rest/src/compressing_responses.json" ``` -=== "Response" +=== "compressing_responses_output.json" ```json --8<-- "examples/event_handler_rest/src/compressing_responses_output.json" @@ -336,25 +336,25 @@ Like `compress` feature, the client must send the `Accept` header with the corre ???+ warning This feature requires API Gateway to configure binary media types, see [our sample infrastructure](#required-resources) for reference. -=== "app.py" +=== "binary_responses.py" ```python hl_lines="14 20" --8<-- "examples/event_handler_rest/src/binary_responses.py" ``` -=== "logo.svg" +=== "binary_responses_logo.svg" ```xml --8<-- "examples/event_handler_rest/src/binary_responses_logo.svg" ``` -=== "Request" +=== "binary_responses.json" ```json --8<-- "examples/event_handler_rest/src/binary_responses.json" ``` -=== "Response" +=== "binary_responses_output.json" ```json --8<-- "examples/event_handler_rest/src/binary_responses_output.json" @@ -387,9 +387,9 @@ You can instruct API Gateway handler to use a custom serializer to best suit you As you grow the number of routes a given Lambda function should handle, it is natural to split routes into separate files to ease maintenance - That's where the `Router` feature is useful. -Let's assume you have `app.py` as your Lambda function entrypoint and routes in `todos.py`, this is how you'd use the `Router` feature. +Let's assume you have `app.py` as your Lambda function entrypoint and routes in `split_route_module.py`, this is how you'd use the `Router` feature. -=== "todos.py" +=== "split_route_module.py" We import **Router** instead of **APIGatewayRestResolver**; syntax wise is exactly the same. @@ -397,7 +397,7 @@ Let's assume you have `app.py` as your Lambda function entrypoint and routes in --8<-- "examples/event_handler_rest/src/split_route_module.py" ``` -=== "app.py" +=== "split_route.py" We use `include_router` method and include all user routers registered in the `router` global object. @@ -407,17 +407,17 @@ Let's assume you have `app.py` as your Lambda function entrypoint and routes in #### Route prefix -In the previous example, `todos.py` routes had a `/todos` prefix. This might grow over time and become repetitive. +In the previous example, `split_route_module.py` routes had a `/todos` prefix. This might grow over time and become repetitive. -When necessary, you can set a prefix when including a router object. This means you could remove `/todos` prefix in `todos.py` altogether. +When necessary, you can set a prefix when including a router object. This means you could remove `/todos` prefix altogether. -=== "app.py" +=== "split_route_prefix.py" ```python hl_lines="12" --8<-- "examples/event_handler_rest/src/split_route_prefix.py" ``` -=== "todos.py" +=== "split_route_prefix_module.py" ```python hl_lines="13 25" --8<-- "examples/event_handler_rest/src/split_route_prefix_module.py" @@ -509,13 +509,13 @@ your development, building, deployment tooling need to accommodate the distinct You can test your routes by passing a proxy event request where `path` and `httpMethod`. -=== "test_app.py" +=== "assert_http_response.py" ```python hl_lines="21-24" --8<-- "examples/event_handler_rest/src/assert_http_response.py" ``` -=== "app.py" +=== "assert_http_response_module.py" ```python --8<-- "examples/event_handler_rest/src/assert_http_response_module.py" diff --git a/docs/core/logger.md b/docs/core/logger.md index b09cc6c85d3..c699568b349 100644 --- a/docs/core/logger.md +++ b/docs/core/logger.md @@ -48,13 +48,13 @@ Your Logger will include the following keys to your structured logging: You can enrich your structured logs with key Lambda context information via `inject_lambda_context`. -=== "collect.py" +=== "inject_lambda_context.py" ```python hl_lines="7" --8<-- "examples/logger/src/inject_lambda_context.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "inject_lambda_context_output.json" ```json hl_lines="8-12 17-20" --8<-- "examples/logger/src/inject_lambda_context_output.json" @@ -88,19 +88,19 @@ You can set a Correlation ID using `correlation_id_path` param by passing a [JME ???+ tip You can retrieve correlation IDs via `get_correlation_id` method -=== "collect.py" +=== "set_correlation_id.py" ```python hl_lines="7" --8<-- "examples/logger/src/set_correlation_id.py" ``` -=== "Example Event" +=== "set_correlation_id_event.json" ```json hl_lines="3" --8<-- "examples/logger/src/set_correlation_id_event.json" ``` -=== "Example CloudWatch Logs excerpt" +=== "set_correlation_id_output.json" ```json hl_lines="12" --8<-- "examples/logger/src/set_correlation_id_output.json" @@ -110,18 +110,19 @@ You can set a Correlation ID using `correlation_id_path` param by passing a [JME You can also use `set_correlation_id` method to inject it anywhere else in your code. Example below uses [Event Source Data Classes utility](../utilities/data_classes.md) to easily access events properties. -=== "collect.py" +=== "set_correlation_id_method.py" ```python hl_lines="11" --8<-- "examples/logger/src/set_correlation_id_method.py" ``` -=== "Example Event" + +=== "set_correlation_id_method.json" ```json hl_lines="3" - --8<-- "examples/logger/src/set_correlation_id_method_event.json" + --8<-- "examples/logger/src/set_correlation_id_method.json" ``` -=== "Example CloudWatch Logs excerpt" +=== "set_correlation_id_method_output.json" ```json hl_lines="7" --8<-- "examples/logger/src/set_correlation_id_method_output.json" @@ -131,19 +132,19 @@ You can also use `set_correlation_id` method to inject it anywhere else in your To ease routine tasks like extracting correlation ID from popular event sources, we provide [built-in JMESPath expressions](#built-in-correlation-id-expressions). -=== "collect.py" +=== "set_correlation_id_jmespath.py" ```python hl_lines="2 8" --8<-- "examples/logger/src/set_correlation_id_jmespath.py" ``` -=== "Example Event" +=== "set_correlation_id_jmespath.json" ```json hl_lines="3" - --8<-- "examples/logger/src/set_correlation_id_jmespath_event.json" + --8<-- "examples/logger/src/set_correlation_id_jmespath.json" ``` -=== "Example CloudWatch Logs excerpt" +=== "set_correlation_id_jmespath_output.json" ```json hl_lines="12" --8<-- "examples/logger/src/set_correlation_id_jmespath_output.json" @@ -166,12 +167,13 @@ You can append additional keys using either mechanism: You can append your own keys to your existing Logger via `append_keys(**additional_key_values)` method. -=== "collect.py" +=== "append_keys.py" ```python hl_lines="12" --8<-- "examples/logger/src/append_keys.py" ``` -=== "Example CloudWatch Logs excerpt" + +=== "append_keys_output.json" ```json hl_lines="7" --8<-- "examples/logger/src/append_keys_output.json" @@ -191,12 +193,13 @@ It accepts any dictionary, and all keyword arguments will be added as part of th ???+ info Any keyword argument added using `extra` will not be persisted for subsequent messages. -=== "extra_parameter.py" +=== "append_keys_extra.py" ```python hl_lines="9" --8<-- "examples/logger/src/append_keys_extra.py" ``` -=== "Example CloudWatch Logs excerpt" + +=== "append_keys_extra_output.json" ```json hl_lines="7" --8<-- "examples/logger/src/append_keys_extra_output.json" @@ -206,13 +209,13 @@ It accepts any dictionary, and all keyword arguments will be added as part of th You can remove any additional key from Logger state using `remove_keys`. -=== "collect.py" +=== "remove_keys.py" ```python hl_lines="11" --8<-- "examples/logger/src/remove_keys.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "remove_keys_output.json" ```json hl_lines="7" --8<-- "examples/logger/src/remove_keys_output.json" @@ -232,19 +235,19 @@ Logger is commonly initialized in the global scope. Due to [Lambda Execution Con You can either avoid running any code as part of Lambda Layers global scope, or override keys with their latest value as part of handler's execution. -=== "collect.py" +=== "clear_state.py" ```python hl_lines="7 10" --8<-- "examples/logger/src/clear_state.py" ``` -=== "#1 request" +=== "clear_state_event_one.json" ```json hl_lines="7" --8<-- "examples/logger/src/clear_state_event_one.json" ``` -=== "#2 request" +=== "clear_state_event_two.json" ```json hl_lines="7" --8<-- "examples/logger/src/clear_state_event_two.json" @@ -257,13 +260,13 @@ Use `logger.exception` method to log contextual information about exceptions. Lo ???+ tip You can use your preferred Log Analytics tool to enumerate and visualize exceptions across all your services using `exception_name` key. -=== "collect.py" +=== "logging_exceptions.py" ```python hl_lines="15" --8<-- "examples/logger/src/logging_exceptions.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "logging_exceptions_output.json" ```json hl_lines="7-8" --8<-- "examples/logger/src/logging_exceptions_output.json" @@ -292,19 +295,19 @@ Similar to [Tracer](./tracer.md#reusing-tracer-across-your-code), a new instance Notice in the CloudWatch Logs output how `payment_id` appeared as expected when logging in `collect.py`. -=== "collect.py" +=== "logger_reuse.py" ```python hl_lines="1 9 11 12" --8<-- "examples/logger/src/logger_reuse.py" ``` -=== "payment.py" +=== "logger_reuse_payment.py" ```python hl_lines="3 7" --8<-- "examples/logger/src/logger_reuse_payment.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "logger_reuse_output.json" ```json hl_lines="12" --8<-- "examples/logger/src/logger_reuse_output.json" @@ -313,7 +316,7 @@ Notice in the CloudWatch Logs output how `payment_id` appeared as expected when ???+ note "Note: About Child Loggers" Coming from standard library, you might be used to use `logging.getLogger(__name__)`. This will create a new instance of a Logger with a different name. - In Powertools, you can have the same effect by using `child=True` parameter: `Logger(child=True)`. This creates a new Logger instance named after `service.`. All state changes will be propagated bi-directonally between Child and Parent. + In Powertools, you can have the same effect by using `child=True` parameter: `Logger(child=True)`. This creates a new Logger instance named after `service.`. All state changes will be propagated bi-directionally between Child and Parent. For that reason, there could be side effects depending on the order the Child Logger is instantiated, because Child Loggers don't have a handler. @@ -337,15 +340,15 @@ Sampling decision happens at the Logger initialization. This means sampling may ???+ note Open a [feature request](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=feature-request%2C+triage&template=feature_request.md&title=) if you want Logger to calculate sampling for every invocation -=== "collect.py" +=== "sampling_debug_logs.py" ```python hl_lines="6 10" - --8<-- "examples/logger/src/logger_reuse.py" + --8<-- "examples/logger/src/sampling_debug_logs.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "sampling_debug_logs_output.json" - ```json hl_lines="3 5 13 16 25" + ```json hl_lines="3 5 13 16 26" --8<-- "examples/logger/src/sampling_debug_logs_output.json" ``` @@ -393,13 +396,13 @@ For child Loggers, we introspect the name of your module where `Logger(child=Tru ???+ danger A common issue when migrating from other Loggers is that `service` might be defined in the parent Logger (no child param), and not defined in the child Logger: -=== "incorrect_logger_inheritance.py" +=== "logging_inheritance_bad.py" ```python hl_lines="1 9" --8<-- "examples/logger/src/logging_inheritance_bad.py" ``` -=== "my_other_module.py" +=== "logging_inheritance_module.py" ```python hl_lines="1 9" --8<-- "examples/logger/src/logging_inheritance_module.py" @@ -412,13 +415,13 @@ In this case, Logger will register a Logger named `payment`, and a Logger named Do this instead: -=== "correct_logger_inheritance.py" +=== "logging_inheritance_good.py" ```python hl_lines="1 9" --8<-- "examples/logger/src/logging_inheritance_good.py" ``` -=== "my_other_module.py" +=== "logging_inheritance_module.py" ```python hl_lines="1 9" --8<-- "examples/logger/src/logging_inheritance_module.py" @@ -435,13 +438,13 @@ You might want to continue to use the same date formatting style, or override `l Logger allows you to either change the format or suppress the following keys altogether at the initialization: `location`, `timestamp`, `level`, `xray_trace_id`. -=== "lambda_handler.py" +=== "overriding_log_records.py" ```python hl_lines="7 10" --8<-- "examples/logger/src/overriding_log_records.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "overriding_log_records_output.json" ```json hl_lines="3 5" --8<-- "examples/logger/src/overriding_log_records_output.json" @@ -451,12 +454,13 @@ Logger allows you to either change the format or suppress the following keys alt You can change the order of [standard Logger keys](#standard-structured-keys) or any keys that will be appended later at runtime via the `log_record_order` parameter. -=== "app.py" +=== "reordering_log_keys.py" ```python hl_lines="5 8" --8<-- "examples/logger/src/reordering_log_keys.py" ``` -=== "Example CloudWatch Logs excerpt" + +=== "reordering_log_keys_output.json" ```json hl_lines="3 10" --8<-- "examples/logger/src/reordering_log_keys_output.json" @@ -466,13 +470,13 @@ You can change the order of [standard Logger keys](#standard-structured-keys) or By default, this Logger and standard logging library emits records using local time timestamp. You can override this behavior via `utc` parameter: -=== "app.py" +=== "setting_utc_timestamp.py" ```python hl_lines="6" --8<-- "examples/logger/src/setting_utc_timestamp.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "setting_utc_timestamp_output.json" ```json hl_lines="6 13" --8<-- "examples/logger/src/setting_utc_timestamp_output.json" @@ -482,13 +486,13 @@ By default, this Logger and standard logging library emits records using local t By default, Logger uses `str` to handle values non-serializable by JSON. You can override this behavior via `json_default` parameter by passing a Callable: -=== "app.py" +=== "unserializable_values.py" ```python hl_lines="6 17" --8<-- "examples/logger/src/unserializable_values.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "unserializable_values_output.json" ```json hl_lines="4-6" --8<-- "examples/logger/src/unserializable_values_output.json" @@ -511,13 +515,13 @@ By default, Logger uses [LambdaPowertoolsFormatter](#lambdapowertoolsformatter) For these, you can override the `serialize` method from [LambdaPowertoolsFormatter](#lambdapowertoolsformatter). -=== "custom_formatter.py" +=== "bring_your_own_formatter.py" ```python hl_lines="2 5-6 12" --8<-- "examples/logger/src/bring_your_own_formatter.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "bring_your_own_formatter_output.json" ```json hl_lines="6" --8<-- "examples/logger/src/bring_your_own_formatter_output.json" ``` @@ -529,13 +533,13 @@ For exceptional cases where you want to completely replace our formatter logic, ???+ warning You will need to implement `append_keys`, `clear_state`, override `format`, and optionally `remove_keys` to keep the same feature set Powertools Logger provides. This also means keeping state of logging keys added. -=== "collect.py" +=== "bring_your_own_formatter_from_scratch.py" ```python hl_lines="6 9 11-12 15 19 23 26 38" --8<-- "examples/logger/src/bring_your_own_formatter_from_scratch.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "bring_your_own_formatter_from_scratch_output.json" ```json hl_lines="2-4" --8<-- "examples/logger/src/bring_your_own_formatter_from_scratch_output.json" @@ -615,15 +619,16 @@ You can include any of these logging attributes as key value arguments (`kwargs` You can also add them later anywhere in your code with `append_keys`, or remove them with `remove_keys` methods. -=== "collect.py" +=== "append_and_remove_keys.py" ```python hl_lines="3 8 10" ---8<-- "examples/logger/src/append_and_remove_keys.py" ``` -=== "Example CloudWatch Logs excerpt" + +=== "append_and_remove_keys_output.json" ```json hl_lines="6 15-16" - ---8<-- "examples/logger/src/append_and_remove_keys.json" + ---8<-- "examples/logger/src/append_and_remove_keys_output.json" ``` For log records originating from Powertools Logger, the `name` attribute will be the same as `service`, for log records coming from standard library logger, it will be the name of the logger (i.e. what was used as name argument to `logging.getLogger`). @@ -634,13 +639,13 @@ Keys added with `append_keys` will persist across multiple log messages while ke Here's an example where we persist `payment_id` not `request_id`. Note that `payment_id` remains in both log messages while `booking_id` is only available in the first message. -=== "collect.py" +=== "append_keys_vs_extra.py" ```python hl_lines="16 23" ---8<-- "examples/logger/src/append_keys_vs_extra.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "append_keys_vs_extra_output.json" ```json hl_lines="9-10 19" ---8<-- "examples/logger/src/append_keys_vs_extra_output.json" diff --git a/docs/core/metrics.md b/docs/core/metrics.md index 713a53b193c..843e35b7eb8 100644 --- a/docs/core/metrics.md +++ b/docs/core/metrics.md @@ -57,13 +57,13 @@ You can create metrics using `add_metric`, and you can create dimensions for all ???+ tip You can initialize Metrics in any other module too. It'll keep track of your aggregate metrics in memory to optimize costs (one blob instead of multiples). -=== "Metrics" +=== "add_metrics.py" ```python hl_lines="10" --8<-- "examples/metrics/src/add_metrics.py" ``` -=== "Metrics with custom dimensions" +=== "add_dimension.py" ```python hl_lines="13" --8<-- "examples/metrics/src/add_dimension.py" @@ -82,13 +82,13 @@ You can create metrics using `add_metric`, and you can create dimensions for all You can call `add_metric()` with the same metric name multiple times. The values will be grouped together in a list. -=== "Metrics" +=== "add_multi_value_metrics.py" ```python hl_lines="14-15" --8<-- "examples/metrics/src/add_multi_value_metrics.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "add_multi_value_metrics_output.json" ```python hl_lines="15 24-26" --8<-- "examples/metrics/src/add_multi_value_metrics_output.json" @@ -100,13 +100,13 @@ You can use `set_default_dimensions` method, or `default_dimensions` parameter i If you'd like to remove them at some point, you can use `clear_default_dimensions` method. -=== "set_default_dimensions method" +=== "set_default_dimensions.py" ```python hl_lines="9" --8<-- "examples/metrics/src/set_default_dimensions.py" ``` -=== "with log_metrics decorator" +=== "set_default_dimensions_log_metrics.py" ```python hl_lines="9 13" --8<-- "examples/metrics/src/set_default_dimensions_log_metrics.py" @@ -118,13 +118,13 @@ As you finish adding all your metrics, you need to serialize and flush them to s This decorator also **validates**, **serializes**, and **flushes** all your metrics. During metrics validation, if no metrics are provided then a warning will be logged, but no exception will be raised. -=== "app.py" +=== "add_metrics.py" ```python hl_lines="8" --8<-- "examples/metrics/src/add_metrics.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "log_metrics_output.json" ```json hl_lines="6 9 14 21-23" --8<-- "examples/metrics/src/log_metrics_output.json" @@ -152,13 +152,13 @@ If you want to ensure at least one metric is always emitted, you can pass `raise You can optionally capture cold start metrics with `log_metrics` decorator via `capture_cold_start_metric` param. -=== "app.py" +=== "capture_cold_start_metric.py" ```python hl_lines="7" --8<-- "examples/metrics/src/capture_cold_start_metric.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "capture_cold_start_metric_output.json" ```json hl_lines="9 15 22 24-25" --8<-- "examples/metrics/src/capture_cold_start_metric_output.json" @@ -183,13 +183,13 @@ You can add high-cardinality data as part of your Metrics log with `add_metadata ???+ info **This will not be available during metrics visualization** - Use **dimensions** for this purpose -=== "app.py" +=== "add_metadata.py" ```python hl_lines="14" --8<-- "examples/metrics/src/add_metadata.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "add_metadata_output.json" ```json hl_lines="22" --8<-- "examples/metrics/src/add_metadata_output.json" @@ -204,13 +204,13 @@ CloudWatch EMF uses the same dimensions across all your metrics. Use `single_met **unique metric = (metric_name + dimension_name + dimension_value)** -=== "app.py" +=== "single_metric.py" ```python hl_lines="11" --8<-- "examples/metrics/src/single_metric.py" ``` -=== "Example CloudWatch Logs excerpt" +=== "single_metric_output.json" ```json hl_lines="15" --8<-- "examples/metrics/src/single_metric_output.json" @@ -257,7 +257,7 @@ Make sure to set `POWERTOOLS_METRICS_NAMESPACE` and `POWERTOOLS_SERVICE_NAME` be You can read standard output and assert whether metrics have been flushed. Here's an example using `pytest` with `capsys` built-in fixture: -=== "Asserting single EMF blob" +=== "assert_single_emf_blob.py" ```python hl_lines="6 9-10 23-34" --8<-- "examples/metrics/src/assert_single_emf_blob.py" @@ -269,7 +269,7 @@ You can read standard output and assert whether metrics have been flushed. Here' --8<-- "examples/metrics/src/add_metrics.py" ``` -=== "Asserting multiple EMF blobs" +=== "assert_multiple_emf_blobs.py" This will be needed when using `capture_cold_start_metric=True`, or when both `Metrics` and `single_metric` are used. @@ -277,7 +277,7 @@ You can read standard output and assert whether metrics have been flushed. Here' --8<-- "examples/metrics/src/assert_multiple_emf_blobs.py" ``` -=== "my_other_module.py" +=== "assert_multiple_emf_blobs_module.py" ```python --8<-- "examples/metrics/src/assert_multiple_emf_blobs_module.py" diff --git a/docs/core/tracer.md b/docs/core/tracer.md index 7664231cc31..8fbfc0e29f7 100644 --- a/docs/core/tracer.md +++ b/docs/core/tracer.md @@ -77,19 +77,19 @@ You can trace synchronous functions using the `capture_method` decorator. You can trace asynchronous functions and generator functions (including context managers) using `capture_method`. -=== "Async" +=== "capture_method_async.py" ```python hl_lines="9" --8<-- "examples/tracer/src/capture_method_async.py" ``` -=== "Context manager" +=== "capture_method_context_manager.py" ```python hl_lines="12-13" --8<-- "examples/tracer/src/capture_method_context_manager.py" ``` -=== "Generators" +=== "capture_method_generators.py" ```python hl_lines="9" --8<-- "examples/tracer/src/capture_method_generators.py" @@ -116,13 +116,13 @@ Use **`capture_response=False`** parameter in both `capture_lambda_handler` and 2. You might manipulate **streaming objects that can be read only once**; this prevents subsequent calls from being empty 3. You might return **more than 64K** of data _e.g., `message too long` error_ -=== "sensitive_data_scenario.py" +=== "disable_capture_response.py" ```python hl_lines="8 15" --8<-- "examples/tracer/src/disable_capture_response.py" ``` -=== "streaming_object_scenario.py" +=== "disable_capture_response_streaming_body.py" ```python hl_lines="19" --8<-- "examples/tracer/src/disable_capture_response_streaming_body.py" @@ -192,17 +192,17 @@ Tracer keeps a copy of its configuration after the first initialization. This is Tracer will automatically ignore imported modules that have been patched. -=== "handler.py" +=== "tracer_reuse.py" ```python hl_lines="1 6" --8<-- "examples/tracer/src/tracer_reuse.py" ``` -=== "tracer_reuse_payment.py" +=== "tracer_reuse_module.py" A new instance of Tracer will be created but will reuse the previous Tracer instance configuration, similar to a Singleton. ```python hl_lines="3" - --8<-- "examples/tracer/src/tracer_reuse_payment.py" + --8<-- "examples/tracer/src/tracer_reuse_module.py" ``` ## Testing your code diff --git a/examples/logger/src/append_and_remove_keys.json b/examples/logger/src/append_and_remove_keys_output.json similarity index 100% rename from examples/logger/src/append_and_remove_keys.json rename to examples/logger/src/append_and_remove_keys_output.json diff --git a/examples/logger/src/set_correlation_id_jmespath_event.json b/examples/logger/src/set_correlation_id_jmespath.json similarity index 100% rename from examples/logger/src/set_correlation_id_jmespath_event.json rename to examples/logger/src/set_correlation_id_jmespath.json diff --git a/examples/logger/src/set_correlation_id_method_event.json b/examples/logger/src/set_correlation_id_method.json similarity index 100% rename from examples/logger/src/set_correlation_id_method_event.json rename to examples/logger/src/set_correlation_id_method.json diff --git a/examples/tracer/src/tracer_reuse.py b/examples/tracer/src/tracer_reuse.py index 5f12f82b714..bdfe7bc9d91 100644 --- a/examples/tracer/src/tracer_reuse.py +++ b/examples/tracer/src/tracer_reuse.py @@ -1,4 +1,4 @@ -from tracer_reuse_payment import collect_payment +from tracer_reuse_module import collect_payment from aws_lambda_powertools import Tracer from aws_lambda_powertools.utilities.typing import LambdaContext diff --git a/examples/tracer/src/tracer_reuse_payment.py b/examples/tracer/src/tracer_reuse_module.py similarity index 100% rename from examples/tracer/src/tracer_reuse_payment.py rename to examples/tracer/src/tracer_reuse_module.py From d91838743cb2d7e3ae8b161ae8521194487585bf Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Fri, 8 Jul 2022 16:03:31 +0200 Subject: [PATCH 02/24] fix(ci): accept core arg in label related issue workflow --- .github/scripts/label_related_issue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/label_related_issue.js b/.github/scripts/label_related_issue.js index fb47a7bc4b0..a66a63fd005 100644 --- a/.github/scripts/label_related_issue.js +++ b/.github/scripts/label_related_issue.js @@ -1,4 +1,4 @@ -module.exports = async ({github, context}) => { +module.exports = async ({github, context, core}) => { const prBody = context.payload.body; const prNumber = context.payload.number; const releaseLabel = process.env.RELEASE_LABEL; From 13558d9d001a76d91e3be0400dae184b12ef2ea0 Mon Sep 17 00:00:00 2001 From: Release bot Date: Tue, 9 Aug 2022 14:08:00 +0000 Subject: [PATCH 03/24] chore(ci): update changelog with latest changes --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b85db5304d..c6f5fe65e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ## Bug Fixes +* **ci:** move from pip-tools to poetry on layers to fix conflicts * **ci:** typo and bust gh actions cache * **ci:** use poetry to resolve layer deps; pip for CDK * **ci:** disable poetry venv for layer workflow as cdk ignores venv @@ -17,10 +18,14 @@ ## Documentation +* **jmespath_util:** snippets split, improved, and lint ([#1419](https://github.com/awslabs/aws-lambda-powertools-python/issues/1419)) +* **layer:** upgrade to 1.27.0 * **layer:** upgrade to 1.27.0 ## Maintenance +* **ci:** reduce payload and only send prod notification +* **ci:** update changelog with latest changes * **ci:** update changelog with latest changes * **ci:** update changelog with latest changes From 40ce5091a8fb0ee49a3c441d97333ebeb080e3fd Mon Sep 17 00:00:00 2001 From: Peter Schutt Date: Wed, 10 Aug 2022 00:09:15 +1000 Subject: [PATCH 04/24] docs(apigateway): removes duplicate admonition (#1426) --- docs/core/event_handler/api_gateway.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/core/event_handler/api_gateway.md b/docs/core/event_handler/api_gateway.md index 1358f545eb8..f4f45a051f8 100644 --- a/docs/core/event_handler/api_gateway.md +++ b/docs/core/event_handler/api_gateway.md @@ -135,9 +135,6 @@ Each dynamic route you set must be part of your function signature. This allows ???+ tip You can also nest dynamic paths, for example `/todos//`. -???+ tip - You can also nest dynamic paths, for example `/todos//`. - #### Catch-all routes ???+ note From 5951ab0210a8f33ed30bbffd0587f3353ea8c06f Mon Sep 17 00:00:00 2001 From: Release bot Date: Tue, 9 Aug 2022 14:09:54 +0000 Subject: [PATCH 05/24] chore(ci): update changelog with latest changes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f5fe65e71..9fc78d3dae1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,12 +18,14 @@ ## Documentation +* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) * **jmespath_util:** snippets split, improved, and lint ([#1419](https://github.com/awslabs/aws-lambda-powertools-python/issues/1419)) * **layer:** upgrade to 1.27.0 * **layer:** upgrade to 1.27.0 ## Maintenance +* **ci:** update changelog with latest changes * **ci:** reduce payload and only send prod notification * **ci:** update changelog with latest changes * **ci:** update changelog with latest changes From 6b2390356d56428b2a35ef0810bb2b15e579bec8 Mon Sep 17 00:00:00 2001 From: Peter Schutt Date: Wed, 10 Aug 2022 00:11:08 +1000 Subject: [PATCH 06/24] docs(parser): minor grammar fix (#1427) --- docs/utilities/parser.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md index 8756725d1e0..cb69cf9699b 100644 --- a/docs/utilities/parser.md +++ b/docs/utilities/parser.md @@ -524,7 +524,7 @@ Parser is best suited for those looking for a trade-off between defining their m We export most common classes, exceptions, and utilities from Pydantic as part of parser e.g. `from aws_lambda_powertools.utilities.parser import BaseModel`. -If what's your trying to use isn't available as part of the high level import system, use the following escape hatch mechanism: +If what you're trying to use isn't available as part of the high level import system, use the following escape hatch mechanism: ```python title="Pydantic import escape hatch" from aws_lambda_powertools.utilities.parser.pydantic import From 6380b6365176ed3140febdefff7e739a81811a8a Mon Sep 17 00:00:00 2001 From: Release bot Date: Tue, 9 Aug 2022 14:11:42 +0000 Subject: [PATCH 07/24] chore(ci): update changelog with latest changes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fc78d3dae1..9a738104460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,9 +22,11 @@ * **jmespath_util:** snippets split, improved, and lint ([#1419](https://github.com/awslabs/aws-lambda-powertools-python/issues/1419)) * **layer:** upgrade to 1.27.0 * **layer:** upgrade to 1.27.0 +* **parser:** minor grammar fix ([#1427](https://github.com/awslabs/aws-lambda-powertools-python/issues/1427)) ## Maintenance +* **ci:** update changelog with latest changes * **ci:** update changelog with latest changes * **ci:** reduce payload and only send prod notification * **ci:** update changelog with latest changes From 8e24ae3feee39ae0d51bb47033d147bce2027846 Mon Sep 17 00:00:00 2001 From: Release bot Date: Tue, 9 Aug 2022 14:59:06 +0000 Subject: [PATCH 08/24] chore(ci): update changelog with latest changes --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a738104460..27d160ec75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ ## Maintenance +* **ci:** update changelog with latest changes * **ci:** update changelog with latest changes * **ci:** update changelog with latest changes * **ci:** reduce payload and only send prod notification From f2a6c9b362cdeaa9cf4a83e21db8fdc80e6f336f Mon Sep 17 00:00:00 2001 From: Release bot Date: Sun, 4 Sep 2022 05:30:15 +0000 Subject: [PATCH 09/24] update changelog with latest changes --- CHANGELOG.md | 2065 ++++++++++++++++++-------------------------------- 1 file changed, 742 insertions(+), 1323 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca8a1242ebd..13f12eb68b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,1364 +6,823 @@ ## Bug Fixes -* **ci:** pass core fns to large pr workflow script -* **ci:** on_label permissioning model & workflow execution -* **ci:** ensure PR_AUTHOR is present for large_pr_split workflow -* **ci:** gracefully and successful exit changelog upon no changes +* remove apigw contract when using event-handler, apigw tracing +* path to artefact +* Fix issue with strip_prefixes ([#647](https://github.com/awslabs/aws-lambda-powertools-python/issues/647)) +* removed ambiguous quotes from labels. +* change supported python version from 3.6.1 to 3.6.2, bump black ([#807](https://github.com/awslabs/aws-lambda-powertools-python/issues/807)) +* mathc the name of the cdk synth from the build phase +* package_logger as const over logger instance +* repurpose test to cover parent loggers case +* use decorators, split cold start to ease reading +* use addHandler over monkeypatch +* add entire ARN role instead of account and role name +* download artefact into the layer dir +* remove unused json import +* incorrect log keys, indentation, snippet consistency +* remove f-strings that doesn't evaluate expr +* no need to cache npm since we only install cdk cli and don't have .lock files +* typo in input for layer workflow +* sight, yes a whitespace character breaks the build +* unzip the right artifact name +* **api-gateway:** route regression non-word and unsafe URI chars ([#556](https://github.com/awslabs/aws-lambda-powertools-python/issues/556)) +* **api-gateway:** incorrect plain text mimetype [#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506) +* **api-gateway:** non-greedy route pattern regex ([#533](https://github.com/awslabs/aws-lambda-powertools-python/issues/533)) +* **api-gateway:** HTTP API strip stage name from request path ([#622](https://github.com/awslabs/aws-lambda-powertools-python/issues/622)) +* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) +* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) +* **apigateway:** support [@app](https://github.com/app).not_found() syntax & housekeeping ([#926](https://github.com/awslabs/aws-lambda-powertools-python/issues/926)) +* **apigateway:** allow list of HTTP methods in route method ([#838](https://github.com/awslabs/aws-lambda-powertools-python/issues/838)) +* **apigateway:** remove indentation in debug_mode ([#987](https://github.com/awslabs/aws-lambda-powertools-python/issues/987)) +* **batch:** report multiple failures ([#967](https://github.com/awslabs/aws-lambda-powertools-python/issues/967)) +* **batch:** delete >10 messages in legacy sqs processor ([#818](https://github.com/awslabs/aws-lambda-powertools-python/issues/818)) +* **batch:** missing space in BatchProcessingError message ([#1201](https://github.com/awslabs/aws-lambda-powertools-python/issues/1201)) +* **batch:** docstring fix for success_handler() record parameter ([#1202](https://github.com/awslabs/aws-lambda-powertools-python/issues/1202)) +* **batch:** bugfix to clear exceptions between executions ([#1022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1022)) +* **ci:** move from pip-tools to poetry on layers reusable workflow +* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) +* **ci:** fetch all git info so we can check tags +* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) +* **ci:** remove additional quotes in PR action ([#1317](https://github.com/awslabs/aws-lambda-powertools-python/issues/1317)) +* **ci:** install poetry before calling setup/python with cache ([#1315](https://github.com/awslabs/aws-lambda-powertools-python/issues/1315)) +* **ci:** keep layer version permission ([#1318](https://github.com/awslabs/aws-lambda-powertools-python/issues/1318)) +* **ci:** pr label regex for special chars in title +* **ci:** address conditional type on_merge +* **ci:** unexpected symbol due to double quotes... +* **ci:** address gh-actions additional quotes; remove debug +* **ci:** regex group name for on_merge workflow +* **ci:** escape outputs as certain PRs can break GH Actions expressions +* **ci:** move conditionals from yaml to code; leftover +* **ci:** move conditionals from yaml to code +* **ci:** accept core arg in label related issue workflow +* **ci:** match the name of the cdk synth from the build phase +* **ci:** regex to catch combination of related issues workflow +* **ci:** checkout project before validating related issue workflow +* **ci:** remove unsupported env in workflow_call +* **ci:** accept core arg in label related issue workflow +* **ci:** only event is resolved in cond +* **ci:** cond doesnt support two expr w/ env +* **ci:** label_related_issue unresolved var from history mixup +* **ci:** remove unused secret +* **ci:** allow inherit secrets for reusable workflow +* **ci:** add missing oidc token generation permission +* **ci:** job permissions +* **ci:** add additional input to accurately describe intent on skip +* **ci:** regex to catch combination of related issues workflow +* **ci:** checkout project before validating related issue workflow +* **ci:** changelog workflow must receive git tags too +* **ci:** improve msg visibility on closed issues +* **ci:** add explicit origin to fix release detached head +* **ci:** disable merged_pr workflow +* **ci:** merged_pr add issues write access +* **ci:** quote prBody GH expr on_opened_pr +* **ci:** remove utf-8 body in octokit body req +* **ci:** reusable workflow secrets param +* **ci:** temporarily disable changelog upon release +* **ci:** move from pip-tools to poetry on layers +* **ci:** add cdk v2 dep for layers workflow +* **ci:** disable poetry venv for layer workflow as cdk ignores venv +* **ci:** use poetry to resolve layer deps; pip for CDK +* **ci:** typo and bust gh actions cache +* **ci:** move from pip-tools to poetry on layers to fix conflicts +* **ci:** del flake8 direct dep over py3.6 conflicts and docs failure +* **ci:** fixes typos and small issues on github scripts ([#1302](https://github.com/awslabs/aws-lambda-powertools-python/issues/1302)) +* **ci:** calculate parallel jobs based on infrastructure needs ([#1475](https://github.com/awslabs/aws-lambda-powertools-python/issues/1475)) * **ci:** event resolution for on_label_added workflow +* **ci:** comment custom publish version checker +* **ci:** gracefully and successful exit changelog upon no changes +* **ci:** ensure PR_AUTHOR is present for large_pr_split workflow +* **ci:** on_label permissioning model & workflow execution +* **ci:** pass core fns to large pr workflow script +* **ci:** address pr title semantic not found logic +* **ci:** skip sync master on docs hotfix +* **data-classes:** use correct asdict funciton ([#666](https://github.com/awslabs/aws-lambda-powertools-python/issues/666)) +* **data-classes:** docstring typos and clean up ([#937](https://github.com/awslabs/aws-lambda-powertools-python/issues/937)) +* **data-classes:** include milliseconds in scalar types ([#504](https://github.com/awslabs/aws-lambda-powertools-python/issues/504)) +* **data-classes:** underscore support in api gateway authorizer resource name ([#969](https://github.com/awslabs/aws-lambda-powertools-python/issues/969)) +* **data-classes:** Add missing SES fields and ([#1045](https://github.com/awslabs/aws-lambda-powertools-python/issues/1045)) +* **deps:** correct py36 marker for jmespath +* **deps:** Ignore boto3 changes until needed ([#1151](https://github.com/awslabs/aws-lambda-powertools-python/issues/1151)) +* **deps:** Bump aws-xray-sdk from 2.6.0 to 2.8.0 ([#413](https://github.com/awslabs/aws-lambda-powertools-python/issues/413)) +* **deps:** correct mypy types as dev dependency ([#1322](https://github.com/awslabs/aws-lambda-powertools-python/issues/1322)) +* **deps:** bump poetry to latest ([#592](https://github.com/awslabs/aws-lambda-powertools-python/issues/592)) +* **deps:** update jmespath marker to support 1.0 and py3.6 ([#1139](https://github.com/awslabs/aws-lambda-powertools-python/issues/1139)) +* **deps-dev:** remove jmespath due to dev deps conflict ([#1148](https://github.com/awslabs/aws-lambda-powertools-python/issues/1148)) +* **docs:** Use updated names for ProxyEventType ([#424](https://github.com/awslabs/aws-lambda-powertools-python/issues/424)) +* **docs:** remove Slack link ([#1210](https://github.com/awslabs/aws-lambda-powertools-python/issues/1210)) +* **docs:** correct feature_flags link and json exmaples ([#605](https://github.com/awslabs/aws-lambda-powertools-python/issues/605)) +* **docs:** workflow to include api ref in latest alias ([#408](https://github.com/awslabs/aws-lambda-powertools-python/issues/408)) +* **event-handler:** body to empty string in CORS preflight (ALB non-compliant) ([#1249](https://github.com/awslabs/aws-lambda-powertools-python/issues/1249)) +* **event-sources:** Pass authorizer data to APIGatewayEventAuthorizer ([#897](https://github.com/awslabs/aws-lambda-powertools-python/issues/897)) +* **event-sources:** handle dynamodb null type as none, not bool ([#929](https://github.com/awslabs/aws-lambda-powertools-python/issues/929)) +* **event-sources:** handle claimsOverrideDetails set to null ([#878](https://github.com/awslabs/aws-lambda-powertools-python/issues/878)) +* **event_handler:** docs snippets, high-level import CorsConfig ([#1019](https://github.com/awslabs/aws-lambda-powertools-python/issues/1019)) +* **event_handler:** exception_handler to handle ServiceError exceptions ([#1160](https://github.com/awslabs/aws-lambda-powertools-python/issues/1160)) * **event_handler:** fix bug with previous array implementation +* **event_handler:** Allow for event_source support ([#1159](https://github.com/awslabs/aws-lambda-powertools-python/issues/1159)) +* **event_handlers:** ImportError when importing Response from top-level event_handler ([#1388](https://github.com/awslabs/aws-lambda-powertools-python/issues/1388)) +* **event_handlers:** handle lack of headers when using auto-compression feature ([#1325](https://github.com/awslabs/aws-lambda-powertools-python/issues/1325)) +* **event_sources:** add test for Function URL AuthZ ([#1421](https://github.com/awslabs/aws-lambda-powertools-python/issues/1421)) +* **feature-flags:** bug handling multiple conditions ([#599](https://github.com/awslabs/aws-lambda-powertools-python/issues/599)) +* **feature-flags:** rules should evaluate with an AND op ([#724](https://github.com/awslabs/aws-lambda-powertools-python/issues/724)) +* **feature-toggles:** correct cdk example ([#601](https://github.com/awslabs/aws-lambda-powertools-python/issues/601)) +* **governance:** update label in names in issues +* **idempotency:** include decorated fn name in hash ([#869](https://github.com/awslabs/aws-lambda-powertools-python/issues/869)) +* **idempotency:** pass by value on idem key to guard inadvert mutations ([#1090](https://github.com/awslabs/aws-lambda-powertools-python/issues/1090)) +* **idempotency:** sorting keys before hashing ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) +* **idempotency:** sorting keys before hashing +* **idempotency:** sorting keys before hashing ([#639](https://github.com/awslabs/aws-lambda-powertools-python/issues/639)) +* **jmespath_util:** snappy as dev dep and typing example ([#1446](https://github.com/awslabs/aws-lambda-powertools-python/issues/1446)) +* **lambda-authorizer:** allow proxy resources path in arn ([#1051](https://github.com/awslabs/aws-lambda-powertools-python/issues/1051)) +* **logger:** support additional args for handlers when injecting lambda context ([#1276](https://github.com/awslabs/aws-lambda-powertools-python/issues/1276)) +* **logger:** clear_state regression on absent standard keys ([#1088](https://github.com/awslabs/aws-lambda-powertools-python/issues/1088)) +* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) +* **logger:** ensure state is cleared for custom formatters ([#1072](https://github.com/awslabs/aws-lambda-powertools-python/issues/1072)) +* **logger:** clear_state should keep custom key formats ([#1095](https://github.com/awslabs/aws-lambda-powertools-python/issues/1095)) +* **logger:** test generates logfile +* **logger:** push extra keys to the end ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) +* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) +* **logger:** exclude source_logger in copy_config_to_registered_loggers ([#1001](https://github.com/awslabs/aws-lambda-powertools-python/issues/1001)) +* **logger-utils:** regression on exclude set leading to no formatter ([#1080](https://github.com/awslabs/aws-lambda-powertools-python/issues/1080)) +* **metrics:** flush upon a single metric 100th data point ([#1046](https://github.com/awslabs/aws-lambda-powertools-python/issues/1046)) +* **metrics:** explicit type to single_metric ctx manager ([#865](https://github.com/awslabs/aws-lambda-powertools-python/issues/865)) +* **metrics:** raise SchemaValidationError for >8 metric dimensions ([#1240](https://github.com/awslabs/aws-lambda-powertools-python/issues/1240)) +* **middleware_factory:** ret type annotation for handler dec ([#1066](https://github.com/awslabs/aws-lambda-powertools-python/issues/1066)) +* **mypy:** a few return types, type signatures, and untyped areas ([#718](https://github.com/awslabs/aws-lambda-powertools-python/issues/718)) +* **mypy:** fixes to resolve no implicit optional errors ([#521](https://github.com/awslabs/aws-lambda-powertools-python/issues/521)) +* **parameters:** appconfig transform and return types ([#877](https://github.com/awslabs/aws-lambda-powertools-python/issues/877)) +* **parameters:** appconfig internal _get docstrings ([#934](https://github.com/awslabs/aws-lambda-powertools-python/issues/934)) +* **parser:** overload parse when using envelope ([#885](https://github.com/awslabs/aws-lambda-powertools-python/issues/885)) +* **parser:** Improve types for parser.py ([#419](https://github.com/awslabs/aws-lambda-powertools-python/issues/419)) +* **parser:** apigw wss validation check_message_id; housekeeping ([#553](https://github.com/awslabs/aws-lambda-powertools-python/issues/553)) +* **parser:** kinesis sequence number is str, not int ([#907](https://github.com/awslabs/aws-lambda-powertools-python/issues/907)) +* **parser:** Make ApiGateway version, authorizer fields optional ([#532](https://github.com/awslabs/aws-lambda-powertools-python/issues/532)) +* **parser:** body/QS can be null or omitted in apigw v1/v2 ([#820](https://github.com/awslabs/aws-lambda-powertools-python/issues/820)) +* **parser:** raise ValidationError when SNS->SQS keys are intentionally missing ([#1299](https://github.com/awslabs/aws-lambda-powertools-python/issues/1299)) +* **parser:** mypy support for payload type override as models ([#883](https://github.com/awslabs/aws-lambda-powertools-python/issues/883)) +* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) +* **tracer:** add warm start annotation (ColdStart=False) ([#851](https://github.com/awslabs/aws-lambda-powertools-python/issues/851)) +* **tracer:** mypy generic to preserve decorated method signature ([#529](https://github.com/awslabs/aws-lambda-powertools-python/issues/529)) +* **validator:** handle built-in custom formats correctly ([#498](https://github.com/awslabs/aws-lambda-powertools-python/issues/498)) +* **validator:** event type annotation as any in validate fn ([#405](https://github.com/awslabs/aws-lambda-powertools-python/issues/405)) +* **warning:** future distutils deprecation ([#921](https://github.com/awslabs/aws-lambda-powertools-python/issues/921)) ## Code Refactoring +* simplify custom formatter for minor changes ([#417](https://github.com/awslabs/aws-lambda-powertools-python/issues/417)) +* rename to clear_state +* rename to remove_custom_keys +* **apigateway:** Add BaseRouter and duplicate route check ([#757](https://github.com/awslabs/aws-lambda-powertools-python/issues/757)) * **batch:** remove legacy sqs_batch_processor ([#1492](https://github.com/awslabs/aws-lambda-powertools-python/issues/1492)) +* **data-classes:** clean up internal logic for APIGatewayAuthorizerResponse ([#643](https://github.com/awslabs/aws-lambda-powertools-python/issues/643)) +* **event-handler:** api gateway handler review changes ([#420](https://github.com/awslabs/aws-lambda-powertools-python/issues/420)) +* **event-handler:** Add ResponseBuilder and more docs ([#412](https://github.com/awslabs/aws-lambda-powertools-python/issues/412)) +* **event_handler:** match to match_results; 3.10 new keyword ([#616](https://github.com/awslabs/aws-lambda-powertools-python/issues/616)) +* **feature-flags:** add debug for all features evaluation" ([#590](https://github.com/awslabs/aws-lambda-powertools-python/issues/590)) +* **feature-toggles:** Code coverage and housekeeping ([#530](https://github.com/awslabs/aws-lambda-powertools-python/issues/530)) +* **feature_flags:** optimize UX and maintenance ([#563](https://github.com/awslabs/aws-lambda-powertools-python/issues/563)) +* **logger:** BYOFormatter and Handler, UTC support, and more ([#404](https://github.com/awslabs/aws-lambda-powertools-python/issues/404)) ## Documentation +* fix indentation of SAM snippets in install section ([#778](https://github.com/awslabs/aws-lambda-powertools-python/issues/778)) +* add team behind it and email +* consistency around admonitions and snippets ([#919](https://github.com/awslabs/aws-lambda-powertools-python/issues/919)) +* Added GraphQL Sample API to Examples section of README.md ([#930](https://github.com/awslabs/aws-lambda-powertools-python/issues/930)) +* add new public layer ARNs ([#746](https://github.com/awslabs/aws-lambda-powertools-python/issues/746)) +* external reference to cloudformation custom resource helper ([#914](https://github.com/awslabs/aws-lambda-powertools-python/issues/914)) +* update list of features +* add final consideration section +* disable search blur in non-prod env +* include new public roadmap ([#452](https://github.com/awslabs/aws-lambda-powertools-python/issues/452)) +* add amplify-cli instructions for public layer ([#754](https://github.com/awslabs/aws-lambda-powertools-python/issues/754)) +* fix anchor +* rename to tutorial given the size +* enable dark mode switch ([#471](https://github.com/awslabs/aws-lambda-powertools-python/issues/471)) +* add Layers example for Serverless framework & CDK ([#500](https://github.com/awslabs/aws-lambda-powertools-python/issues/500)) +* rename quickstart to tutorial in readme +* improve public lambda layer wording, clipboard buttons ([#762](https://github.com/awslabs/aws-lambda-powertools-python/issues/762)) +* add new public Slack invite +* update Lambda Layers version +* add better BDD coments +* Terraform reference for SAR Lambda Layer ([#716](https://github.com/awslabs/aws-lambda-powertools-python/issues/716)) +* Idiomatic tenet updated to Progressive +* fix syntax errors and line highlights ([#1004](https://github.com/awslabs/aws-lambda-powertools-python/issues/1004)) +* use higher contrast font ([#822](https://github.com/awslabs/aws-lambda-powertools-python/issues/822)) +* use higher contrast font +* updated Lambda Layers definition & limitations. ([#775](https://github.com/awslabs/aws-lambda-powertools-python/issues/775)) +* **api-gateway:** document new HTTP service error exceptions ([#546](https://github.com/awslabs/aws-lambda-powertools-python/issues/546)) +* **api-gateway:** add support for new router feature ([#767](https://github.com/awslabs/aws-lambda-powertools-python/issues/767)) +* **api-gateway:** add new API mapping support +* **api_gateway:** new event handler for API Gateway and ALB ([#418](https://github.com/awslabs/aws-lambda-powertools-python/issues/418)) +* **apigateway:** fix sample layout provided ([#864](https://github.com/awslabs/aws-lambda-powertools-python/issues/864)) +* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) +* **apigateway:** add new not_found feature ([#915](https://github.com/awslabs/aws-lambda-powertools-python/issues/915)) +* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) +* **apigateway:** re-add sample layout, add considerations ([#826](https://github.com/awslabs/aws-lambda-powertools-python/issues/826)) +* **appsync:** fix typo +* **appsync:** add new router feature ([#821](https://github.com/awslabs/aws-lambda-powertools-python/issues/821)) +* **appsync:** fix users.py typo to locations [#830](https://github.com/awslabs/aws-lambda-powertools-python/issues/830) +* **batch:** remove leftover from legacy +* **batch:** snippet typo on batch processed messages iteration ([#951](https://github.com/awslabs/aws-lambda-powertools-python/issues/951)) +* **batch:** fix typo in context manager keyword ([#938](https://github.com/awslabs/aws-lambda-powertools-python/issues/938)) +* **contributing:** operational excellence pause +* **core:** match code snippet name with filename ([#1286](https://github.com/awslabs/aws-lambda-powertools-python/issues/1286)) +* **data-class:** fix invalid syntax in new AppSync Authorizer +* **data-classes:** make authorizer concise; use enum ([#630](https://github.com/awslabs/aws-lambda-powertools-python/issues/630)) +* **data_classes:** fix missing dynamodb stream get_type/value +* **event-handler:** improve testing section for graphql ([#996](https://github.com/awslabs/aws-lambda-powertools-python/issues/996)) +* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) +* **event-handler:** new custom serializer option +* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) +* **event-handler:** document catch-all routes ([#705](https://github.com/awslabs/aws-lambda-powertools-python/issues/705)) +* **event_handler:** remove beta flag from new HTTP utility +* **event_handler:** fix closing brackets in CORS sample +* **event_handler:** add missing note on trimmed responses +* **examples:** enforce and fix all mypy errors ([#1393](https://github.com/awslabs/aws-lambda-powertools-python/issues/1393)) +* **feature-flags:** fix sample feature name in evaluate +* **feature-flags:** add guidance when to use vs env vars vs parameters +* **feature-flags:** create concrete documentation ([#594](https://github.com/awslabs/aws-lambda-powertools-python/issues/594)) +* **feature-toggles:** correct docs and typing ([#588](https://github.com/awslabs/aws-lambda-powertools-python/issues/588)) +* **feature_flags:** fix SAM infra, convert CDK to Python +* **governance:** typos on PR template fixes [#1314](https://github.com/awslabs/aws-lambda-powertools-python/issues/1314) +* **governance:** link roadmap and maintainers doc +* **governance:** add security doc to the root +* **graphql:** snippets split, improved, and lint ([#1287](https://github.com/awslabs/aws-lambda-powertools-python/issues/1287)) +* **home:** add discord invitation link ([#1471](https://github.com/awslabs/aws-lambda-powertools-python/issues/1471)) +* **home:** fix discord syntax and add Discord badge +* **homepage:** emphasize additional powertools languages ([#1292](https://github.com/awslabs/aws-lambda-powertools-python/issues/1292)) +* **homepage:** link to typescript version ([#950](https://github.com/awslabs/aws-lambda-powertools-python/issues/950)) * **homepage:** note about v2 version -* **layer:** upgrade to 1.28.0 (v33) - -## Features - -* **ci:** add actionlint in pre-commit hook -* **event_handler:** add cookies as 1st class citizen in v2 ([#1487](https://github.com/awslabs/aws-lambda-powertools-python/issues/1487)) -* **event_handler:** improved support for headers and cookies in v2 ([#1455](https://github.com/awslabs/aws-lambda-powertools-python/issues/1455)) -* **event_sources:** add CloudWatch dashboard custom widget event ([#1474](https://github.com/awslabs/aws-lambda-powertools-python/issues/1474)) - -## Maintenance - -* **bandit:** update baseline -* **ci:** add workflow to suggest splitting large PRs ([#1480](https://github.com/awslabs/aws-lambda-powertools-python/issues/1480)) -* **ci:** limit E2E workflow run for source code change -* **ci:** add linter for GitHub Actions as pre-commit hook ([#1479](https://github.com/awslabs/aws-lambda-powertools-python/issues/1479)) -* **ci:** add missing description fields -* **ci:** remove unused and undeclared OS matrix env -* **ci:** sync package version with pypi -* **ci:** fix invalid dependency leftover -* **ci:** create adhoc docs workflow for v2 -* **ci:** create adhoc docs workflow for v2 -* **ci:** create docs workflow for v2 -* **ci:** create reusable docs publishing workflow ([#1482](https://github.com/awslabs/aws-lambda-powertools-python/issues/1482)) -* **ci:** format comment on comment_large_pr script -* **ci:** add note for state persistence on comment_large_pr -* **ci:** destructure assignment on comment_large_pr -* **ci:** record pr details upon labeling -* **ci:** remove dangling debug step -* **ci:** enable ci checks for v2 -* **deps:** bump pydantic from 1.10.0 to 1.10.1 ([#1491](https://github.com/awslabs/aws-lambda-powertools-python/issues/1491)) -* **deps-dev:** bump black from 22.6.0 to 22.8.0 ([#1494](https://github.com/awslabs/aws-lambda-powertools-python/issues/1494)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#1481](https://github.com/awslabs/aws-lambda-powertools-python/issues/1481)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#306](https://github.com/awslabs/aws-lambda-powertools-python/issues/306)) -* **deps-dev:** bump mkdocs-material from 8.4.1 to 8.4.2 ([#1483](https://github.com/awslabs/aws-lambda-powertools-python/issues/1483)) -* **deps-dev:** bump flake8-variables-names from 0.0.4 to 0.0.5 ([#1490](https://github.com/awslabs/aws-lambda-powertools-python/issues/1490)) -* **deps-dev:** bump aws-cdk-lib from 2.39.1 to 2.40.0 ([#1495](https://github.com/awslabs/aws-lambda-powertools-python/issues/1495)) -* **maintainers:** update release workflow link -* **maintenance:** add discord link to first PR and first issue ([#1493](https://github.com/awslabs/aws-lambda-powertools-python/issues/1493)) - - - -## [v1.28.0] - 2022-08-25 -## Bug Fixes - -* **ci:** calculate parallel jobs based on infrastructure needs ([#1475](https://github.com/awslabs/aws-lambda-powertools-python/issues/1475)) -* **ci:** del flake8 direct dep over py3.6 conflicts and docs failure -* **ci:** move from pip-tools to poetry on layers reusable workflow -* **ci:** move from pip-tools to poetry on layers to fix conflicts -* **ci:** typo and bust gh actions cache -* **ci:** use poetry to resolve layer deps; pip for CDK -* **ci:** disable poetry venv for layer workflow as cdk ignores venv -* **ci:** add cdk v2 dep for layers workflow -* **ci:** move from pip-tools to poetry on layers -* **ci:** temporarily disable changelog upon release -* **ci:** add explicit origin to fix release detached head -* **jmespath_util:** snappy as dev dep and typing example ([#1446](https://github.com/awslabs/aws-lambda-powertools-python/issues/1446)) - -## Documentation - -* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) -* **home:** fix discord syntax and add Discord badge -* **home:** add discord invitation link ([#1471](https://github.com/awslabs/aws-lambda-powertools-python/issues/1471)) +* **idempotency:** add support for DynamoDB composite keys ([#808](https://github.com/awslabs/aws-lambda-powertools-python/issues/808)) +* **idempotency:** fix misleading idempotent examples ([#661](https://github.com/awslabs/aws-lambda-powertools-python/issues/661)) +* **idempotency:** remove beta flag +* **idempotency:** remove old todo +* **install:** new lambda layer for 1.24.0 release +* **install:** instructions to reduce pydantic package size ([#1077](https://github.com/awslabs/aws-lambda-powertools-python/issues/1077)) +* **jmespath:** clarify envelope terminology * **jmespath_util:** snippets split, improved, and lint ([#1419](https://github.com/awslabs/aws-lambda-powertools-python/issues/1419)) +* **lambda_layer:** fix CDK layer syntax +* **layer:** bump Lambda Layer to version 6 * **layer:** upgrade to 1.27.0 * **layer:** upgrade to 1.27.0 +* **layer:** upgrade to 1.26.7 +* **layer:** update to 1.25.7 +* **layer:** update to 1.25.6; cosmetic changes +* **layer:** upgrade to 1.25.10 +* **layer:** upgrade to 1.25.9 +* **layer:** remove link from clipboard button ([#1135](https://github.com/awslabs/aws-lambda-powertools-python/issues/1135)) +* **layer:** update to 1.24.1 +* **layer:** update to 1.24.2 +* **layer:** upgrade to 1.28.0 (v33) +* **layer:** update to 1.25.1 +* **layer:** update to 1.25.3 +* **layer:** bump to 1.25.5 +* **lint:** add markdownlint rules and automation ([#1256](https://github.com/awslabs/aws-lambda-powertools-python/issues/1256)) +* **logger:** document enriching logs with logrecord attributes ([#1271](https://github.com/awslabs/aws-lambda-powertools-python/issues/1271)) +* **logger:** document new get_correlation_id method ([#545](https://github.com/awslabs/aws-lambda-powertools-python/issues/545)) +* **logger:** improvements extensibility & new features ([#415](https://github.com/awslabs/aws-lambda-powertools-python/issues/415)) +* **logger:** snippets split, improved, and lint ([#1262](https://github.com/awslabs/aws-lambda-powertools-python/issues/1262)) +* **logger:** add FAQ for cross-account searches ([#501](https://github.com/awslabs/aws-lambda-powertools-python/issues/501)) +* **maintainers:** initial maintainers playbook ([#1222](https://github.com/awslabs/aws-lambda-powertools-python/issues/1222)) +* **metrics:** snippets split, improved, and lint ([#1272](https://github.com/awslabs/aws-lambda-powertools-python/issues/1272)) +* **metrics:** snippets split, improved, and lint +* **metrics:** keep it consistent with other sections, update metric names * **middleware-factory:** snippets split, improved, and lint ([#1451](https://github.com/awslabs/aws-lambda-powertools-python/issues/1451)) +* **nav:** make REST and GraphQL event handlers more explicit ([#959](https://github.com/awslabs/aws-lambda-powertools-python/issues/959)) +* **parameters:** add testing your code section ([#1017](https://github.com/awslabs/aws-lambda-powertools-python/issues/1017)) +* **parameters:** auto-transforming values based on suffix ([#573](https://github.com/awslabs/aws-lambda-powertools-python/issues/573)) +* **parser:** minor grammar fix ([#1427](https://github.com/awslabs/aws-lambda-powertools-python/issues/1427)) +* **parser:** fix incorrect import in root_validator example ([#735](https://github.com/awslabs/aws-lambda-powertools-python/issues/735)) * **parser:** minor grammar fix ([#1427](https://github.com/awslabs/aws-lambda-powertools-python/issues/1427)) +* **parser:** APIGatewayProxyEvent to APIGatewayProxyEventModel ([#1061](https://github.com/awslabs/aws-lambda-powertools-python/issues/1061)) +* **parser:** fix table and heading syntax +* **plugin:** add mermaid to create diagram as code ([#1070](https://github.com/awslabs/aws-lambda-powertools-python/issues/1070)) +* **quickstart:** make section agnostic to json lib +* **quickstart:** expand on intro line +* **quickstart:** tidy requirements up +* **quickstart:** sentence fragmentation, tidy up +* **quickstart:** same process for Logger +* **quickstart:** add sub-sections, fix highlight & code +* **readme:** add code coverage badge ([#577](https://github.com/awslabs/aws-lambda-powertools-python/issues/577)) +* **roadmap:** use pinned pause issue instead +* **roadmap:** add new roadmap section ([#1204](https://github.com/awslabs/aws-lambda-powertools-python/issues/1204)) +* **tenets:** make core, non-core more explicit +* **tenets:** update Idiomatic tenet to Progressive ([#823](https://github.com/awslabs/aws-lambda-powertools-python/issues/823)) +* **theme:** upgrade mkdocs-material to 8.x ([#1002](https://github.com/awslabs/aws-lambda-powertools-python/issues/1002)) +* **tracer:** warning to note on local traces +* **tracer:** update ServiceLens image w/ API GW, copywriting +* **tracer:** new ignore_endpoint feature ([#931](https://github.com/awslabs/aws-lambda-powertools-python/issues/931)) +* **tracer:** split and lint code snippets ([#1260](https://github.com/awslabs/aws-lambda-powertools-python/issues/1260)) +* **tracer:** snippets split, improved, and lint ([#1261](https://github.com/awslabs/aws-lambda-powertools-python/issues/1261)) +* **tracer:** additional scenario when to disable auto-capture ([#499](https://github.com/awslabs/aws-lambda-powertools-python/issues/499)) +* **tracer:** add annotation, metadata, and image +* **tracer:** add initial image, requirements +* **tracer:** Fix line highlighting ([#395](https://github.com/awslabs/aws-lambda-powertools-python/issues/395)) +* **tracer:** update wording that it auto-disables on non-Lambda env +* **tutorial:** fix broken internal links ([#1000](https://github.com/awslabs/aws-lambda-powertools-python/issues/1000)) +* **tutorial:** fix path to images ([#963](https://github.com/awslabs/aws-lambda-powertools-python/issues/963)) * **typing:** snippets split, improved, and lint ([#1465](https://github.com/awslabs/aws-lambda-powertools-python/issues/1465)) * **validation:** snippets split, improved, and lint ([#1449](https://github.com/awslabs/aws-lambda-powertools-python/issues/1449)) ## Features -* **parser:** add support for Lambda Function URL ([#1442](https://github.com/awslabs/aws-lambda-powertools-python/issues/1442)) - -## Maintenance - -* **batch:** deprecate sqs_batch_processor ([#1463](https://github.com/awslabs/aws-lambda-powertools-python/issues/1463)) -* **ci:** prevent concurrent git update in critical workflows ([#1478](https://github.com/awslabs/aws-lambda-powertools-python/issues/1478)) -* **ci:** disable e2e py version matrix due to concurrent locking -* **ci:** revert e2e py version matrix -* **ci:** temp disable e2e matrix -* **ci:** update changelog with latest changes -* **ci:** update changelog with latest changes -* **ci:** reduce payload and only send prod notification -* **ci:** remove area/utilities conflicting label -* **ci:** include py version in stack and cache lock -* **ci:** remove conventional changelog commit to reduce noise -* **ci:** update changelog with latest changes -* **deps:** bump release-drafter/release-drafter from 5.20.0 to 5.20.1 ([#1458](https://github.com/awslabs/aws-lambda-powertools-python/issues/1458)) -* **deps:** bump pydantic from 1.9.1 to 1.9.2 ([#1448](https://github.com/awslabs/aws-lambda-powertools-python/issues/1448)) -* **deps-dev:** bump flake8-bugbear from 22.8.22 to 22.8.23 ([#1473](https://github.com/awslabs/aws-lambda-powertools-python/issues/1473)) -* **deps-dev:** bump types-requests from 2.28.7 to 2.28.8 ([#1423](https://github.com/awslabs/aws-lambda-powertools-python/issues/1423)) -* **maintainer:** add Leandro as maintainer ([#1468](https://github.com/awslabs/aws-lambda-powertools-python/issues/1468)) -* **tests:** build and deploy Lambda Layer stack once ([#1466](https://github.com/awslabs/aws-lambda-powertools-python/issues/1466)) -* **tests:** refactor E2E test mechanics to ease maintenance, writing tests and parallelization ([#1444](https://github.com/awslabs/aws-lambda-powertools-python/issues/1444)) -* **tests:** enable end-to-end test workflow ([#1470](https://github.com/awslabs/aws-lambda-powertools-python/issues/1470)) -* **tests:** refactor E2E logger to ease maintenance, writing tests and parallelization ([#1460](https://github.com/awslabs/aws-lambda-powertools-python/issues/1460)) -* **tests:** refactor E2E tracer to ease maintenance, writing tests and parallelization ([#1457](https://github.com/awslabs/aws-lambda-powertools-python/issues/1457)) - -## Reverts -* fix(ci): add explicit origin to fix release detached head - - - -## [v1.27.0] - 2022-08-05 -## Bug Fixes - -* **ci:** changelog workflow must receive git tags too -* **ci:** add additional input to accurately describe intent on skip -* **ci:** job permissions -* **event_sources:** add test for Function URL AuthZ ([#1421](https://github.com/awslabs/aws-lambda-powertools-python/issues/1421)) - -## Documentation - -* **layer:** upgrade to 1.26.7 - -## Features - +* expose jmespath powertools functions ([#736](https://github.com/awslabs/aws-lambda-powertools-python/issues/736)) +* add support to persist default dimensions ([#410](https://github.com/awslabs/aws-lambda-powertools-python/issues/410)) +* add get_raw_configuration property in store; expose store +* boto3 sessions in batch, parameters & idempotency ([#717](https://github.com/awslabs/aws-lambda-powertools-python/issues/717)) +* **api-gateway:** add support for custom serializer ([#568](https://github.com/awslabs/aws-lambda-powertools-python/issues/568)) +* **api-gateway:** add debug mode ([#507](https://github.com/awslabs/aws-lambda-powertools-python/issues/507)) +* **api-gateway:** add common service errors ([#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506)) +* **apigateway:** access parent api resolver from router ([#842](https://github.com/awslabs/aws-lambda-powertools-python/issues/842)) +* **apigateway:** add exception_handler support ([#898](https://github.com/awslabs/aws-lambda-powertools-python/issues/898)) +* **apigateway:** add Router to allow large routing composition ([#645](https://github.com/awslabs/aws-lambda-powertools-python/issues/645)) +* **appsync:** add Router to allow large resolver composition ([#776](https://github.com/awslabs/aws-lambda-powertools-python/issues/776)) +* **batch:** new BatchProcessor for SQS, DynamoDB, Kinesis ([#886](https://github.com/awslabs/aws-lambda-powertools-python/issues/886)) +* **ci:** auto-notify & close issues on release +* **ci:** add actionlint in pre-commit hook * **ci:** create reusable changelog generation ([#1418](https://github.com/awslabs/aws-lambda-powertools-python/issues/1418)) -* **ci:** include changelog generation on docs build * **ci:** create reusable changelog generation +* **ci:** include changelog generation on docs build +* **data-classes:** decorator to instantiate data_classes and docs updates ([#442](https://github.com/awslabs/aws-lambda-powertools-python/issues/442)) +* **data-classes:** decode json_body if based64 encoded ([#560](https://github.com/awslabs/aws-lambda-powertools-python/issues/560)) +* **data-classes:** support for code pipeline job event ([#416](https://github.com/awslabs/aws-lambda-powertools-python/issues/416)) +* **data-classes:** AppSync Lambda authorizer event ([#610](https://github.com/awslabs/aws-lambda-powertools-python/issues/610)) +* **data-classes:** ActiveMQ and RabbitMQ support ([#770](https://github.com/awslabs/aws-lambda-powertools-python/issues/770)) +* **data-classes:** decode base64 encoded body ([#425](https://github.com/awslabs/aws-lambda-powertools-python/issues/425)) +* **data-classes:** authorizer for http api and rest api ([#620](https://github.com/awslabs/aws-lambda-powertools-python/issues/620)) +* **data-classes:** add AttributeValueType to DynamoDBStreamEvent ([#462](https://github.com/awslabs/aws-lambda-powertools-python/issues/462)) +* **data-classes:** data_as_bytes prop KinesisStreamRecordPayload ([#628](https://github.com/awslabs/aws-lambda-powertools-python/issues/628)) +* **event-handle:** allow for cors=None setting ([#421](https://github.com/awslabs/aws-lambda-powertools-python/issues/421)) +* **event-handler:** Support AppSyncResolverEvent subclassing ([#526](https://github.com/awslabs/aws-lambda-powertools-python/issues/526)) +* **event-handler:** prefixes to strip for custom mappings ([#579](https://github.com/awslabs/aws-lambda-powertools-python/issues/579)) +* **event-handler:** new resolvers to fix current_event typing ([#978](https://github.com/awslabs/aws-lambda-powertools-python/issues/978)) +* **event-handler:** add http ProxyEvent handler ([#369](https://github.com/awslabs/aws-lambda-powertools-python/issues/369)) +* **event-sources:** cache parsed json in data class ([#909](https://github.com/awslabs/aws-lambda-powertools-python/issues/909)) +* **event_handler:** improved support for headers and cookies in v2 ([#1455](https://github.com/awslabs/aws-lambda-powertools-python/issues/1455)) +* **event_handler:** add cookies as 1st class citizen in v2 ([#1487](https://github.com/awslabs/aws-lambda-powertools-python/issues/1487)) * **event_handlers:** Add support for Lambda Function URLs ([#1408](https://github.com/awslabs/aws-lambda-powertools-python/issues/1408)) +* **event_sources:** add CloudWatch dashboard custom widget event ([#1474](https://github.com/awslabs/aws-lambda-powertools-python/issues/1474)) +* **feat-toggle:** New simple feature toggles rule engine (WIP) ([#494](https://github.com/awslabs/aws-lambda-powertools-python/issues/494)) +* **feature flags:** Add not_in action and rename contains to in ([#589](https://github.com/awslabs/aws-lambda-powertools-python/issues/589)) +* **feature-flags:** get_raw_configuration property in Store ([#720](https://github.com/awslabs/aws-lambda-powertools-python/issues/720)) +* **feature-flags:** improve "IN/NOT_IN"; new rule actions ([#710](https://github.com/awslabs/aws-lambda-powertools-python/issues/710)) +* **feature-flags:** Bring your own logger for debug ([#709](https://github.com/awslabs/aws-lambda-powertools-python/issues/709)) +* **feature_flags:** support beyond boolean values (JSON values) ([#804](https://github.com/awslabs/aws-lambda-powertools-python/issues/804)) +* **feature_flags:** Added inequality conditions ([#721](https://github.com/awslabs/aws-lambda-powertools-python/issues/721)) +* **general:** support for Python 3.9 ([#626](https://github.com/awslabs/aws-lambda-powertools-python/issues/626)) +* **idempotency:** handle lambda timeout scenarios for INPROGRESS records ([#1387](https://github.com/awslabs/aws-lambda-powertools-python/issues/1387)) +* **idempotency:** support dataclasses & pydantic models payloads ([#908](https://github.com/awslabs/aws-lambda-powertools-python/issues/908)) +* **idempotency:** support for any synchronous function ([#625](https://github.com/awslabs/aws-lambda-powertools-python/issues/625)) +* **idempotency:** makes customers unit testing easier ([#719](https://github.com/awslabs/aws-lambda-powertools-python/issues/719)) +* **logger:** allow handler with custom kwargs signature ([#913](https://github.com/awslabs/aws-lambda-powertools-python/issues/913)) +* **logger:** add option to clear state per invocation +* **logger:** add ALB correlation ID support ([#816](https://github.com/awslabs/aws-lambda-powertools-python/issues/816)) +* **logger:** add option to clear state per invocation ([#467](https://github.com/awslabs/aws-lambda-powertools-python/issues/467)) +* **logger:** support use_datetime_directive for timestamps ([#920](https://github.com/awslabs/aws-lambda-powertools-python/issues/920)) +* **logger:** log_event support event data classes (e.g. S3Event) ([#984](https://github.com/awslabs/aws-lambda-powertools-python/issues/984)) +* **logger:** clone powertools logger config to any Python logger ([#927](https://github.com/awslabs/aws-lambda-powertools-python/issues/927)) +* **logger:** add get_correlation_id method ([#516](https://github.com/awslabs/aws-lambda-powertools-python/issues/516)) * **metrics:** update max user-defined dimensions from 9 to 29 ([#1417](https://github.com/awslabs/aws-lambda-powertools-python/issues/1417)) +* **mypy:** complete mypy support for the entire codebase ([#943](https://github.com/awslabs/aws-lambda-powertools-python/issues/943)) +* **mypy:** add mypy support to makefile ([#508](https://github.com/awslabs/aws-lambda-powertools-python/issues/508)) +* **parameters:** add clear_cache method for providers ([#1194](https://github.com/awslabs/aws-lambda-powertools-python/issues/1194)) +* **parameters:** accept boto3_client to support private endpoints and ease testing ([#1096](https://github.com/awslabs/aws-lambda-powertools-python/issues/1096)) +* **params:** expose high level max_age, raise_on_transform_error ([#567](https://github.com/awslabs/aws-lambda-powertools-python/issues/567)) +* **parser:** security issue in Pydantic [#436](https://github.com/awslabs/aws-lambda-powertools-python/issues/436) ([#437](https://github.com/awslabs/aws-lambda-powertools-python/issues/437)) +* **parser:** Support for API GW v1 proxy schema & envelope ([#403](https://github.com/awslabs/aws-lambda-powertools-python/issues/403)) +* **parser:** add support for Lambda Function URL ([#1442](https://github.com/awslabs/aws-lambda-powertools-python/issues/1442)) +* **parser:** add support for API Gateway HTTP API [#434](https://github.com/awslabs/aws-lambda-powertools-python/issues/434) ([#441](https://github.com/awslabs/aws-lambda-powertools-python/issues/441)) +* **tracer:** disable tracer when for non-Lambda envs ([#598](https://github.com/awslabs/aws-lambda-powertools-python/issues/598)) +* **tracer:** ignore tracing for certain hostname(s) or url(s) ([#910](https://github.com/awslabs/aws-lambda-powertools-python/issues/910)) +* **tracer:** add service annotation when service is set ([#861](https://github.com/awslabs/aws-lambda-powertools-python/issues/861)) +* **validator:** include missing data elements from a validation error ([#686](https://github.com/awslabs/aws-lambda-powertools-python/issues/686)) ## Maintenance -* **ci:** sync area labels to prevent dedup -* **ci:** update changelog with latest changes -* **ci:** update changelog with latest changes -* **ci:** add manual trigger for docs -* **ci:** update changelog with latest changes -* **ci:** temporarily disable changelog push on release -* **ci:** update changelog with latest changes -* **ci:** move changelog generation to rebuild_latest_doc workflow -* **ci:** update project with version -* **ci:** update release automated activities -* **ci:** readd changelog step on release -* **ci:** move changelog generation to rebuild_latest_doc workflow -* **ci:** drop 3.6 from workflows -* **deps:** bump constructs from 10.1.1 to 10.1.60 ([#1399](https://github.com/awslabs/aws-lambda-powertools-python/issues/1399)) -* **deps:** bump constructs from 10.1.1 to 10.1.66 ([#1414](https://github.com/awslabs/aws-lambda-powertools-python/issues/1414)) -* **deps:** bump jsii from 1.57.0 to 1.63.2 ([#1400](https://github.com/awslabs/aws-lambda-powertools-python/issues/1400)) -* **deps:** bump constructs from 10.1.1 to 10.1.64 ([#1405](https://github.com/awslabs/aws-lambda-powertools-python/issues/1405)) -* **deps:** bump attrs from 21.4.0 to 22.1.0 ([#1397](https://github.com/awslabs/aws-lambda-powertools-python/issues/1397)) -* **deps:** bump constructs from 10.1.1 to 10.1.63 ([#1402](https://github.com/awslabs/aws-lambda-powertools-python/issues/1402)) -* **deps:** bump constructs from 10.1.1 to 10.1.65 ([#1407](https://github.com/awslabs/aws-lambda-powertools-python/issues/1407)) -* **deps-dev:** bump types-requests from 2.28.5 to 2.28.6 ([#1401](https://github.com/awslabs/aws-lambda-powertools-python/issues/1401)) -* **deps-dev:** bump types-requests from 2.28.6 to 2.28.7 ([#1406](https://github.com/awslabs/aws-lambda-powertools-python/issues/1406)) -* **docs:** remove pause sentence from roadmap ([#1409](https://github.com/awslabs/aws-lambda-powertools-python/issues/1409)) -* **docs:** update site name to test ci changelog -* **docs:** update CHANGELOG for v1.26.7 -* **docs:** update description to trigger changelog generation -* **governance:** remove devcontainer in favour of gitpod.io ([#1411](https://github.com/awslabs/aws-lambda-powertools-python/issues/1411)) -* **governance:** add pre-configured dev environment with GitPod.io to ease contributions ([#1403](https://github.com/awslabs/aws-lambda-powertools-python/issues/1403)) -* **layers:** upgrade cdk dep hashes to prevent ci fail - - - -## [v1.26.7] - 2022-07-29 -## Bug Fixes - -* **ci:** add missing oidc token generation permission -* **event_handlers:** ImportError when importing Response from top-level event_handler ([#1388](https://github.com/awslabs/aws-lambda-powertools-python/issues/1388)) - -## Documentation - -* **examples:** enforce and fix all mypy errors ([#1393](https://github.com/awslabs/aws-lambda-powertools-python/issues/1393)) - -## Features - -* **idempotency:** handle lambda timeout scenarios for INPROGRESS records ([#1387](https://github.com/awslabs/aws-lambda-powertools-python/issues/1387)) - -## Maintenance - -* **ci:** increase skip_pypi logic to cover tests/changelog on re-run failures -* **ci:** update project with version 1.26.6 -* **ci:** drop 3.6 from workflows ([#1395](https://github.com/awslabs/aws-lambda-powertools-python/issues/1395)) -* **ci:** add conditional to skip pypi release ([#1366](https://github.com/awslabs/aws-lambda-powertools-python/issues/1366)) -* **ci:** remove leftover logic from on_merged_pr workflow -* **ci:** update project with version 1.26.6 -* **ci:** update project with version 1.26.6 -* **deps:** bump jsii from 1.57.0 to 1.63.1 ([#1390](https://github.com/awslabs/aws-lambda-powertools-python/issues/1390)) -* **deps:** bump constructs from 10.1.1 to 10.1.59 ([#1396](https://github.com/awslabs/aws-lambda-powertools-python/issues/1396)) -* **deps-dev:** bump flake8-isort from 4.1.1 to 4.1.2.post0 ([#1384](https://github.com/awslabs/aws-lambda-powertools-python/issues/1384)) -* **layers:** bump to 1.26.6 using layer v26 -* **maintainers:** add Ruben as a maintainer ([#1392](https://github.com/awslabs/aws-lambda-powertools-python/issues/1392)) - - - -## [v1.26.6] - 2022-07-25 -## Bug Fixes - -* **ci:** remove unsupported env in workflow_call -* **ci:** allow inherit secrets for reusable workflow -* **ci:** remove unused secret -* **ci:** label_related_issue unresolved var from history mixup -* **ci:** cond doesnt support two expr w/ env -* **ci:** only event is resolved in cond -* **ci:** unexpected symbol due to double quotes... -* **event_handlers:** handle lack of headers when using auto-compression feature ([#1325](https://github.com/awslabs/aws-lambda-powertools-python/issues/1325)) - -## Maintenance - +* bump to 1.20.2 +* bump to 1.15.1 +* bump to 1.16.0 +* bump to 1.16.1 +* trial boring cyborg automation +* include regression in changelog +* bump to 1.25.10 +* assited changelog pre-generation, auto-label PR ([#443](https://github.com/awslabs/aws-lambda-powertools-python/issues/443)) +* bump to 1.21.0 +* bump to 1.25.9 +* bump to 1.25.8 +* bump to 1.25.7 +* bump to 1.25.6 +* bump to 1.25.5 +* bump to 1.25.4 +* bump to 1.26.2 +* enable dependabot for dep upgrades ([#444](https://github.com/awslabs/aws-lambda-powertools-python/issues/444)) +* enable mergify ([#450](https://github.com/awslabs/aws-lambda-powertools-python/issues/450)) +* remove duplicate test +* comment reason for change +* remove unnecessary test +* lint unused import +* bump to 1.25.3 +* bump version 1.26.1 +* bump to 1.25.2 +* add sam build gitignore +* dependabot/mergify guardrail for major versions +* move to approach B for multiple IaC +* bump to 1.25.1 +* bump to 1.25.0 +* correct docs +* correct docs +* fix dependabot commit messages prefix +* fix dependabot unique set config +* bump mkdocs-material from 7.1.5 to 7.1.6 ([#451](https://github.com/awslabs/aws-lambda-powertools-python/issues/451)) +* bump boto3 from 1.17.78 to 1.17.84 ([#449](https://github.com/awslabs/aws-lambda-powertools-python/issues/449)) +* bump to version 1.26.3 +* bump xenon from 0.7.1 to 0.7.3 ([#446](https://github.com/awslabs/aws-lambda-powertools-python/issues/446)) +* bump actions/setup-python from 1 to 2.2.2 ([#445](https://github.com/awslabs/aws-lambda-powertools-python/issues/445)) +* update mergify to require approval on dependabot ([#456](https://github.com/awslabs/aws-lambda-powertools-python/issues/456)) +* fix path for PR auto-labelling +* use isinstance over type +* bump to 1.24.2 +* reintroduce codecov token +* ignore codecov upload +* bump to 1.24.1 +* bump to 1.24.1 +* bump to 1.24.0 +* bump to 1.23.0 +* minor housekeeping before release ([#912](https://github.com/awslabs/aws-lambda-powertools-python/issues/912)) +* correct pr label order +* bump to 1.22.0 +* conditional to publish docs only attempt 3 +* conditional to publish docs only attempt 2 +* conditional to publish docs only +* remove Lambda Layer version tag +* fix var expr +* bump to 1.21.1 +* include dependencies label under maintenance +* include regression in changelog +* fix changelog file redirection +* bump version to 1.17.0 +* ignore constants in test cov ([#745](https://github.com/awslabs/aws-lambda-powertools-python/issues/745)) +* ignore constants in tests cov +* bump 1.17.1 ([#502](https://github.com/awslabs/aws-lambda-powertools-python/issues/502)) +* bump 1.18.0 ([#547](https://github.com/awslabs/aws-lambda-powertools-python/issues/547)) +* bump 1.18.1 +* bump to 1.15.0 ([#422](https://github.com/awslabs/aws-lambda-powertools-python/issues/422)) +* enable autolabel based on PR title +* only build docs on docs path +* bump to 1.19.0 +* update pypi description, keywords +* include feature-flags docs hotfix +* add support for publishing fallback * dummy for PR test * print full event depth * print full workflow event depth * debug full event +* bump to 1.20.0 +* update changelog to reflect out-of-band commits +* add python 3.9 support +* update new changelog version tag +* setup codespaces ([#637](https://github.com/awslabs/aws-lambda-powertools-python/issues/637)) +* markdown linter fixes ([#636](https://github.com/awslabs/aws-lambda-powertools-python/issues/636)) * remove leftover from fork one more time -* **ci:** test env expr -* **ci:** test upstream job skip +* include public layers changelog +* bump to 1.20.1 +* bump to 1.26.0 +* **actions:** include new labels +* **api-docs:** enable allow_reuse to fix the docs ([#612](https://github.com/awslabs/aws-lambda-powertools-python/issues/612)) +* **bandit:** update baseline +* **batch:** deprecate sqs_batch_processor ([#1463](https://github.com/awslabs/aws-lambda-powertools-python/issues/1463)) +* **ci:** remove leftover logic from on_merged_pr workflow +* **ci:** update project with version 1.26.6 +* **ci:** use gh environment for beta and prod layer deploy ([#1356](https://github.com/awslabs/aws-lambda-powertools-python/issues/1356)) +* **ci:** remove core group from codeowners ([#1358](https://github.com/awslabs/aws-lambda-powertools-python/issues/1358)) +* **ci:** use OIDC and encrypt release secrets ([#1355](https://github.com/awslabs/aws-lambda-powertools-python/issues/1355)) +* **ci:** introduce codeowners ([#1352](https://github.com/awslabs/aws-lambda-powertools-python/issues/1352)) +* **ci:** drop 3.6 from workflows ([#1395](https://github.com/awslabs/aws-lambda-powertools-python/issues/1395)) * **ci:** lockdown workflow_run by origin ([#1350](https://github.com/awslabs/aws-lambda-powertools-python/issues/1350)) +* **ci:** test upstream job skip +* **ci:** test env expr * **ci:** test default env * **ci:** experiment hardening origin -* **ci:** experiment hardening origin -* **ci:** introduce codeowners ([#1352](https://github.com/awslabs/aws-lambda-powertools-python/issues/1352)) -* **ci:** use OIDC and encrypt release secrets ([#1355](https://github.com/awslabs/aws-lambda-powertools-python/issues/1355)) -* **ci:** remove core group from codeowners ([#1358](https://github.com/awslabs/aws-lambda-powertools-python/issues/1358)) +* **ci:** temporarily disable changelog push on release +* **ci:** move changelog generation to rebuild_latest_doc workflow +* **ci:** update project with version +* **ci:** move changelog generation to rebuild_latest_doc workflow +* **ci:** drop 3.6 from workflows * **ci:** confirm workflow_run event -* **ci:** use gh environment for beta and prod layer deploy ([#1356](https://github.com/awslabs/aws-lambda-powertools-python/issues/1356)) +* **ci:** update project with version 1.26.6 +* **ci:** readd changelog step on release +* **ci:** update release automated activities +* **ci:** update changelog with latest changes +* **ci:** update changelog with latest changes +* **ci:** add conditional to skip pypi release ([#1366](https://github.com/awslabs/aws-lambda-powertools-python/issues/1366)) +* **ci:** add manual trigger for docs +* **ci:** update changelog with latest changes * **ci:** update project with version 1.26.5 -* **deps:** bump constructs from 10.1.1 to 10.1.52 ([#1343](https://github.com/awslabs/aws-lambda-powertools-python/issues/1343)) -* **deps-dev:** bump mypy-boto3-cloudwatch from 1.24.0 to 1.24.35 ([#1342](https://github.com/awslabs/aws-lambda-powertools-python/issues/1342)) -* **governance:** update wording tech debt to summary in maintenance template -* **governance:** add new maintenance issue template for tech debt ([#1326](https://github.com/awslabs/aws-lambda-powertools-python/issues/1326)) -* **layers:** layer canary stack should not hardcode resource name -* **layers:** replace layers account secret ([#1329](https://github.com/awslabs/aws-lambda-powertools-python/issues/1329)) -* **layers:** expand to all aws commercial regions ([#1324](https://github.com/awslabs/aws-lambda-powertools-python/issues/1324)) -* **layers:** bump to 1.26.5 - -## Pull Requests - -* Merge pull request [#285](https://github.com/awslabs/aws-lambda-powertools-python/issues/285) from heitorlessa/chore/skip-dep-workflow -* Merge pull request [#284](https://github.com/awslabs/aws-lambda-powertools-python/issues/284) from heitorlessa/chore/dummy - - - -## [v1.26.5] - 2022-07-20 -## Bug Fixes - -* mathc the name of the cdk synth from the build phase -* typo in input for layer workflow -* no need to cache npm since we only install cdk cli and don't have .lock files -* add entire ARN role instead of account and role name -* path to artefact -* unzip the right artifact name -* download artefact into the layer dir -* sight, yes a whitespace character breaks the build -* **ci:** checkout project before validating related issue workflow -* **ci:** install poetry before calling setup/python with cache ([#1315](https://github.com/awslabs/aws-lambda-powertools-python/issues/1315)) -* **ci:** remove additional quotes in PR action ([#1317](https://github.com/awslabs/aws-lambda-powertools-python/issues/1317)) -* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) -* **ci:** fetch all git info so we can check tags -* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) -* **ci:** keep layer version permission ([#1318](https://github.com/awslabs/aws-lambda-powertools-python/issues/1318)) -* **ci:** regex to catch combination of related issues workflow -* **deps:** correct mypy types as dev dependency ([#1322](https://github.com/awslabs/aws-lambda-powertools-python/issues/1322)) -* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) - -## Documentation - -* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) -* **governance:** typos on PR template fixes [#1314](https://github.com/awslabs/aws-lambda-powertools-python/issues/1314) -* **governance:** add security doc to the root - -## Maintenance - -* **ci:** limits concurrency for docs workflow +* **ci:** update changelog with latest changes +* **ci:** sync area labels to prevent dedup +* **ci:** update changelog with latest changes * **ci:** adds caching when installing python dependencies ([#1311](https://github.com/awslabs/aws-lambda-powertools-python/issues/1311)) * **ci:** update project with version 1.26.4 -* **ci:** fix reference error in related_issue -* **deps:** bump constructs from 10.1.1 to 10.1.51 ([#1323](https://github.com/awslabs/aws-lambda-powertools-python/issues/1323)) -* **deps-dev:** bump mypy from 0.961 to 0.971 ([#1320](https://github.com/awslabs/aws-lambda-powertools-python/issues/1320)) -* **governance:** fix typo on semantic commit link introduced in [#1](https://github.com/awslabs/aws-lambda-powertools-python/issues/1)aef4 -* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) -* **layers:** bump to 22 for 1.26.3 - - - -## [v1.26.4] - 2022-07-18 -## Bug Fixes - -* **ci:** checkout project before validating related issue workflow -* **ci:** fixes typos and small issues on github scripts ([#1302](https://github.com/awslabs/aws-lambda-powertools-python/issues/1302)) -* **ci:** address conditional type on_merge -* **ci:** address pr title semantic not found logic -* **ci:** address gh-actions additional quotes; remove debug -* **ci:** regex group name for on_merge workflow -* **ci:** escape outputs as certain PRs can break GH Actions expressions -* **ci:** move conditionals from yaml to code; leftover -* **ci:** move conditionals from yaml to code -* **ci:** accept core arg in label related issue workflow -* **ci:** match the name of the cdk synth from the build phase -* **ci:** regex to catch combination of related issues workflow -* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) -* **parser:** raise ValidationError when SNS->SQS keys are intentionally missing ([#1299](https://github.com/awslabs/aws-lambda-powertools-python/issues/1299)) - -## Documentation - -* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) -* **graphql:** snippets split, improved, and lint ([#1287](https://github.com/awslabs/aws-lambda-powertools-python/issues/1287)) -* **homepage:** emphasize additional powertools languages ([#1292](https://github.com/awslabs/aws-lambda-powertools-python/issues/1292)) -* **metrics:** snippets split, improved, and lint - -## Maintenance - * **ci:** increase release automation and limit to one manual step ([#1297](https://github.com/awslabs/aws-lambda-powertools-python/issues/1297)) -* **ci:** make export PR reusable -* **ci:** auto-merge cdk lib and lambda layer construct -* **ci:** convert inline gh-script to file +* **ci:** update changelog with latest changes +* **ci:** split latest docs workflow +* **ci:** update changelog with latest changes * **ci:** lockdown 3rd party workflows to pin sha ([#1301](https://github.com/awslabs/aws-lambda-powertools-python/issues/1301)) * **ci:** automatically add area label based on title ([#1300](https://github.com/awslabs/aws-lambda-powertools-python/issues/1300)) -* **ci:** disable output debugging as pr body isnt accepted +* **ci:** reduce payload and only send prod notification * **ci:** experiment with conditional on outputs * **ci:** improve error handling for non-issue numbers * **ci:** add end to end testing mechanism ([#1247](https://github.com/awslabs/aws-lambda-powertools-python/issues/1247)) +* **ci:** update changelog with latest changes +* **ci:** update changelog with latest changes +* **ci:** safely label PR based on title +* **ci:** update mergify bot breaking change +* **ci:** remove mergify legacy key +* **ci:** disable output debugging as pr body isnt accepted +* **ci:** add queue name in mergify +* **ci:** fix mergify dependabot queue +* **ci:** auto-merge cdk lib and lambda layer construct +* **ci:** run codeql analysis on push only +* **ci:** move all scripts under .github/scripts +* **ci:** move error prone env to code as constants +* **ci:** make export PR reusable +* **ci:** convert inline gh-script to file +* **ci:** fix reference error in related_issue +* **ci:** update changelog with latest changes * **ci:** limits concurrency for docs workflow +* **ci:** update changelog with latest changes * **ci:** fix reference error in related_issue -* **ci:** move error prone env to code as constants -* **ci:** move all scripts under .github/scripts -* **deps:** bump cdk-lambda-powertools-python-layer ([#1284](https://github.com/awslabs/aws-lambda-powertools-python/issues/1284)) -* **deps:** bump jsii from 1.61.0 to 1.62.0 ([#1294](https://github.com/awslabs/aws-lambda-powertools-python/issues/1294)) -* **deps:** bump constructs from 10.1.1 to 10.1.46 ([#1306](https://github.com/awslabs/aws-lambda-powertools-python/issues/1306)) -* **deps:** bump actions/setup-node from 2 to 3 ([#1281](https://github.com/awslabs/aws-lambda-powertools-python/issues/1281)) -* **deps:** bump fastjsonschema from 2.15.3 to 2.16.1 ([#1309](https://github.com/awslabs/aws-lambda-powertools-python/issues/1309)) -* **deps:** bump constructs from 10.1.1 to 10.1.49 ([#1308](https://github.com/awslabs/aws-lambda-powertools-python/issues/1308)) -* **deps:** bump attrs from 21.2.0 to 21.4.0 ([#1282](https://github.com/awslabs/aws-lambda-powertools-python/issues/1282)) -* **deps:** bump aws-cdk-lib from 2.29.0 to 2.31.1 ([#1290](https://github.com/awslabs/aws-lambda-powertools-python/issues/1290)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.12 to 1.24.27 ([#1293](https://github.com/awslabs/aws-lambda-powertools-python/issues/1293)) -* **deps-dev:** bump mypy-boto3-appconfig from 1.24.0 to 1.24.29 ([#1295](https://github.com/awslabs/aws-lambda-powertools-python/issues/1295)) -* **governance:** remove any step relying on master branch -* **governance:** update emeritus affiliation -* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) -* **layers:** bump to 22 for 1.26.3 - - - -## [v1.26.3] - 2022-07-04 -## Bug Fixes - -* **ci:** remove utf-8 body in octokit body req -* **ci:** improve msg visibility on closed issues -* **ci:** disable merged_pr workflow -* **ci:** merged_pr add issues write access -* **ci:** quote prBody GH expr on_opened_pr -* **ci:** reusable workflow secrets param -* **logger:** support additional args for handlers when injecting lambda context ([#1276](https://github.com/awslabs/aws-lambda-powertools-python/issues/1276)) -* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) - -## Documentation - -* **lint:** add markdownlint rules and automation ([#1256](https://github.com/awslabs/aws-lambda-powertools-python/issues/1256)) -* **logger:** document enriching logs with logrecord attributes ([#1271](https://github.com/awslabs/aws-lambda-powertools-python/issues/1271)) -* **logger:** snippets split, improved, and lint ([#1262](https://github.com/awslabs/aws-lambda-powertools-python/issues/1262)) -* **metrics:** snippets split, improved, and lint ([#1272](https://github.com/awslabs/aws-lambda-powertools-python/issues/1272)) -* **tracer:** snippets split, improved, and lint ([#1261](https://github.com/awslabs/aws-lambda-powertools-python/issues/1261)) -* **tracer:** split and lint code snippets ([#1260](https://github.com/awslabs/aws-lambda-powertools-python/issues/1260)) - -## Maintenance - -* move to approach B for multiple IaC -* add sam build gitignore -* bump to version 1.26.3 +* **ci:** remove area/utilities conflicting label +* **ci:** limits concurrency for docs workflow +* **ci:** remove conventional changelog commit to reduce noise +* **ci:** update project with version 1.26.6 * **ci:** reactivate on_merged_pr workflow +* **ci:** temp disable e2e matrix +* **ci:** include py version in stack and cache lock +* **ci:** revert e2e py version matrix +* **ci:** disable e2e py version matrix due to concurrent locking * **ci:** improve wording on closed issues action * **ci:** deactivate on_merged_pr workflow -* **deps:** bump aws-xray-sdk from 2.9.0 to 2.10.0 ([#1270](https://github.com/awslabs/aws-lambda-powertools-python/issues/1270)) +* **ci:** prevent concurrent git update in critical workflows ([#1478](https://github.com/awslabs/aws-lambda-powertools-python/issues/1478)) +* **ci:** limit E2E workflow run for source code change +* **ci:** remove unused and undeclared OS matrix env +* **ci:** fix invalid dependency leftover +* **ci:** remove dangling debug step +* **ci:** add linter for GitHub Actions as pre-commit hook ([#1479](https://github.com/awslabs/aws-lambda-powertools-python/issues/1479)) +* **ci:** add workflow to suggest splitting large PRs ([#1480](https://github.com/awslabs/aws-lambda-powertools-python/issues/1480)) +* **ci:** enable ci checks for v2 +* **ci:** record pr details upon labeling +* **ci:** destructure assignment on comment_large_pr +* **ci:** add note for state persistence on comment_large_pr +* **ci:** format comment on comment_large_pr script +* **ci:** create reusable docs publishing workflow ([#1482](https://github.com/awslabs/aws-lambda-powertools-python/issues/1482)) +* **ci:** create docs workflow for v2 +* **ci:** create adhoc docs workflow for v2 +* **ci:** disable mergify configuration after breaking changes ([#1188](https://github.com/awslabs/aws-lambda-powertools-python/issues/1188)) +* **ci:** create adhoc docs workflow for v2 +* **ci:** changelog pre-generation to fetch tags from origin +* **ci:** sync package version with pypi +* **ci:** increase skip_pypi logic to cover tests/changelog on re-run failures +* **ci:** add missing description fields +* **ci:** post release on tagged issues too +* **ci:** experiment hardening origin +* **deps:** bump jsii from 1.61.0 to 1.62.0 ([#1294](https://github.com/awslabs/aws-lambda-powertools-python/issues/1294)) +* **deps:** bump boto3 from 1.18.21 to 1.18.22 ([#614](https://github.com/awslabs/aws-lambda-powertools-python/issues/614)) +* **deps:** bump boto3 from 1.18.22 to 1.18.24 ([#619](https://github.com/awslabs/aws-lambda-powertools-python/issues/619)) +* **deps:** bump pydantic from 1.10.0 to 1.10.1 ([#1491](https://github.com/awslabs/aws-lambda-powertools-python/issues/1491)) +* **deps:** bump jsii from 1.57.0 to 1.63.2 ([#1400](https://github.com/awslabs/aws-lambda-powertools-python/issues/1400)) +* **deps:** bump boto3 from 1.18.24 to 1.18.25 ([#623](https://github.com/awslabs/aws-lambda-powertools-python/issues/623)) +* **deps:** bump boto3 from 1.18.25 to 1.18.26 ([#627](https://github.com/awslabs/aws-lambda-powertools-python/issues/627)) +* **deps:** bump constructs from 10.1.1 to 10.1.63 ([#1402](https://github.com/awslabs/aws-lambda-powertools-python/issues/1402)) +* **deps:** bump attrs from 21.4.0 to 22.1.0 ([#1397](https://github.com/awslabs/aws-lambda-powertools-python/issues/1397)) +* **deps:** bump jsii from 1.57.0 to 1.63.1 ([#1390](https://github.com/awslabs/aws-lambda-powertools-python/issues/1390)) +* **deps:** bump boto3 from 1.18.15 to 1.18.17 ([#597](https://github.com/awslabs/aws-lambda-powertools-python/issues/597)) +* **deps:** bump constructs from 10.1.1 to 10.1.59 ([#1396](https://github.com/awslabs/aws-lambda-powertools-python/issues/1396)) +* **deps:** bump pydantic from 1.9.0 to 1.9.1 ([#1221](https://github.com/awslabs/aws-lambda-powertools-python/issues/1221)) +* **deps:** bump email-validator from 1.1.3 to 1.2.1 ([#1199](https://github.com/awslabs/aws-lambda-powertools-python/issues/1199)) +* **deps:** bump boto3 from 1.18.1 to 1.18.15 ([#591](https://github.com/awslabs/aws-lambda-powertools-python/issues/591)) +* **deps:** bump boto3 from 1.18.26 to 1.18.32 ([#663](https://github.com/awslabs/aws-lambda-powertools-python/issues/663)) +* **deps:** bump codecov/codecov-action from 2.0.1 to 2.0.2 ([#558](https://github.com/awslabs/aws-lambda-powertools-python/issues/558)) +* **deps:** bump constructs from 10.1.1 to 10.1.64 ([#1405](https://github.com/awslabs/aws-lambda-powertools-python/issues/1405)) +* **deps:** bump boto3 from 1.18.32 to 1.18.38 ([#671](https://github.com/awslabs/aws-lambda-powertools-python/issues/671)) +* **deps:** bump boto3 from 1.18.17 to 1.18.21 ([#608](https://github.com/awslabs/aws-lambda-powertools-python/issues/608)) +* **deps:** bump github/codeql-action from 1 to 2 ([#1154](https://github.com/awslabs/aws-lambda-powertools-python/issues/1154)) +* **deps:** bump boto3 from 1.18.38 to 1.18.41 ([#677](https://github.com/awslabs/aws-lambda-powertools-python/issues/677)) +* **deps:** bump actions/setup-python from 3 to 4 ([#1244](https://github.com/awslabs/aws-lambda-powertools-python/issues/1244)) +* **deps:** bump codecov/codecov-action from 2.0.2 to 2.1.0 ([#675](https://github.com/awslabs/aws-lambda-powertools-python/issues/675)) +* **deps:** bump codecov/codecov-action from 3.0.0 to 3.1.0 ([#1143](https://github.com/awslabs/aws-lambda-powertools-python/issues/1143)) +* **deps:** bump boto3 from 1.18.41 to 1.18.49 ([#703](https://github.com/awslabs/aws-lambda-powertools-python/issues/703)) +* **deps:** bump boto3 from 1.18.49 to 1.18.51 ([#713](https://github.com/awslabs/aws-lambda-powertools-python/issues/713)) +* **deps:** bump actions/checkout from 2 to 3 ([#1052](https://github.com/awslabs/aws-lambda-powertools-python/issues/1052)) +* **deps:** bump boto3 from 1.18.51 to 1.18.54 ([#733](https://github.com/awslabs/aws-lambda-powertools-python/issues/733)) +* **deps:** bump constructs from 10.1.1 to 10.1.52 ([#1343](https://github.com/awslabs/aws-lambda-powertools-python/issues/1343)) +* **deps:** bump boto3 from 1.18.54 to 1.18.56 ([#742](https://github.com/awslabs/aws-lambda-powertools-python/issues/742)) +* **deps:** bump codecov/codecov-action from 2.1.0 to 3.0.0 ([#1102](https://github.com/awslabs/aws-lambda-powertools-python/issues/1102)) +* **deps:** bump actions/upload-artifact from 2 to 3 ([#1103](https://github.com/awslabs/aws-lambda-powertools-python/issues/1103)) +* **deps:** bump release-drafter/release-drafter from 5.20.0 to 5.20.1 ([#1458](https://github.com/awslabs/aws-lambda-powertools-python/issues/1458)) +* **deps:** bump constructs from 10.1.1 to 10.1.65 ([#1407](https://github.com/awslabs/aws-lambda-powertools-python/issues/1407)) +* **deps:** bump boto3 from 1.17.84 to 1.17.85 ([#455](https://github.com/awslabs/aws-lambda-powertools-python/issues/455)) +* **deps:** bump boto3 from 1.17.85 to 1.17.86 ([#458](https://github.com/awslabs/aws-lambda-powertools-python/issues/458)) +* **deps:** bump boto3 from 1.17.86 to 1.17.87 ([#459](https://github.com/awslabs/aws-lambda-powertools-python/issues/459)) +* **deps:** bump boto3 from 1.18.56 to 1.18.58 ([#755](https://github.com/awslabs/aws-lambda-powertools-python/issues/755)) +* **deps:** bump boto3 from 1.18.58 to 1.18.59 ([#760](https://github.com/awslabs/aws-lambda-powertools-python/issues/760)) +* **deps:** bump boto3 from 1.17.88 to 1.17.89 ([#466](https://github.com/awslabs/aws-lambda-powertools-python/issues/466)) +* **deps:** bump pydantic from 1.9.1 to 1.9.2 ([#1448](https://github.com/awslabs/aws-lambda-powertools-python/issues/1448)) +* **deps:** bump constructs from 10.1.1 to 10.1.51 ([#1323](https://github.com/awslabs/aws-lambda-powertools-python/issues/1323)) +* **deps:** bump constructs from 10.1.1 to 10.1.60 ([#1399](https://github.com/awslabs/aws-lambda-powertools-python/issues/1399)) +* **deps:** bump constructs from 10.1.1 to 10.1.66 ([#1414](https://github.com/awslabs/aws-lambda-powertools-python/issues/1414)) +* **deps:** bump boto3 from 1.17.89 to 1.17.91 ([#473](https://github.com/awslabs/aws-lambda-powertools-python/issues/473)) +* **deps:** bump boto3 from 1.18.59 to 1.18.61 ([#766](https://github.com/awslabs/aws-lambda-powertools-python/issues/766)) +* **deps:** bump email-validator from 1.1.2 to 1.1.3 ([#478](https://github.com/awslabs/aws-lambda-powertools-python/issues/478)) +* **deps:** bump boto3 from 1.17.91 to 1.17.101 ([#490](https://github.com/awslabs/aws-lambda-powertools-python/issues/490)) +* **deps:** bump boto3 from 1.18.61 to 1.19.6 ([#783](https://github.com/awslabs/aws-lambda-powertools-python/issues/783)) +* **deps:** bump urllib3 from 1.26.4 to 1.26.5 ([#787](https://github.com/awslabs/aws-lambda-powertools-python/issues/787)) +* **deps:** bump boto3 from 1.19.6 to 1.20.3 ([#809](https://github.com/awslabs/aws-lambda-powertools-python/issues/809)) +* **deps:** bump boto3 from 1.20.3 to 1.20.5 ([#817](https://github.com/awslabs/aws-lambda-powertools-python/issues/817)) +* **deps:** bump constructs from 10.1.1 to 10.1.49 ([#1308](https://github.com/awslabs/aws-lambda-powertools-python/issues/1308)) +* **deps:** bump actions/setup-python from 2.3.1 to 3 ([#1048](https://github.com/awslabs/aws-lambda-powertools-python/issues/1048)) +* **deps:** bump fastjsonschema from 2.15.3 to 2.16.1 ([#1309](https://github.com/awslabs/aws-lambda-powertools-python/issues/1309)) +* **deps:** bump actions/github-script from 5 to 6 ([#1023](https://github.com/awslabs/aws-lambda-powertools-python/issues/1023)) +* **deps:** bump fastjsonschema from 2.15.2 to 2.15.3 ([#949](https://github.com/awslabs/aws-lambda-powertools-python/issues/949)) * **deps:** bump dependabot/fetch-metadata from 1.1.1 to 1.3.2 ([#1269](https://github.com/awslabs/aws-lambda-powertools-python/issues/1269)) +* **deps:** bump boto3 from 1.17.101 to 1.17.102 ([#493](https://github.com/awslabs/aws-lambda-powertools-python/issues/493)) +* **deps:** bump aws-xray-sdk from 2.9.0 to 2.10.0 ([#1270](https://github.com/awslabs/aws-lambda-powertools-python/issues/1270)) +* **deps:** bump actions/setup-python from 2.2.2 to 2.3.0 ([#831](https://github.com/awslabs/aws-lambda-powertools-python/issues/831)) +* **deps:** bump actions/setup-python from 2.3.0 to 2.3.1 ([#852](https://github.com/awslabs/aws-lambda-powertools-python/issues/852)) * **deps:** bump dependabot/fetch-metadata from 1.3.2 to 1.3.3 ([#1273](https://github.com/awslabs/aws-lambda-powertools-python/issues/1273)) +* **deps:** bump boto3 from 1.17.102 to 1.17.110 ([#523](https://github.com/awslabs/aws-lambda-powertools-python/issues/523)) +* **deps:** support arm64 when developing locally ([#862](https://github.com/awslabs/aws-lambda-powertools-python/issues/862)) +* **deps:** bump aws-xray-sdk from 2.8.0 to 2.9.0 ([#876](https://github.com/awslabs/aws-lambda-powertools-python/issues/876)) +* **deps:** bump boto3 from 1.17.110 to 1.18.0 ([#527](https://github.com/awslabs/aws-lambda-powertools-python/issues/527)) +* **deps:** bump boto3 from 1.18.0 to 1.18.1 ([#528](https://github.com/awslabs/aws-lambda-powertools-python/issues/528)) +* **deps:** bump codecov/codecov-action from 1 to 2.0.1 ([#539](https://github.com/awslabs/aws-lambda-powertools-python/issues/539)) +* **deps:** bump actions/setup-node from 2 to 3 ([#1281](https://github.com/awslabs/aws-lambda-powertools-python/issues/1281)) +* **deps:** bump constructs from 10.1.1 to 10.1.46 ([#1306](https://github.com/awslabs/aws-lambda-powertools-python/issues/1306)) +* **deps:** bump aws-cdk-lib from 2.29.0 to 2.31.1 ([#1290](https://github.com/awslabs/aws-lambda-powertools-python/issues/1290)) +* **deps:** bump cdk-lambda-powertools-python-layer ([#1284](https://github.com/awslabs/aws-lambda-powertools-python/issues/1284)) +* **deps:** bump pydantic from 1.8.2 to 1.9.0 ([#933](https://github.com/awslabs/aws-lambda-powertools-python/issues/933)) +* **deps:** bump fastjsonschema from 2.15.1 to 2.15.2 ([#891](https://github.com/awslabs/aws-lambda-powertools-python/issues/891)) +* **deps:** bump attrs from 21.2.0 to 21.4.0 ([#1282](https://github.com/awslabs/aws-lambda-powertools-python/issues/1282)) +* **deps:** bump boto3 from 1.17.87 to 1.17.88 ([#463](https://github.com/awslabs/aws-lambda-powertools-python/issues/463)) +* **deps-dev:** bump mypy from 0.910 to 0.920 ([#903](https://github.com/awslabs/aws-lambda-powertools-python/issues/903)) +* **deps-dev:** bump mypy-boto3-appconfig from 1.24.0 to 1.24.29 ([#1295](https://github.com/awslabs/aws-lambda-powertools-python/issues/1295)) +* **deps-dev:** bump mypy from 0.920 to 0.930 ([#925](https://github.com/awslabs/aws-lambda-powertools-python/issues/925)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.12 to 1.24.27 ([#1293](https://github.com/awslabs/aws-lambda-powertools-python/issues/1293)) +* **deps-dev:** bump mypy from 0.930 to 0.931 ([#941](https://github.com/awslabs/aws-lambda-powertools-python/issues/941)) +* **deps-dev:** bump mkdocs-material from 7.1.10 to 7.1.11 ([#542](https://github.com/awslabs/aws-lambda-powertools-python/issues/542)) +* **deps-dev:** bump black from 21.11b1 to 21.12b0 ([#872](https://github.com/awslabs/aws-lambda-powertools-python/issues/872)) +* **deps-dev:** bump mkdocs-material from 7.1.9 to 7.1.10 ([#522](https://github.com/awslabs/aws-lambda-powertools-python/issues/522)) +* **deps-dev:** bump flake8-bugbear from 21.11.29 to 22.1.11 ([#955](https://github.com/awslabs/aws-lambda-powertools-python/issues/955)) +* **deps-dev:** bump flake8 from 3.9.2 to 4.0.1 ([#789](https://github.com/awslabs/aws-lambda-powertools-python/issues/789)) * **deps-dev:** bump flake8-bugbear from 22.6.22 to 22.7.1 ([#1274](https://github.com/awslabs/aws-lambda-powertools-python/issues/1274)) +* **deps-dev:** bump black from 21.10b0 to 21.11b1 ([#839](https://github.com/awslabs/aws-lambda-powertools-python/issues/839)) +* **deps-dev:** bump isort from 5.9.1 to 5.9.2 ([#514](https://github.com/awslabs/aws-lambda-powertools-python/issues/514)) +* **deps-dev:** bump flake8-eradicate from 1.0.0 to 1.1.0 ([#492](https://github.com/awslabs/aws-lambda-powertools-python/issues/492)) +* **deps-dev:** bump isort from 5.9.3 to 5.10.1 ([#811](https://github.com/awslabs/aws-lambda-powertools-python/issues/811)) +* **deps-dev:** bump coverage from 6.0.2 to 6.1.2 ([#810](https://github.com/awslabs/aws-lambda-powertools-python/issues/810)) +* **deps-dev:** bump mkdocs-material from 8.1.9 to 8.2.4 ([#1054](https://github.com/awslabs/aws-lambda-powertools-python/issues/1054)) * **deps-dev:** bump flake8-bugbear from 22.4.25 to 22.6.22 ([#1258](https://github.com/awslabs/aws-lambda-powertools-python/issues/1258)) * **deps-dev:** bump mypy-boto3-dynamodb from 1.24.0 to 1.24.12 ([#1255](https://github.com/awslabs/aws-lambda-powertools-python/issues/1255)) +* **deps-dev:** bump mkdocs-material from 7.3.5 to 7.3.6 ([#791](https://github.com/awslabs/aws-lambda-powertools-python/issues/791)) +* **deps-dev:** bump mkdocs-material from 7.3.3 to 7.3.5 ([#781](https://github.com/awslabs/aws-lambda-powertools-python/issues/781)) +* **deps-dev:** bump flake8-isort from 4.0.0 to 4.1.1 ([#785](https://github.com/awslabs/aws-lambda-powertools-python/issues/785)) * **deps-dev:** bump mypy-boto3-secretsmanager ([#1252](https://github.com/awslabs/aws-lambda-powertools-python/issues/1252)) -* **governance:** fix on_merged_pr workflow syntax -* **governance:** warn message on closed issues -* **layers:** bump to 21 for 1.26.2 -* **test-perf:** use pytest-benchmark to improve reliability ([#1250](https://github.com/awslabs/aws-lambda-powertools-python/issues/1250)) - - - -## [v1.26.2] - 2022-06-16 -## Bug Fixes - -* **event-handler:** body to empty string in CORS preflight (ALB non-compliant) ([#1249](https://github.com/awslabs/aws-lambda-powertools-python/issues/1249)) - -## Code Refactoring - -* rename to clear_state -* rename to remove_custom_keys - -## Documentation - -* fix anchor - -## Features - -* **logger:** add option to clear state per invocation - -## Maintenance - -* bump to 1.26.2 -* **deps:** bump actions/setup-python from 3 to 4 ([#1244](https://github.com/awslabs/aws-lambda-powertools-python/issues/1244)) +* **deps-dev:** bump flake8-eradicate from 1.1.0 to 1.2.0 ([#784](https://github.com/awslabs/aws-lambda-powertools-python/issues/784)) +* **deps-dev:** bump isort from 5.8.0 to 5.9.1 ([#487](https://github.com/awslabs/aws-lambda-powertools-python/issues/487)) +* **deps-dev:** bump pytest-asyncio from 0.15.1 to 0.16.0 ([#782](https://github.com/awslabs/aws-lambda-powertools-python/issues/782)) +* **deps-dev:** bump coverage from 6.0.1 to 6.0.2 ([#764](https://github.com/awslabs/aws-lambda-powertools-python/issues/764)) +* **deps-dev:** bump mkdocs-material from 7.1.7 to 7.1.9 ([#491](https://github.com/awslabs/aws-lambda-powertools-python/issues/491)) +* **deps-dev:** bump flake8-black from 0.2.1 to 0.2.3 ([#541](https://github.com/awslabs/aws-lambda-powertools-python/issues/541)) +* **deps-dev:** bump mypy from 0.961 to 0.971 ([#1320](https://github.com/awslabs/aws-lambda-powertools-python/issues/1320)) +* **deps-dev:** bump types-requests from 2.28.7 to 2.28.8 ([#1423](https://github.com/awslabs/aws-lambda-powertools-python/issues/1423)) +* **deps-dev:** bump mkdocs-material from 7.3.2 to 7.3.3 ([#758](https://github.com/awslabs/aws-lambda-powertools-python/issues/758)) +* **deps-dev:** bump flake8-comprehensions from 3.6.1 to 3.7.0 ([#759](https://github.com/awslabs/aws-lambda-powertools-python/issues/759)) +* **deps-dev:** bump flake8-eradicate from 1.2.0 to 1.2.1 ([#1158](https://github.com/awslabs/aws-lambda-powertools-python/issues/1158)) +* **deps-dev:** bump coverage from 6.0 to 6.0.1 ([#751](https://github.com/awslabs/aws-lambda-powertools-python/issues/751)) +* **deps-dev:** bump mkdocs-material from 7.1.6 to 7.1.7 ([#464](https://github.com/awslabs/aws-lambda-powertools-python/issues/464)) +* **deps-dev:** bump mkdocs-material from 7.2.4 to 7.2.6 ([#665](https://github.com/awslabs/aws-lambda-powertools-python/issues/665)) +* **deps-dev:** bump mkdocs-material from 7.1.11 to 7.2.0 ([#551](https://github.com/awslabs/aws-lambda-powertools-python/issues/551)) +* **deps-dev:** bump mkdocs-material from 7.2.0 to 7.2.1 ([#566](https://github.com/awslabs/aws-lambda-powertools-python/issues/566)) +* **deps-dev:** bump pytest-cov from 2.12.0 to 2.12.1 ([#454](https://github.com/awslabs/aws-lambda-powertools-python/issues/454)) +* **deps-dev:** bump pdoc3 from 0.9.2 to 0.10.0 ([#584](https://github.com/awslabs/aws-lambda-powertools-python/issues/584)) +* **deps-dev:** bump pytest from 6.2.5 to 7.0.1 ([#1063](https://github.com/awslabs/aws-lambda-powertools-python/issues/1063)) +* **deps-dev:** bump mkdocs-material from 7.3.1 to 7.3.2 ([#741](https://github.com/awslabs/aws-lambda-powertools-python/issues/741)) +* **deps-dev:** bump types-requests from 2.28.6 to 2.28.7 ([#1406](https://github.com/awslabs/aws-lambda-powertools-python/issues/1406)) +* **deps-dev:** bump mypy-boto3-cloudwatch from 1.24.0 to 1.24.35 ([#1342](https://github.com/awslabs/aws-lambda-powertools-python/issues/1342)) +* **deps-dev:** bump mkdocs-material from 8.2.4 to 8.2.7 ([#1131](https://github.com/awslabs/aws-lambda-powertools-python/issues/1131)) +* **deps-dev:** bump isort from 5.9.2 to 5.9.3 ([#574](https://github.com/awslabs/aws-lambda-powertools-python/issues/574)) +* **deps-dev:** bump pytest-cov from 2.12.1 to 3.0.0 ([#730](https://github.com/awslabs/aws-lambda-powertools-python/issues/730)) +* **deps-dev:** bump coverage from 5.5 to 6.0 ([#732](https://github.com/awslabs/aws-lambda-powertools-python/issues/732)) +* **deps-dev:** bump flake8-bugbear from 22.8.22 to 22.8.23 ([#1473](https://github.com/awslabs/aws-lambda-powertools-python/issues/1473)) +* **deps-dev:** bump mkdocs-material from 7.3.0 to 7.3.1 ([#731](https://github.com/awslabs/aws-lambda-powertools-python/issues/731)) +* **deps-dev:** bump flake8-bugbear from 21.9.1 to 21.9.2 ([#712](https://github.com/awslabs/aws-lambda-powertools-python/issues/712)) +* **deps-dev:** bump mypy from 0.931 to 0.942 ([#1133](https://github.com/awslabs/aws-lambda-powertools-python/issues/1133)) +* **deps-dev:** bump xenon from 0.8.0 to 0.9.0 ([#1145](https://github.com/awslabs/aws-lambda-powertools-python/issues/1145)) +* **deps-dev:** bump mkdocs-git-revision-date-plugin ([#1146](https://github.com/awslabs/aws-lambda-powertools-python/issues/1146)) +* **deps-dev:** bump black from 22.6.0 to 22.8.0 ([#1494](https://github.com/awslabs/aws-lambda-powertools-python/issues/1494)) +* **deps-dev:** bump mkdocs-material from 7.2.8 to 7.3.0 ([#695](https://github.com/awslabs/aws-lambda-powertools-python/issues/695)) +* **deps-dev:** bump mkdocs-material from 7.2.6 to 7.2.8 ([#682](https://github.com/awslabs/aws-lambda-powertools-python/issues/682)) +* **deps-dev:** bump flake8-bugbear from 21.4.3 to 21.9.1 ([#676](https://github.com/awslabs/aws-lambda-powertools-python/issues/676)) +* **deps-dev:** bump mypy-boto3-appconfig from 1.23.0.post1 to 1.24.0 ([#1233](https://github.com/awslabs/aws-lambda-powertools-python/issues/1233)) +* **deps-dev:** bump radon from 4.5.2 to 5.1.0 ([#673](https://github.com/awslabs/aws-lambda-powertools-python/issues/673)) +* **deps-dev:** bump mypy from 0.942 to 0.950 ([#1162](https://github.com/awslabs/aws-lambda-powertools-python/issues/1162)) +* **deps-dev:** bump xenon from 0.7.3 to 0.8.0 ([#669](https://github.com/awslabs/aws-lambda-powertools-python/issues/669)) +* **deps-dev:** bump flake8-bugbear from 22.1.11 to 22.4.25 ([#1156](https://github.com/awslabs/aws-lambda-powertools-python/issues/1156)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#1481](https://github.com/awslabs/aws-lambda-powertools-python/issues/1481)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.23.0.post1 to 1.24.0 ([#1234](https://github.com/awslabs/aws-lambda-powertools-python/issues/1234)) +* **deps-dev:** bump pytest from 6.2.4 to 6.2.5 ([#662](https://github.com/awslabs/aws-lambda-powertools-python/issues/662)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#306](https://github.com/awslabs/aws-lambda-powertools-python/issues/306)) +* **deps-dev:** bump mkdocs-material from 7.2.2 to 7.2.3 ([#596](https://github.com/awslabs/aws-lambda-powertools-python/issues/596)) +* **deps-dev:** bump flake8-isort from 4.1.1 to 4.1.2.post0 ([#1384](https://github.com/awslabs/aws-lambda-powertools-python/issues/1384)) +* **deps-dev:** bump mypy-boto3-ssm from 1.21.34 to 1.23.0.post1 ([#1220](https://github.com/awslabs/aws-lambda-powertools-python/issues/1220)) +* **deps-dev:** bump mypy-boto3-appconfig from 1.21.34 to 1.23.0.post1 ([#1219](https://github.com/awslabs/aws-lambda-powertools-python/issues/1219)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.21.34 to 1.23.0.post1 ([#1218](https://github.com/awslabs/aws-lambda-powertools-python/issues/1218)) +* **deps-dev:** bump mkdocs-material from 8.4.1 to 8.4.2 ([#1483](https://github.com/awslabs/aws-lambda-powertools-python/issues/1483)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.0.post1 to 1.23.8 ([#1225](https://github.com/awslabs/aws-lambda-powertools-python/issues/1225)) +* **deps-dev:** bump mypy from 0.950 to 0.960 ([#1224](https://github.com/awslabs/aws-lambda-powertools-python/issues/1224)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.8 to 1.24.0 ([#1232](https://github.com/awslabs/aws-lambda-powertools-python/issues/1232)) +* **deps-dev:** bump flake8-variables-names from 0.0.4 to 0.0.5 ([#1490](https://github.com/awslabs/aws-lambda-powertools-python/issues/1490)) +* **deps-dev:** bump aws-cdk-lib from 2.39.1 to 2.40.0 ([#1495](https://github.com/awslabs/aws-lambda-powertools-python/issues/1495)) +* **deps-dev:** bump flake8-comprehensions from 3.6.0 to 3.6.1 ([#615](https://github.com/awslabs/aws-lambda-powertools-python/issues/615)) * **deps-dev:** bump mypy from 0.960 to 0.961 ([#1241](https://github.com/awslabs/aws-lambda-powertools-python/issues/1241)) +* **deps-dev:** bump types-requests from 2.28.5 to 2.28.6 ([#1401](https://github.com/awslabs/aws-lambda-powertools-python/issues/1401)) +* **deps-dev:** bump mkdocs-material from 7.2.3 to 7.2.4 ([#607](https://github.com/awslabs/aws-lambda-powertools-python/issues/607)) * **deps-dev:** bump mypy-boto3-ssm from 1.23.0.post1 to 1.24.0 ([#1231](https://github.com/awslabs/aws-lambda-powertools-python/issues/1231)) -* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.8 to 1.24.0 ([#1232](https://github.com/awslabs/aws-lambda-powertools-python/issues/1232)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.23.0.post1 to 1.24.0 ([#1234](https://github.com/awslabs/aws-lambda-powertools-python/issues/1234)) -* **deps-dev:** bump mypy-boto3-appconfig from 1.23.0.post1 to 1.24.0 ([#1233](https://github.com/awslabs/aws-lambda-powertools-python/issues/1233)) -* **governance:** auto-merge on all PR events +* **deps-dev:** bump flake8-comprehensions from 3.5.0 to 3.6.0 ([#609](https://github.com/awslabs/aws-lambda-powertools-python/issues/609)) +* **deps-dev:** bump mkdocs-material from 7.2.1 to 7.2.2 ([#582](https://github.com/awslabs/aws-lambda-powertools-python/issues/582)) +* **docs:** update description to trigger changelog generation +* **docs:** correct markdown based on markdown lint ([#603](https://github.com/awslabs/aws-lambda-powertools-python/issues/603)) +* **docs:** remove pause sentence from roadmap ([#1409](https://github.com/awslabs/aws-lambda-powertools-python/issues/1409)) +* **docs:** update CHANGELOG for v1.26.7 +* **docs:** update site name to test ci changelog +* **event-handler:** adjusts exception docstrings to not confuse AppSync customers +* **governance:** remove devcontainer in favour of gitpod.io ([#1411](https://github.com/awslabs/aws-lambda-powertools-python/issues/1411)) * **governance:** add release label on pr merge +* **governance:** auto-merge on all PR events * **governance:** enforce safe scope on pr merge labelling * **governance:** limit build workflow to code changes only -* **governance:** auto-merge workflow_dispatch off -* **governance:** auto-merge to use squash -* **governance:** check for related issue in new PRs -* **governance:** auto-merge mypy-stub dependabot -* **governance:** address gh reusable workflow limitation -* **governance:** fix workflow action requirements & syntax -* **governance:** warn message on closed issues -* **metrics:** revert dimensions test before splitting ([#1243](https://github.com/awslabs/aws-lambda-powertools-python/issues/1243)) - - - -## [v1.26.1] - 2022-06-07 -## Bug Fixes - -* **metrics:** raise SchemaValidationError for >8 metric dimensions ([#1240](https://github.com/awslabs/aws-lambda-powertools-python/issues/1240)) - -## Documentation - -* **governance:** link roadmap and maintainers doc -* **maintainers:** initial maintainers playbook ([#1222](https://github.com/awslabs/aws-lambda-powertools-python/issues/1222)) -* **roadmap:** use pinned pause issue instead - -## Maintenance - -* bump version 1.26.1 -* **deps-dev:** bump mypy from 0.950 to 0.960 ([#1224](https://github.com/awslabs/aws-lambda-powertools-python/issues/1224)) -* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.0.post1 to 1.23.8 ([#1225](https://github.com/awslabs/aws-lambda-powertools-python/issues/1225)) - - - -## [v1.26.0] - 2022-05-20 -## Bug Fixes - -* **batch:** missing space in BatchProcessingError message ([#1201](https://github.com/awslabs/aws-lambda-powertools-python/issues/1201)) -* **batch:** docstring fix for success_handler() record parameter ([#1202](https://github.com/awslabs/aws-lambda-powertools-python/issues/1202)) -* **docs:** remove Slack link ([#1210](https://github.com/awslabs/aws-lambda-powertools-python/issues/1210)) - -## Documentation - -* **layer:** upgrade to 1.25.10 -* **roadmap:** add new roadmap section ([#1204](https://github.com/awslabs/aws-lambda-powertools-python/issues/1204)) - -## Features - -* **parameters:** accept boto3_client to support private endpoints and ease testing ([#1096](https://github.com/awslabs/aws-lambda-powertools-python/issues/1096)) - -## Maintenance - -* bump to 1.26.0 -* **deps:** bump pydantic from 1.9.0 to 1.9.1 ([#1221](https://github.com/awslabs/aws-lambda-powertools-python/issues/1221)) -* **deps:** bump email-validator from 1.1.3 to 1.2.1 ([#1199](https://github.com/awslabs/aws-lambda-powertools-python/issues/1199)) -* **deps-dev:** bump mypy-boto3-secretsmanager from 1.21.34 to 1.23.0.post1 ([#1218](https://github.com/awslabs/aws-lambda-powertools-python/issues/1218)) -* **deps-dev:** bump mypy-boto3-appconfig from 1.21.34 to 1.23.0.post1 ([#1219](https://github.com/awslabs/aws-lambda-powertools-python/issues/1219)) -* **deps-dev:** bump mypy-boto3-ssm from 1.21.34 to 1.23.0.post1 ([#1220](https://github.com/awslabs/aws-lambda-powertools-python/issues/1220)) - - - -## [v1.25.10] - 2022-04-29 -## Bug Fixes - -* **data-classes:** Add missing SES fields and ([#1045](https://github.com/awslabs/aws-lambda-powertools-python/issues/1045)) -* **deps:** Ignore boto3 changes until needed ([#1151](https://github.com/awslabs/aws-lambda-powertools-python/issues/1151)) -* **deps-dev:** remove jmespath due to dev deps conflict ([#1148](https://github.com/awslabs/aws-lambda-powertools-python/issues/1148)) -* **event_handler:** exception_handler to handle ServiceError exceptions ([#1160](https://github.com/awslabs/aws-lambda-powertools-python/issues/1160)) -* **event_handler:** Allow for event_source support ([#1159](https://github.com/awslabs/aws-lambda-powertools-python/issues/1159)) -* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) - -## Documentation - -* **layer:** upgrade to 1.25.9 - -## Features - -* **parameters:** add clear_cache method for providers ([#1194](https://github.com/awslabs/aws-lambda-powertools-python/issues/1194)) - -## Maintenance - -* include regression in changelog -* bump to 1.25.10 -* **ci:** changelog pre-generation to fetch tags from origin -* **ci:** disable mergify configuration after breaking changes ([#1188](https://github.com/awslabs/aws-lambda-powertools-python/issues/1188)) -* **ci:** post release on tagged issues too -* **deps:** bump codecov/codecov-action from 3.0.0 to 3.1.0 ([#1143](https://github.com/awslabs/aws-lambda-powertools-python/issues/1143)) -* **deps:** bump github/codeql-action from 1 to 2 ([#1154](https://github.com/awslabs/aws-lambda-powertools-python/issues/1154)) -* **deps-dev:** bump flake8-eradicate from 1.2.0 to 1.2.1 ([#1158](https://github.com/awslabs/aws-lambda-powertools-python/issues/1158)) -* **deps-dev:** bump mypy from 0.942 to 0.950 ([#1162](https://github.com/awslabs/aws-lambda-powertools-python/issues/1162)) -* **deps-dev:** bump mkdocs-git-revision-date-plugin ([#1146](https://github.com/awslabs/aws-lambda-powertools-python/issues/1146)) -* **deps-dev:** bump flake8-bugbear from 22.1.11 to 22.4.25 ([#1156](https://github.com/awslabs/aws-lambda-powertools-python/issues/1156)) -* **deps-dev:** bump xenon from 0.8.0 to 0.9.0 ([#1145](https://github.com/awslabs/aws-lambda-powertools-python/issues/1145)) -* **deps-dev:** bump mypy from 0.931 to 0.942 ([#1133](https://github.com/awslabs/aws-lambda-powertools-python/issues/1133)) - -## Regression - -* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) ([#1190](https://github.com/awslabs/aws-lambda-powertools-python/issues/1190)) - - - -## [v1.25.9] - 2022-04-21 -## Bug Fixes - -* **deps:** correct py36 marker for jmespath - -## Maintenance - -* bump to 1.25.9 - - - -## [v1.25.8] - 2022-04-21 -## Bug Fixes - -* removed ambiguous quotes from labels. -* **deps:** update jmespath marker to support 1.0 and py3.6 ([#1139](https://github.com/awslabs/aws-lambda-powertools-python/issues/1139)) -* **governance:** update label in names in issues - -## Documentation - -* **install:** instructions to reduce pydantic package size ([#1077](https://github.com/awslabs/aws-lambda-powertools-python/issues/1077)) -* **layer:** remove link from clipboard button ([#1135](https://github.com/awslabs/aws-lambda-powertools-python/issues/1135)) -* **layer:** update to 1.25.7 - -## Maintenance - -* bump to 1.25.8 -* **deps:** bump codecov/codecov-action from 2.1.0 to 3.0.0 ([#1102](https://github.com/awslabs/aws-lambda-powertools-python/issues/1102)) -* **deps:** bump actions/upload-artifact from 2 to 3 ([#1103](https://github.com/awslabs/aws-lambda-powertools-python/issues/1103)) -* **deps-dev:** bump mkdocs-material from 8.2.4 to 8.2.7 ([#1131](https://github.com/awslabs/aws-lambda-powertools-python/issues/1131)) -* **deps-dev:** bump pytest from 6.2.5 to 7.0.1 ([#1063](https://github.com/awslabs/aws-lambda-powertools-python/issues/1063)) - - - -## [v1.25.7] - 2022-04-08 -## Bug Fixes - -* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) -* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) -* **idempotency:** pass by value on idem key to guard inadvert mutations ([#1090](https://github.com/awslabs/aws-lambda-powertools-python/issues/1090)) -* **logger:** clear_state should keep custom key formats ([#1095](https://github.com/awslabs/aws-lambda-powertools-python/issues/1095)) -* **middleware_factory:** ret type annotation for handler dec ([#1066](https://github.com/awslabs/aws-lambda-powertools-python/issues/1066)) - -## Documentation - -* **layer:** update to 1.25.6; cosmetic changes - -## Maintenance - -* bump to 1.25.7 * **governance:** refresh pull request template sections * **governance:** update external non-triage effort disclaimer +* **governance:** update wording tech debt to summary in maintenance template +* **governance:** add new maintenance issue template for tech debt ([#1326](https://github.com/awslabs/aws-lambda-powertools-python/issues/1326)) +* **governance:** fix typo on semantic commit link introduced in [#1](https://github.com/awslabs/aws-lambda-powertools-python/issues/1)aef4 +* **governance:** add pre-configured dev environment with GitPod.io to ease contributions ([#1403](https://github.com/awslabs/aws-lambda-powertools-python/issues/1403)) +* **governance:** auto-merge workflow_dispatch off +* **governance:** update emeritus affiliation +* **governance:** remove any step relying on master branch * **governance:** update static typing to a form * **governance:** update rfc to a form * **governance:** update feat request to a form * **governance:** bug report form typo -* **governance:** update docs report to a form +* **governance:** fix workflow action requirements & syntax +* **governance:** auto-merge to use squash +* **governance:** warn message on closed issues * **governance:** update bug report to a form +* **governance:** auto-merge mypy-stub dependabot +* **governance:** fix on_merged_pr workflow syntax * **governance:** new ask a question * **governance:** new static typing report - - - -## [v1.25.6] - 2022-04-01 -## Bug Fixes - -* **logger:** clear_state regression on absent standard keys ([#1088](https://github.com/awslabs/aws-lambda-powertools-python/issues/1088)) - -## Documentation - -* **layer:** bump to 1.25.5 - -## Maintenance - -* bump to 1.25.6 - - - -## [v1.25.5] - 2022-03-18 -## Bug Fixes - -* **logger-utils:** regression on exclude set leading to no formatter ([#1080](https://github.com/awslabs/aws-lambda-powertools-python/issues/1080)) - -## Maintenance - -* bump to 1.25.5 - - - -## [v1.25.4] - 2022-03-17 -## Bug Fixes - -* package_logger as const over logger instance -* repurpose test to cover parent loggers case -* use addHandler over monkeypatch - -## Documentation - -* **appsync:** fix typo -* **contributing:** operational excellence pause -* **layer:** update to 1.25.3 - -## Maintenance - -* bump to 1.25.4 -* remove duplicate test -* comment reason for change -* remove unnecessary test -* lint unused import +* **governance:** warn message on closed issues +* **governance:** address gh reusable workflow limitation +* **governance:** check for related issue in new PRs +* **governance:** update docs report to a form +* **layers:** bump to 1.26.6 using layer v26 +* **layers:** upgrade cdk dep hashes to prevent ci fail +* **layers:** bump to 21 for 1.26.2 +* **layers:** bump to 10 for 1.25.0 +* **layers:** bump to 1.26.5 +* **layers:** bump to 22 for 1.26.3 +* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) +* **layers:** bump to 22 for 1.26.3 +* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) +* **layers:** replace layers account secret ([#1329](https://github.com/awslabs/aws-lambda-powertools-python/issues/1329)) +* **layers:** layer canary stack should not hardcode resource name +* **layers:** expand to all aws commercial regions ([#1324](https://github.com/awslabs/aws-lambda-powertools-python/issues/1324)) +* **license:** Add THIRD-PARTY-LICENSES ([#641](https://github.com/awslabs/aws-lambda-powertools-python/issues/641)) +* **license:** add third party license ([#635](https://github.com/awslabs/aws-lambda-powertools-python/issues/635)) +* **maintainer:** add Leandro as maintainer ([#1468](https://github.com/awslabs/aws-lambda-powertools-python/issues/1468)) +* **maintainers:** add Ruben as a maintainer ([#1392](https://github.com/awslabs/aws-lambda-powertools-python/issues/1392)) +* **maintainers:** update release workflow link +* **maintenance:** add discord link to first PR and first issue ([#1493](https://github.com/awslabs/aws-lambda-powertools-python/issues/1493)) +* **mergify:** disable check for matrix jobs +* **mergify:** use job name to match GH Actions +* **metrics:** revert dimensions test before splitting ([#1243](https://github.com/awslabs/aws-lambda-powertools-python/issues/1243)) +* **metrics:** fix tests when warnings are disabled ([#994](https://github.com/awslabs/aws-lambda-powertools-python/issues/994)) +* **shared:** fix cyclic import & refactor data extraction fn ([#613](https://github.com/awslabs/aws-lambda-powertools-python/issues/613)) +* **test-perf:** use pytest-benchmark to improve reliability ([#1250](https://github.com/awslabs/aws-lambda-powertools-python/issues/1250)) +* **tests:** build and deploy Lambda Layer stack once ([#1466](https://github.com/awslabs/aws-lambda-powertools-python/issues/1466)) +* **tests:** refactor E2E test mechanics to ease maintenance, writing tests and parallelization ([#1444](https://github.com/awslabs/aws-lambda-powertools-python/issues/1444)) +* **tests:** enable end-to-end test workflow ([#1470](https://github.com/awslabs/aws-lambda-powertools-python/issues/1470)) +* **tests:** refactor E2E logger to ease maintenance, writing tests and parallelization ([#1460](https://github.com/awslabs/aws-lambda-powertools-python/issues/1460)) +* **tests:** refactor E2E tracer to ease maintenance, writing tests and parallelization ([#1457](https://github.com/awslabs/aws-lambda-powertools-python/issues/1457)) ## Regression * service_name fixture - -## Pull Requests - -* Merge pull request [#1075](https://github.com/awslabs/aws-lambda-powertools-python/issues/1075) from mploski/fix/existing-loggers-duplicated-logs - - - -## [v1.25.3] - 2022-03-09 -## Bug Fixes - -* **logger:** ensure state is cleared for custom formatters ([#1072](https://github.com/awslabs/aws-lambda-powertools-python/issues/1072)) - -## Documentation - -* **plugin:** add mermaid to create diagram as code ([#1070](https://github.com/awslabs/aws-lambda-powertools-python/issues/1070)) - -## Maintenance - -* bump to 1.25.3 - - - -## [v1.25.2] - 2022-03-07 -## Bug Fixes - -* **event_handler:** docs snippets, high-level import CorsConfig ([#1019](https://github.com/awslabs/aws-lambda-powertools-python/issues/1019)) -* **lambda-authorizer:** allow proxy resources path in arn ([#1051](https://github.com/awslabs/aws-lambda-powertools-python/issues/1051)) -* **metrics:** flush upon a single metric 100th data point ([#1046](https://github.com/awslabs/aws-lambda-powertools-python/issues/1046)) - -## Documentation - -* **layer:** update to 1.25.1 -* **parser:** APIGatewayProxyEvent to APIGatewayProxyEventModel ([#1061](https://github.com/awslabs/aws-lambda-powertools-python/issues/1061)) - -## Maintenance - -* bump to 1.25.2 -* **deps:** bump actions/setup-python from 2.3.1 to 3 ([#1048](https://github.com/awslabs/aws-lambda-powertools-python/issues/1048)) -* **deps:** bump actions/checkout from 2 to 3 ([#1052](https://github.com/awslabs/aws-lambda-powertools-python/issues/1052)) -* **deps:** bump actions/github-script from 5 to 6 ([#1023](https://github.com/awslabs/aws-lambda-powertools-python/issues/1023)) -* **deps:** bump fastjsonschema from 2.15.2 to 2.15.3 ([#949](https://github.com/awslabs/aws-lambda-powertools-python/issues/949)) -* **deps-dev:** bump mkdocs-material from 8.1.9 to 8.2.4 ([#1054](https://github.com/awslabs/aws-lambda-powertools-python/issues/1054)) - - - -## [v1.25.1] - 2022-02-14 -## Bug Fixes - -* **batch:** bugfix to clear exceptions between executions ([#1022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1022)) - -## Maintenance - -* bump to 1.25.1 -* **layers:** bump to 10 for 1.25.0 - - - -## [v1.25.0] - 2022-02-09 -## Bug Fixes - -* **apigateway:** remove indentation in debug_mode ([#987](https://github.com/awslabs/aws-lambda-powertools-python/issues/987)) -* **batch:** delete >10 messages in legacy sqs processor ([#818](https://github.com/awslabs/aws-lambda-powertools-python/issues/818)) -* **ci:** pr label regex for special chars in title -* **logger:** exclude source_logger in copy_config_to_registered_loggers ([#1001](https://github.com/awslabs/aws-lambda-powertools-python/issues/1001)) -* **logger:** test generates logfile - -## Documentation - -* fix syntax errors and line highlights ([#1004](https://github.com/awslabs/aws-lambda-powertools-python/issues/1004)) -* add better BDD coments -* **event-handler:** improve testing section for graphql ([#996](https://github.com/awslabs/aws-lambda-powertools-python/issues/996)) -* **layer:** update to 1.24.2 -* **parameters:** add testing your code section ([#1017](https://github.com/awslabs/aws-lambda-powertools-python/issues/1017)) -* **theme:** upgrade mkdocs-material to 8.x ([#1002](https://github.com/awslabs/aws-lambda-powertools-python/issues/1002)) -* **tutorial:** fix broken internal links ([#1000](https://github.com/awslabs/aws-lambda-powertools-python/issues/1000)) - -## Features - -* **event-handler:** new resolvers to fix current_event typing ([#978](https://github.com/awslabs/aws-lambda-powertools-python/issues/978)) -* **logger:** log_event support event data classes (e.g. S3Event) ([#984](https://github.com/awslabs/aws-lambda-powertools-python/issues/984)) -* **mypy:** complete mypy support for the entire codebase ([#943](https://github.com/awslabs/aws-lambda-powertools-python/issues/943)) - -## Maintenance - -* bump to 1.25.0 -* correct docs -* correct docs -* use isinstance over type -* **deps-dev:** bump flake8-bugbear from 21.11.29 to 22.1.11 ([#955](https://github.com/awslabs/aws-lambda-powertools-python/issues/955)) -* **metrics:** fix tests when warnings are disabled ([#994](https://github.com/awslabs/aws-lambda-powertools-python/issues/994)) - -## Pull Requests - -* Merge pull request [#971](https://github.com/awslabs/aws-lambda-powertools-python/issues/971) from gyft/fix-logger-util-tests - - - -## [v1.24.2] - 2022-01-21 -## Bug Fixes - -* **data-classes:** underscore support in api gateway authorizer resource name ([#969](https://github.com/awslabs/aws-lambda-powertools-python/issues/969)) - -## Documentation - -* **layer:** update to 1.24.1 - -## Maintenance - -* bump to 1.24.2 - - - -## [v1.24.1] - 2022-01-20 -## Bug Fixes - -* remove unused json import -* remove apigw contract when using event-handler, apigw tracing -* use decorators, split cold start to ease reading -* incorrect log keys, indentation, snippet consistency -* remove f-strings that doesn't evaluate expr -* **batch:** report multiple failures ([#967](https://github.com/awslabs/aws-lambda-powertools-python/issues/967)) -* **data-classes:** docstring typos and clean up ([#937](https://github.com/awslabs/aws-lambda-powertools-python/issues/937)) -* **parameters:** appconfig internal _get docstrings ([#934](https://github.com/awslabs/aws-lambda-powertools-python/issues/934)) - -## Documentation - -* rename quickstart to tutorial in readme -* rename to tutorial given the size -* add final consideration section -* **batch:** snippet typo on batch processed messages iteration ([#951](https://github.com/awslabs/aws-lambda-powertools-python/issues/951)) -* **batch:** fix typo in context manager keyword ([#938](https://github.com/awslabs/aws-lambda-powertools-python/issues/938)) -* **homepage:** link to typescript version ([#950](https://github.com/awslabs/aws-lambda-powertools-python/issues/950)) -* **install:** new lambda layer for 1.24.0 release -* **metrics:** keep it consistent with other sections, update metric names -* **nav:** make REST and GraphQL event handlers more explicit ([#959](https://github.com/awslabs/aws-lambda-powertools-python/issues/959)) -* **quickstart:** expand on intro line -* **quickstart:** tidy requirements up -* **quickstart:** make section agnostic to json lib -* **quickstart:** same process for Logger -* **quickstart:** add sub-sections, fix highlight & code -* **quickstart:** sentence fragmentation, tidy up -* **tenets:** make core, non-core more explicit -* **tracer:** warning to note on local traces -* **tracer:** add initial image, requirements -* **tracer:** add annotation, metadata, and image -* **tracer:** update ServiceLens image w/ API GW, copywriting -* **tutorial:** fix path to images ([#963](https://github.com/awslabs/aws-lambda-powertools-python/issues/963)) - -## Features - -* **ci:** auto-notify & close issues on release -* **logger:** clone powertools logger config to any Python logger ([#927](https://github.com/awslabs/aws-lambda-powertools-python/issues/927)) - -## Maintenance - -* bump to 1.24.1 -* bump to 1.24.1 -* **ci:** run codeql analysis on push only -* **ci:** fix mergify dependabot queue -* **ci:** add queue name in mergify -* **ci:** remove mergify legacy key -* **ci:** update mergify bot breaking change -* **ci:** safely label PR based on title -* **deps:** bump pydantic from 1.8.2 to 1.9.0 ([#933](https://github.com/awslabs/aws-lambda-powertools-python/issues/933)) -* **deps-dev:** bump mypy from 0.930 to 0.931 ([#941](https://github.com/awslabs/aws-lambda-powertools-python/issues/941)) - -## Regression - * order to APP logger/service name due to screenshots - -## Pull Requests - -* Merge pull request [#769](https://github.com/awslabs/aws-lambda-powertools-python/issues/769) from mploski/docs/quick-start - - - -## [v1.24.0] - 2021-12-31 -## Bug Fixes - -* **apigateway:** support [@app](https://github.com/app).not_found() syntax & housekeeping ([#926](https://github.com/awslabs/aws-lambda-powertools-python/issues/926)) -* **event-sources:** handle dynamodb null type as none, not bool ([#929](https://github.com/awslabs/aws-lambda-powertools-python/issues/929)) -* **warning:** future distutils deprecation ([#921](https://github.com/awslabs/aws-lambda-powertools-python/issues/921)) - -## Documentation - -* consistency around admonitions and snippets ([#919](https://github.com/awslabs/aws-lambda-powertools-python/issues/919)) -* Added GraphQL Sample API to Examples section of README.md ([#930](https://github.com/awslabs/aws-lambda-powertools-python/issues/930)) -* **batch:** remove leftover from legacy -* **layer:** bump Lambda Layer to version 6 -* **tracer:** new ignore_endpoint feature ([#931](https://github.com/awslabs/aws-lambda-powertools-python/issues/931)) - -## Features - -* **event-sources:** cache parsed json in data class ([#909](https://github.com/awslabs/aws-lambda-powertools-python/issues/909)) -* **feature_flags:** support beyond boolean values (JSON values) ([#804](https://github.com/awslabs/aws-lambda-powertools-python/issues/804)) -* **idempotency:** support dataclasses & pydantic models payloads ([#908](https://github.com/awslabs/aws-lambda-powertools-python/issues/908)) -* **logger:** support use_datetime_directive for timestamps ([#920](https://github.com/awslabs/aws-lambda-powertools-python/issues/920)) -* **tracer:** ignore tracing for certain hostname(s) or url(s) ([#910](https://github.com/awslabs/aws-lambda-powertools-python/issues/910)) - -## Maintenance - -* bump to 1.24.0 -* **deps-dev:** bump mypy from 0.920 to 0.930 ([#925](https://github.com/awslabs/aws-lambda-powertools-python/issues/925)) - - - -## [v1.23.0] - 2021-12-20 -## Bug Fixes - -* **apigateway:** allow list of HTTP methods in route method ([#838](https://github.com/awslabs/aws-lambda-powertools-python/issues/838)) -* **event-sources:** Pass authorizer data to APIGatewayEventAuthorizer ([#897](https://github.com/awslabs/aws-lambda-powertools-python/issues/897)) -* **event-sources:** handle claimsOverrideDetails set to null ([#878](https://github.com/awslabs/aws-lambda-powertools-python/issues/878)) -* **idempotency:** include decorated fn name in hash ([#869](https://github.com/awslabs/aws-lambda-powertools-python/issues/869)) -* **metrics:** explicit type to single_metric ctx manager ([#865](https://github.com/awslabs/aws-lambda-powertools-python/issues/865)) -* **parameters:** appconfig transform and return types ([#877](https://github.com/awslabs/aws-lambda-powertools-python/issues/877)) -* **parser:** overload parse when using envelope ([#885](https://github.com/awslabs/aws-lambda-powertools-python/issues/885)) -* **parser:** kinesis sequence number is str, not int ([#907](https://github.com/awslabs/aws-lambda-powertools-python/issues/907)) -* **parser:** mypy support for payload type override as models ([#883](https://github.com/awslabs/aws-lambda-powertools-python/issues/883)) -* **tracer:** add warm start annotation (ColdStart=False) ([#851](https://github.com/awslabs/aws-lambda-powertools-python/issues/851)) - -## Documentation - -* external reference to cloudformation custom resource helper ([#914](https://github.com/awslabs/aws-lambda-powertools-python/issues/914)) -* add new public Slack invite -* disable search blur in non-prod env -* update Lambda Layers version -* **apigateway:** add new not_found feature ([#915](https://github.com/awslabs/aws-lambda-powertools-python/issues/915)) -* **apigateway:** fix sample layout provided ([#864](https://github.com/awslabs/aws-lambda-powertools-python/issues/864)) -* **appsync:** fix users.py typo to locations [#830](https://github.com/awslabs/aws-lambda-powertools-python/issues/830) -* **lambda_layer:** fix CDK layer syntax - -## Features - -* **apigateway:** add exception_handler support ([#898](https://github.com/awslabs/aws-lambda-powertools-python/issues/898)) -* **apigateway:** access parent api resolver from router ([#842](https://github.com/awslabs/aws-lambda-powertools-python/issues/842)) -* **batch:** new BatchProcessor for SQS, DynamoDB, Kinesis ([#886](https://github.com/awslabs/aws-lambda-powertools-python/issues/886)) -* **logger:** allow handler with custom kwargs signature ([#913](https://github.com/awslabs/aws-lambda-powertools-python/issues/913)) -* **tracer:** add service annotation when service is set ([#861](https://github.com/awslabs/aws-lambda-powertools-python/issues/861)) - -## Maintenance - -* correct pr label order -* minor housekeeping before release ([#912](https://github.com/awslabs/aws-lambda-powertools-python/issues/912)) -* bump to 1.23.0 -* **ci:** split latest docs workflow -* **deps:** bump fastjsonschema from 2.15.1 to 2.15.2 ([#891](https://github.com/awslabs/aws-lambda-powertools-python/issues/891)) -* **deps:** bump actions/setup-python from 2.2.2 to 2.3.0 ([#831](https://github.com/awslabs/aws-lambda-powertools-python/issues/831)) -* **deps:** bump aws-xray-sdk from 2.8.0 to 2.9.0 ([#876](https://github.com/awslabs/aws-lambda-powertools-python/issues/876)) -* **deps:** support arm64 when developing locally ([#862](https://github.com/awslabs/aws-lambda-powertools-python/issues/862)) -* **deps:** bump actions/setup-python from 2.3.0 to 2.3.1 ([#852](https://github.com/awslabs/aws-lambda-powertools-python/issues/852)) -* **deps-dev:** bump flake8 from 3.9.2 to 4.0.1 ([#789](https://github.com/awslabs/aws-lambda-powertools-python/issues/789)) -* **deps-dev:** bump black from 21.10b0 to 21.11b1 ([#839](https://github.com/awslabs/aws-lambda-powertools-python/issues/839)) -* **deps-dev:** bump black from 21.11b1 to 21.12b0 ([#872](https://github.com/awslabs/aws-lambda-powertools-python/issues/872)) -* **deps-dev:** bump mypy from 0.910 to 0.920 ([#903](https://github.com/awslabs/aws-lambda-powertools-python/issues/903)) - - - -## [v1.22.0] - 2021-11-17 -## Bug Fixes - -* change supported python version from 3.6.1 to 3.6.2, bump black ([#807](https://github.com/awslabs/aws-lambda-powertools-python/issues/807)) -* **ci:** comment custom publish version checker -* **ci:** skip sync master on docs hotfix -* **parser:** body/QS can be null or omitted in apigw v1/v2 ([#820](https://github.com/awslabs/aws-lambda-powertools-python/issues/820)) - -## Code Refactoring - -* **apigateway:** Add BaseRouter and duplicate route check ([#757](https://github.com/awslabs/aws-lambda-powertools-python/issues/757)) - -## Documentation - -* updated Lambda Layers definition & limitations. ([#775](https://github.com/awslabs/aws-lambda-powertools-python/issues/775)) -* Idiomatic tenet updated to Progressive -* use higher contrast font ([#822](https://github.com/awslabs/aws-lambda-powertools-python/issues/822)) -* use higher contrast font -* fix indentation of SAM snippets in install section ([#778](https://github.com/awslabs/aws-lambda-powertools-python/issues/778)) -* improve public lambda layer wording, clipboard buttons ([#762](https://github.com/awslabs/aws-lambda-powertools-python/issues/762)) -* add amplify-cli instructions for public layer ([#754](https://github.com/awslabs/aws-lambda-powertools-python/issues/754)) -* **api-gateway:** add support for new router feature ([#767](https://github.com/awslabs/aws-lambda-powertools-python/issues/767)) -* **apigateway:** re-add sample layout, add considerations ([#826](https://github.com/awslabs/aws-lambda-powertools-python/issues/826)) -* **appsync:** add new router feature ([#821](https://github.com/awslabs/aws-lambda-powertools-python/issues/821)) -* **idempotency:** add support for DynamoDB composite keys ([#808](https://github.com/awslabs/aws-lambda-powertools-python/issues/808)) -* **tenets:** update Idiomatic tenet to Progressive ([#823](https://github.com/awslabs/aws-lambda-powertools-python/issues/823)) - -## Features - -* **apigateway:** add Router to allow large routing composition ([#645](https://github.com/awslabs/aws-lambda-powertools-python/issues/645)) -* **appsync:** add Router to allow large resolver composition ([#776](https://github.com/awslabs/aws-lambda-powertools-python/issues/776)) -* **data-classes:** ActiveMQ and RabbitMQ support ([#770](https://github.com/awslabs/aws-lambda-powertools-python/issues/770)) -* **logger:** add ALB correlation ID support ([#816](https://github.com/awslabs/aws-lambda-powertools-python/issues/816)) - -## Maintenance - -* fix var expr -* remove Lambda Layer version tag -* bump to 1.22.0 -* conditional to publish docs only attempt 3 -* conditional to publish docs only attempt 2 -* conditional to publish docs only -* **deps:** bump boto3 from 1.18.58 to 1.18.59 ([#760](https://github.com/awslabs/aws-lambda-powertools-python/issues/760)) -* **deps:** bump boto3 from 1.18.56 to 1.18.58 ([#755](https://github.com/awslabs/aws-lambda-powertools-python/issues/755)) -* **deps:** bump urllib3 from 1.26.4 to 1.26.5 ([#787](https://github.com/awslabs/aws-lambda-powertools-python/issues/787)) -* **deps:** bump boto3 from 1.19.6 to 1.20.3 ([#809](https://github.com/awslabs/aws-lambda-powertools-python/issues/809)) -* **deps:** bump boto3 from 1.18.61 to 1.19.6 ([#783](https://github.com/awslabs/aws-lambda-powertools-python/issues/783)) -* **deps:** bump boto3 from 1.20.3 to 1.20.5 ([#817](https://github.com/awslabs/aws-lambda-powertools-python/issues/817)) -* **deps:** bump boto3 from 1.18.59 to 1.18.61 ([#766](https://github.com/awslabs/aws-lambda-powertools-python/issues/766)) -* **deps-dev:** bump coverage from 6.0.1 to 6.0.2 ([#764](https://github.com/awslabs/aws-lambda-powertools-python/issues/764)) -* **deps-dev:** bump pytest-asyncio from 0.15.1 to 0.16.0 ([#782](https://github.com/awslabs/aws-lambda-powertools-python/issues/782)) -* **deps-dev:** bump flake8-eradicate from 1.1.0 to 1.2.0 ([#784](https://github.com/awslabs/aws-lambda-powertools-python/issues/784)) -* **deps-dev:** bump flake8-isort from 4.0.0 to 4.1.1 ([#785](https://github.com/awslabs/aws-lambda-powertools-python/issues/785)) -* **deps-dev:** bump mkdocs-material from 7.3.2 to 7.3.3 ([#758](https://github.com/awslabs/aws-lambda-powertools-python/issues/758)) -* **deps-dev:** bump flake8-comprehensions from 3.6.1 to 3.7.0 ([#759](https://github.com/awslabs/aws-lambda-powertools-python/issues/759)) -* **deps-dev:** bump mkdocs-material from 7.3.3 to 7.3.5 ([#781](https://github.com/awslabs/aws-lambda-powertools-python/issues/781)) -* **deps-dev:** bump coverage from 6.0 to 6.0.1 ([#751](https://github.com/awslabs/aws-lambda-powertools-python/issues/751)) -* **deps-dev:** bump mkdocs-material from 7.3.5 to 7.3.6 ([#791](https://github.com/awslabs/aws-lambda-powertools-python/issues/791)) -* **deps-dev:** bump coverage from 6.0.2 to 6.1.2 ([#810](https://github.com/awslabs/aws-lambda-powertools-python/issues/810)) -* **deps-dev:** bump isort from 5.9.3 to 5.10.1 ([#811](https://github.com/awslabs/aws-lambda-powertools-python/issues/811)) - - - -## [v1.21.1] - 2021-10-07 -## Documentation - -* add new public layer ARNs ([#746](https://github.com/awslabs/aws-lambda-powertools-python/issues/746)) - -## Maintenance - -* include public layers changelog -* bump to 1.21.1 -* include regression in changelog -* ignore constants in test cov ([#745](https://github.com/awslabs/aws-lambda-powertools-python/issues/745)) -* ignore constants in tests cov -* add support for publishing fallback -* **deps:** bump boto3 from 1.18.54 to 1.18.56 ([#742](https://github.com/awslabs/aws-lambda-powertools-python/issues/742)) -* **deps-dev:** bump mkdocs-material from 7.3.1 to 7.3.2 ([#741](https://github.com/awslabs/aws-lambda-powertools-python/issues/741)) - -## Regression - * **metrics:** typing regression on log_metrics callable ([#744](https://github.com/awslabs/aws-lambda-powertools-python/issues/744)) - - - -## [v1.21.0] - 2021-10-05 -## Bug Fixes - -* **data-classes:** use correct asdict funciton ([#666](https://github.com/awslabs/aws-lambda-powertools-python/issues/666)) -* **feature-flags:** rules should evaluate with an AND op ([#724](https://github.com/awslabs/aws-lambda-powertools-python/issues/724)) -* **idempotency:** sorting keys before hashing ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) -* **idempotency:** sorting keys before hashing -* **logger:** push extra keys to the end ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) -* **mypy:** a few return types, type signatures, and untyped areas ([#718](https://github.com/awslabs/aws-lambda-powertools-python/issues/718)) - -## Code Refactoring - -* **data-classes:** clean up internal logic for APIGatewayAuthorizerResponse ([#643](https://github.com/awslabs/aws-lambda-powertools-python/issues/643)) - -## Documentation - -* Terraform reference for SAR Lambda Layer ([#716](https://github.com/awslabs/aws-lambda-powertools-python/issues/716)) -* add team behind it and email -* **event-handler:** document catch-all routes ([#705](https://github.com/awslabs/aws-lambda-powertools-python/issues/705)) -* **idempotency:** fix misleading idempotent examples ([#661](https://github.com/awslabs/aws-lambda-powertools-python/issues/661)) -* **jmespath:** clarify envelope terminology -* **parser:** fix incorrect import in root_validator example ([#735](https://github.com/awslabs/aws-lambda-powertools-python/issues/735)) - -## Features - -* expose jmespath powertools functions ([#736](https://github.com/awslabs/aws-lambda-powertools-python/issues/736)) -* add get_raw_configuration property in store; expose store -* boto3 sessions in batch, parameters & idempotency ([#717](https://github.com/awslabs/aws-lambda-powertools-python/issues/717)) -* **feature-flags:** Bring your own logger for debug ([#709](https://github.com/awslabs/aws-lambda-powertools-python/issues/709)) -* **feature-flags:** improve "IN/NOT_IN"; new rule actions ([#710](https://github.com/awslabs/aws-lambda-powertools-python/issues/710)) -* **feature-flags:** get_raw_configuration property in Store ([#720](https://github.com/awslabs/aws-lambda-powertools-python/issues/720)) -* **feature_flags:** Added inequality conditions ([#721](https://github.com/awslabs/aws-lambda-powertools-python/issues/721)) -* **idempotency:** makes customers unit testing easier ([#719](https://github.com/awslabs/aws-lambda-powertools-python/issues/719)) -* **validator:** include missing data elements from a validation error ([#686](https://github.com/awslabs/aws-lambda-powertools-python/issues/686)) - -## Maintenance - -* add python 3.9 support -* bump to 1.21.0 -* **deps:** bump boto3 from 1.18.41 to 1.18.49 ([#703](https://github.com/awslabs/aws-lambda-powertools-python/issues/703)) -* **deps:** bump boto3 from 1.18.32 to 1.18.38 ([#671](https://github.com/awslabs/aws-lambda-powertools-python/issues/671)) -* **deps:** bump boto3 from 1.18.38 to 1.18.41 ([#677](https://github.com/awslabs/aws-lambda-powertools-python/issues/677)) -* **deps:** bump boto3 from 1.18.51 to 1.18.54 ([#733](https://github.com/awslabs/aws-lambda-powertools-python/issues/733)) -* **deps:** bump boto3 from 1.18.49 to 1.18.51 ([#713](https://github.com/awslabs/aws-lambda-powertools-python/issues/713)) -* **deps:** bump codecov/codecov-action from 2.0.2 to 2.1.0 ([#675](https://github.com/awslabs/aws-lambda-powertools-python/issues/675)) -* **deps-dev:** bump flake8-bugbear from 21.9.1 to 21.9.2 ([#712](https://github.com/awslabs/aws-lambda-powertools-python/issues/712)) -* **deps-dev:** bump mkdocs-material from 7.3.0 to 7.3.1 ([#731](https://github.com/awslabs/aws-lambda-powertools-python/issues/731)) -* **deps-dev:** bump mkdocs-material from 7.2.8 to 7.3.0 ([#695](https://github.com/awslabs/aws-lambda-powertools-python/issues/695)) -* **deps-dev:** bump mkdocs-material from 7.2.6 to 7.2.8 ([#682](https://github.com/awslabs/aws-lambda-powertools-python/issues/682)) -* **deps-dev:** bump flake8-bugbear from 21.4.3 to 21.9.1 ([#676](https://github.com/awslabs/aws-lambda-powertools-python/issues/676)) -* **deps-dev:** bump coverage from 5.5 to 6.0 ([#732](https://github.com/awslabs/aws-lambda-powertools-python/issues/732)) -* **deps-dev:** bump radon from 4.5.2 to 5.1.0 ([#673](https://github.com/awslabs/aws-lambda-powertools-python/issues/673)) -* **deps-dev:** bump pytest-cov from 2.12.1 to 3.0.0 ([#730](https://github.com/awslabs/aws-lambda-powertools-python/issues/730)) -* **deps-dev:** bump xenon from 0.7.3 to 0.8.0 ([#669](https://github.com/awslabs/aws-lambda-powertools-python/issues/669)) - - - -## [v1.20.2] - 2021-09-02 -## Bug Fixes - -* Fix issue with strip_prefixes ([#647](https://github.com/awslabs/aws-lambda-powertools-python/issues/647)) - -## Maintenance - -* bump to 1.20.2 -* **deps:** bump boto3 from 1.18.26 to 1.18.32 ([#663](https://github.com/awslabs/aws-lambda-powertools-python/issues/663)) -* **deps-dev:** bump mkdocs-material from 7.2.4 to 7.2.6 ([#665](https://github.com/awslabs/aws-lambda-powertools-python/issues/665)) -* **deps-dev:** bump pytest from 6.2.4 to 6.2.5 ([#662](https://github.com/awslabs/aws-lambda-powertools-python/issues/662)) -* **license:** Add THIRD-PARTY-LICENSES ([#641](https://github.com/awslabs/aws-lambda-powertools-python/issues/641)) - - - -## [v1.20.1] - 2021-08-22 -## Bug Fixes - -* **idempotency:** sorting keys before hashing ([#639](https://github.com/awslabs/aws-lambda-powertools-python/issues/639)) - -## Maintenance - -* bump to 1.20.1 -* markdown linter fixes ([#636](https://github.com/awslabs/aws-lambda-powertools-python/issues/636)) -* setup codespaces ([#637](https://github.com/awslabs/aws-lambda-powertools-python/issues/637)) -* **license:** add third party license ([#635](https://github.com/awslabs/aws-lambda-powertools-python/issues/635)) - - - -## [v1.20.0] - 2021-08-21 -## Bug Fixes - -* **api-gateway:** HTTP API strip stage name from request path ([#622](https://github.com/awslabs/aws-lambda-powertools-python/issues/622)) -* **docs:** correct feature_flags link and json exmaples ([#605](https://github.com/awslabs/aws-lambda-powertools-python/issues/605)) - -## Code Refactoring - -* **event_handler:** match to match_results; 3.10 new keyword ([#616](https://github.com/awslabs/aws-lambda-powertools-python/issues/616)) - -## Documentation - -* **api-gateway:** add new API mapping support -* **data-class:** fix invalid syntax in new AppSync Authorizer -* **data-classes:** make authorizer concise; use enum ([#630](https://github.com/awslabs/aws-lambda-powertools-python/issues/630)) - -## Features - -* **data-classes:** authorizer for http api and rest api ([#620](https://github.com/awslabs/aws-lambda-powertools-python/issues/620)) -* **data-classes:** data_as_bytes prop KinesisStreamRecordPayload ([#628](https://github.com/awslabs/aws-lambda-powertools-python/issues/628)) -* **data-classes:** AppSync Lambda authorizer event ([#610](https://github.com/awslabs/aws-lambda-powertools-python/issues/610)) -* **event-handler:** prefixes to strip for custom mappings ([#579](https://github.com/awslabs/aws-lambda-powertools-python/issues/579)) -* **general:** support for Python 3.9 ([#626](https://github.com/awslabs/aws-lambda-powertools-python/issues/626)) -* **idempotency:** support for any synchronous function ([#625](https://github.com/awslabs/aws-lambda-powertools-python/issues/625)) - -## Maintenance - -* update changelog to reflect out-of-band commits -* bump to 1.20.0 -* update new changelog version tag -* **actions:** include new labels -* **api-docs:** enable allow_reuse to fix the docs ([#612](https://github.com/awslabs/aws-lambda-powertools-python/issues/612)) -* **deps:** bump boto3 from 1.18.25 to 1.18.26 ([#627](https://github.com/awslabs/aws-lambda-powertools-python/issues/627)) -* **deps:** bump boto3 from 1.18.24 to 1.18.25 ([#623](https://github.com/awslabs/aws-lambda-powertools-python/issues/623)) -* **deps:** bump boto3 from 1.18.22 to 1.18.24 ([#619](https://github.com/awslabs/aws-lambda-powertools-python/issues/619)) -* **deps:** bump boto3 from 1.18.21 to 1.18.22 ([#614](https://github.com/awslabs/aws-lambda-powertools-python/issues/614)) -* **deps:** bump boto3 from 1.18.17 to 1.18.21 ([#608](https://github.com/awslabs/aws-lambda-powertools-python/issues/608)) -* **deps-dev:** bump flake8-comprehensions from 3.6.0 to 3.6.1 ([#615](https://github.com/awslabs/aws-lambda-powertools-python/issues/615)) -* **deps-dev:** bump flake8-comprehensions from 3.5.0 to 3.6.0 ([#609](https://github.com/awslabs/aws-lambda-powertools-python/issues/609)) -* **deps-dev:** bump mkdocs-material from 7.2.3 to 7.2.4 ([#607](https://github.com/awslabs/aws-lambda-powertools-python/issues/607)) -* **docs:** correct markdown based on markdown lint ([#603](https://github.com/awslabs/aws-lambda-powertools-python/issues/603)) -* **shared:** fix cyclic import & refactor data extraction fn ([#613](https://github.com/awslabs/aws-lambda-powertools-python/issues/613)) - - - -## [v1.19.0] - 2021-08-11 -## Bug Fixes - -* **deps:** bump poetry to latest ([#592](https://github.com/awslabs/aws-lambda-powertools-python/issues/592)) -* **feature-flags:** bug handling multiple conditions ([#599](https://github.com/awslabs/aws-lambda-powertools-python/issues/599)) -* **feature-toggles:** correct cdk example ([#601](https://github.com/awslabs/aws-lambda-powertools-python/issues/601)) -* **parser:** apigw wss validation check_message_id; housekeeping ([#553](https://github.com/awslabs/aws-lambda-powertools-python/issues/553)) - -## Code Refactoring - -* **feature-flags:** add debug for all features evaluation" ([#590](https://github.com/awslabs/aws-lambda-powertools-python/issues/590)) -* **feature_flags:** optimize UX and maintenance ([#563](https://github.com/awslabs/aws-lambda-powertools-python/issues/563)) - -## Documentation - -* **event-handler:** new custom serializer option -* **feature-flags:** add guidance when to use vs env vars vs parameters -* **feature-flags:** fix sample feature name in evaluate -* **feature-flags:** create concrete documentation ([#594](https://github.com/awslabs/aws-lambda-powertools-python/issues/594)) -* **feature-toggles:** correct docs and typing ([#588](https://github.com/awslabs/aws-lambda-powertools-python/issues/588)) -* **feature_flags:** fix SAM infra, convert CDK to Python -* **parameters:** auto-transforming values based on suffix ([#573](https://github.com/awslabs/aws-lambda-powertools-python/issues/573)) -* **readme:** add code coverage badge ([#577](https://github.com/awslabs/aws-lambda-powertools-python/issues/577)) -* **tracer:** update wording that it auto-disables on non-Lambda env - -## Features - -* **api-gateway:** add support for custom serializer ([#568](https://github.com/awslabs/aws-lambda-powertools-python/issues/568)) -* **data-classes:** decode json_body if based64 encoded ([#560](https://github.com/awslabs/aws-lambda-powertools-python/issues/560)) -* **feature flags:** Add not_in action and rename contains to in ([#589](https://github.com/awslabs/aws-lambda-powertools-python/issues/589)) -* **params:** expose high level max_age, raise_on_transform_error ([#567](https://github.com/awslabs/aws-lambda-powertools-python/issues/567)) -* **tracer:** disable tracer when for non-Lambda envs ([#598](https://github.com/awslabs/aws-lambda-powertools-python/issues/598)) - -## Maintenance - -* only build docs on docs path -* update pypi description, keywords -* bump to 1.19.0 -* enable autolabel based on PR title -* include feature-flags docs hotfix -* **deps:** bump boto3 from 1.18.15 to 1.18.17 ([#597](https://github.com/awslabs/aws-lambda-powertools-python/issues/597)) -* **deps:** bump boto3 from 1.18.1 to 1.18.15 ([#591](https://github.com/awslabs/aws-lambda-powertools-python/issues/591)) -* **deps:** bump codecov/codecov-action from 2.0.1 to 2.0.2 ([#558](https://github.com/awslabs/aws-lambda-powertools-python/issues/558)) -* **deps-dev:** bump mkdocs-material from 7.2.1 to 7.2.2 ([#582](https://github.com/awslabs/aws-lambda-powertools-python/issues/582)) -* **deps-dev:** bump mkdocs-material from 7.2.2 to 7.2.3 ([#596](https://github.com/awslabs/aws-lambda-powertools-python/issues/596)) -* **deps-dev:** bump pdoc3 from 0.9.2 to 0.10.0 ([#584](https://github.com/awslabs/aws-lambda-powertools-python/issues/584)) -* **deps-dev:** bump isort from 5.9.2 to 5.9.3 ([#574](https://github.com/awslabs/aws-lambda-powertools-python/issues/574)) -* **deps-dev:** bump mkdocs-material from 7.2.0 to 7.2.1 ([#566](https://github.com/awslabs/aws-lambda-powertools-python/issues/566)) -* **deps-dev:** bump mkdocs-material from 7.1.11 to 7.2.0 ([#551](https://github.com/awslabs/aws-lambda-powertools-python/issues/551)) -* **deps-dev:** bump flake8-black from 0.2.1 to 0.2.3 ([#541](https://github.com/awslabs/aws-lambda-powertools-python/issues/541)) - - - -## [v1.18.1] - 2021-07-23 -## Bug Fixes - -* **api-gateway:** route regression non-word and unsafe URI chars ([#556](https://github.com/awslabs/aws-lambda-powertools-python/issues/556)) - -## Maintenance - -* bump 1.18.1 - - - -## [v1.18.0] - 2021-07-20 -## Bug Fixes - -* **api-gateway:** non-greedy route pattern regex ([#533](https://github.com/awslabs/aws-lambda-powertools-python/issues/533)) -* **api-gateway:** incorrect plain text mimetype [#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506) -* **data-classes:** include milliseconds in scalar types ([#504](https://github.com/awslabs/aws-lambda-powertools-python/issues/504)) -* **mypy:** fixes to resolve no implicit optional errors ([#521](https://github.com/awslabs/aws-lambda-powertools-python/issues/521)) -* **parser:** Make ApiGateway version, authorizer fields optional ([#532](https://github.com/awslabs/aws-lambda-powertools-python/issues/532)) -* **tracer:** mypy generic to preserve decorated method signature ([#529](https://github.com/awslabs/aws-lambda-powertools-python/issues/529)) - -## Code Refactoring - -* **feature-toggles:** Code coverage and housekeeping ([#530](https://github.com/awslabs/aws-lambda-powertools-python/issues/530)) - -## Documentation - -* **api-gateway:** document new HTTP service error exceptions ([#546](https://github.com/awslabs/aws-lambda-powertools-python/issues/546)) -* **logger:** document new get_correlation_id method ([#545](https://github.com/awslabs/aws-lambda-powertools-python/issues/545)) - -## Features - -* **api-gateway:** add debug mode ([#507](https://github.com/awslabs/aws-lambda-powertools-python/issues/507)) -* **api-gateway:** add common service errors ([#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506)) -* **event-handler:** Support AppSyncResolverEvent subclassing ([#526](https://github.com/awslabs/aws-lambda-powertools-python/issues/526)) -* **feat-toggle:** New simple feature toggles rule engine (WIP) ([#494](https://github.com/awslabs/aws-lambda-powertools-python/issues/494)) -* **logger:** add get_correlation_id method ([#516](https://github.com/awslabs/aws-lambda-powertools-python/issues/516)) -* **mypy:** add mypy support to makefile ([#508](https://github.com/awslabs/aws-lambda-powertools-python/issues/508)) - -## Maintenance - -* bump 1.18.0 ([#547](https://github.com/awslabs/aws-lambda-powertools-python/issues/547)) -* **deps:** bump codecov/codecov-action from 1 to 2.0.1 ([#539](https://github.com/awslabs/aws-lambda-powertools-python/issues/539)) -* **deps:** bump boto3 from 1.18.0 to 1.18.1 ([#528](https://github.com/awslabs/aws-lambda-powertools-python/issues/528)) -* **deps:** bump boto3 from 1.17.110 to 1.18.0 ([#527](https://github.com/awslabs/aws-lambda-powertools-python/issues/527)) -* **deps:** bump boto3 from 1.17.102 to 1.17.110 ([#523](https://github.com/awslabs/aws-lambda-powertools-python/issues/523)) -* **deps-dev:** bump mkdocs-material from 7.1.10 to 7.1.11 ([#542](https://github.com/awslabs/aws-lambda-powertools-python/issues/542)) -* **deps-dev:** bump mkdocs-material from 7.1.9 to 7.1.10 ([#522](https://github.com/awslabs/aws-lambda-powertools-python/issues/522)) -* **deps-dev:** bump isort from 5.9.1 to 5.9.2 ([#514](https://github.com/awslabs/aws-lambda-powertools-python/issues/514)) -* **event-handler:** adjusts exception docstrings to not confuse AppSync customers - - - -## [v1.17.1] - 2021-07-02 -## Bug Fixes - -* **validator:** handle built-in custom formats correctly ([#498](https://github.com/awslabs/aws-lambda-powertools-python/issues/498)) - -## Documentation - -* add Layers example for Serverless framework & CDK ([#500](https://github.com/awslabs/aws-lambda-powertools-python/issues/500)) -* enable dark mode switch ([#471](https://github.com/awslabs/aws-lambda-powertools-python/issues/471)) -* **logger:** add FAQ for cross-account searches ([#501](https://github.com/awslabs/aws-lambda-powertools-python/issues/501)) -* **tracer:** additional scenario when to disable auto-capture ([#499](https://github.com/awslabs/aws-lambda-powertools-python/issues/499)) - -## Maintenance - -* bump 1.17.1 ([#502](https://github.com/awslabs/aws-lambda-powertools-python/issues/502)) -* **deps:** bump boto3 from 1.17.101 to 1.17.102 ([#493](https://github.com/awslabs/aws-lambda-powertools-python/issues/493)) -* **deps:** bump boto3 from 1.17.91 to 1.17.101 ([#490](https://github.com/awslabs/aws-lambda-powertools-python/issues/490)) -* **deps:** bump email-validator from 1.1.2 to 1.1.3 ([#478](https://github.com/awslabs/aws-lambda-powertools-python/issues/478)) -* **deps:** bump boto3 from 1.17.89 to 1.17.91 ([#473](https://github.com/awslabs/aws-lambda-powertools-python/issues/473)) -* **deps-dev:** bump flake8-eradicate from 1.0.0 to 1.1.0 ([#492](https://github.com/awslabs/aws-lambda-powertools-python/issues/492)) -* **deps-dev:** bump isort from 5.8.0 to 5.9.1 ([#487](https://github.com/awslabs/aws-lambda-powertools-python/issues/487)) -* **deps-dev:** bump mkdocs-material from 7.1.7 to 7.1.9 ([#491](https://github.com/awslabs/aws-lambda-powertools-python/issues/491)) - - - -## [v1.17.0] - 2021-06-08 -## Documentation - -* include new public roadmap ([#452](https://github.com/awslabs/aws-lambda-powertools-python/issues/452)) -* **data_classes:** fix missing dynamodb stream get_type/value -* **idempotency:** remove old todo - -## Features - -* **data-classes:** add AttributeValueType to DynamoDBStreamEvent ([#462](https://github.com/awslabs/aws-lambda-powertools-python/issues/462)) -* **data-classes:** decorator to instantiate data_classes and docs updates ([#442](https://github.com/awslabs/aws-lambda-powertools-python/issues/442)) -* **logger:** add option to clear state per invocation ([#467](https://github.com/awslabs/aws-lambda-powertools-python/issues/467)) -* **parser:** add support for API Gateway HTTP API [#434](https://github.com/awslabs/aws-lambda-powertools-python/issues/434) ([#441](https://github.com/awslabs/aws-lambda-powertools-python/issues/441)) - -## Maintenance - -* bump xenon from 0.7.1 to 0.7.3 ([#446](https://github.com/awslabs/aws-lambda-powertools-python/issues/446)) -* fix changelog file redirection -* include dependencies label under maintenance -* ignore codecov upload -* reintroduce codecov token -* fix path for PR auto-labelling -* assited changelog pre-generation, auto-label PR ([#443](https://github.com/awslabs/aws-lambda-powertools-python/issues/443)) -* enable dependabot for dep upgrades ([#444](https://github.com/awslabs/aws-lambda-powertools-python/issues/444)) -* enable mergify ([#450](https://github.com/awslabs/aws-lambda-powertools-python/issues/450)) -* dependabot/mergify guardrail for major versions -* fix dependabot commit messages prefix -* fix dependabot unique set config -* bump mkdocs-material from 7.1.5 to 7.1.6 ([#451](https://github.com/awslabs/aws-lambda-powertools-python/issues/451)) -* bump version to 1.17.0 -* bump boto3 from 1.17.78 to 1.17.84 ([#449](https://github.com/awslabs/aws-lambda-powertools-python/issues/449)) -* update mergify to require approval on dependabot ([#456](https://github.com/awslabs/aws-lambda-powertools-python/issues/456)) -* bump actions/setup-python from 1 to 2.2.2 ([#445](https://github.com/awslabs/aws-lambda-powertools-python/issues/445)) -* trial boring cyborg automation -* **deps:** bump boto3 from 1.17.87 to 1.17.88 ([#463](https://github.com/awslabs/aws-lambda-powertools-python/issues/463)) -* **deps:** bump boto3 from 1.17.88 to 1.17.89 ([#466](https://github.com/awslabs/aws-lambda-powertools-python/issues/466)) -* **deps:** bump boto3 from 1.17.84 to 1.17.85 ([#455](https://github.com/awslabs/aws-lambda-powertools-python/issues/455)) -* **deps:** bump boto3 from 1.17.85 to 1.17.86 ([#458](https://github.com/awslabs/aws-lambda-powertools-python/issues/458)) -* **deps:** bump boto3 from 1.17.86 to 1.17.87 ([#459](https://github.com/awslabs/aws-lambda-powertools-python/issues/459)) -* **deps-dev:** bump mkdocs-material from 7.1.6 to 7.1.7 ([#464](https://github.com/awslabs/aws-lambda-powertools-python/issues/464)) -* **deps-dev:** bump pytest-cov from 2.12.0 to 2.12.1 ([#454](https://github.com/awslabs/aws-lambda-powertools-python/issues/454)) -* **mergify:** use job name to match GH Actions -* **mergify:** disable check for matrix jobs - - - -## [v1.16.1] - 2021-05-23 -## Features - -* **parser:** security issue in Pydantic [#436](https://github.com/awslabs/aws-lambda-powertools-python/issues/436) ([#437](https://github.com/awslabs/aws-lambda-powertools-python/issues/437)) - -## Maintenance - -* bump to 1.16.1 - - - -## [v1.16.0] - 2021-05-17 -## Features - -* **data-classes:** decode base64 encoded body ([#425](https://github.com/awslabs/aws-lambda-powertools-python/issues/425)) -* **data-classes:** support for code pipeline job event ([#416](https://github.com/awslabs/aws-lambda-powertools-python/issues/416)) - -## Maintenance - -* bump to 1.16.0 - - - -## [v1.15.1] - 2021-05-13 -## Bug Fixes - -* **docs:** Use updated names for ProxyEventType ([#424](https://github.com/awslabs/aws-lambda-powertools-python/issues/424)) - -## Documentation - -* update list of features -* **event_handler:** add missing note on trimmed responses - -## Maintenance - -* bump to 1.15.1 - - - -## [v1.15.0] - 2021-05-06 -## Bug Fixes - -* **deps:** Bump aws-xray-sdk from 2.6.0 to 2.8.0 ([#413](https://github.com/awslabs/aws-lambda-powertools-python/issues/413)) -* **docs:** workflow to include api ref in latest alias ([#408](https://github.com/awslabs/aws-lambda-powertools-python/issues/408)) -* **parser:** Improve types for parser.py ([#419](https://github.com/awslabs/aws-lambda-powertools-python/issues/419)) -* **validator:** event type annotation as any in validate fn ([#405](https://github.com/awslabs/aws-lambda-powertools-python/issues/405)) - -## Code Refactoring - -* simplify custom formatter for minor changes ([#417](https://github.com/awslabs/aws-lambda-powertools-python/issues/417)) -* **event-handler:** api gateway handler review changes ([#420](https://github.com/awslabs/aws-lambda-powertools-python/issues/420)) -* **event-handler:** Add ResponseBuilder and more docs ([#412](https://github.com/awslabs/aws-lambda-powertools-python/issues/412)) -* **logger:** BYOFormatter and Handler, UTC support, and more ([#404](https://github.com/awslabs/aws-lambda-powertools-python/issues/404)) - -## Documentation - -* **api_gateway:** new event handler for API Gateway and ALB ([#418](https://github.com/awslabs/aws-lambda-powertools-python/issues/418)) -* **event_handler:** fix closing brackets in CORS sample -* **event_handler:** remove beta flag from new HTTP utility -* **idempotency:** remove beta flag -* **logger:** improvements extensibility & new features ([#415](https://github.com/awslabs/aws-lambda-powertools-python/issues/415)) -* **parser:** fix table and heading syntax -* **tracer:** Fix line highlighting ([#395](https://github.com/awslabs/aws-lambda-powertools-python/issues/395)) - -## Features - -* add support to persist default dimensions ([#410](https://github.com/awslabs/aws-lambda-powertools-python/issues/410)) -* **event-handle:** allow for cors=None setting ([#421](https://github.com/awslabs/aws-lambda-powertools-python/issues/421)) -* **event-handler:** add http ProxyEvent handler ([#369](https://github.com/awslabs/aws-lambda-powertools-python/issues/369)) -* **parser:** Support for API GW v1 proxy schema & envelope ([#403](https://github.com/awslabs/aws-lambda-powertools-python/issues/403)) - -## Maintenance - -* bump to 1.15.0 ([#422](https://github.com/awslabs/aws-lambda-powertools-python/issues/422)) +* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) ([#1190](https://github.com/awslabs/aws-lambda-powertools-python/issues/1190)) @@ -2317,47 +1776,7 @@ * Merge pull request [#5](https://github.com/awslabs/aws-lambda-powertools-python/issues/5) from jfuss/feat/python38 -[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.28.0...HEAD -[v1.28.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.27.0...v1.28.0 -[v1.27.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.7...v1.27.0 -[v1.26.7]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.6...v1.26.7 -[v1.26.6]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.5...v1.26.6 -[v1.26.5]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.4...v1.26.5 -[v1.26.4]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.3...v1.26.4 -[v1.26.3]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.2...v1.26.3 -[v1.26.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.1...v1.26.2 -[v1.26.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.0...v1.26.1 -[v1.26.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.10...v1.26.0 -[v1.25.10]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.9...v1.25.10 -[v1.25.9]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.8...v1.25.9 -[v1.25.8]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.7...v1.25.8 -[v1.25.7]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.6...v1.25.7 -[v1.25.6]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.5...v1.25.6 -[v1.25.5]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.4...v1.25.5 -[v1.25.4]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.3...v1.25.4 -[v1.25.3]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.2...v1.25.3 -[v1.25.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.1...v1.25.2 -[v1.25.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.0...v1.25.1 -[v1.25.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.24.2...v1.25.0 -[v1.24.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.24.1...v1.24.2 -[v1.24.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.24.0...v1.24.1 -[v1.24.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.23.0...v1.24.0 -[v1.23.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.22.0...v1.23.0 -[v1.22.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.21.1...v1.22.0 -[v1.21.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.21.0...v1.21.1 -[v1.21.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.20.2...v1.21.0 -[v1.20.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.20.1...v1.20.2 -[v1.20.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.20.0...v1.20.1 -[v1.20.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.19.0...v1.20.0 -[v1.19.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.18.1...v1.19.0 -[v1.18.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.18.0...v1.18.1 -[v1.18.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.17.1...v1.18.0 -[v1.17.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.17.0...v1.17.1 -[v1.17.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.16.1...v1.17.0 -[v1.16.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.16.0...v1.16.1 -[v1.16.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.15.1...v1.16.0 -[v1.15.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.15.0...v1.15.1 -[v1.15.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.14.0...v1.15.0 +[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.14.0...HEAD [v1.14.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.13.0...v1.14.0 [v1.13.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.12.0...v1.13.0 [v1.12.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.11.0...v1.12.0 From 70de8857c31a803c0113006ba8cc3ba9b3e43fa6 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Sun, 4 Sep 2022 17:04:32 +0300 Subject: [PATCH 10/24] feature: Kafka Parser support --- .github/scripts/label_related_issue.js | 54 +- CHANGELOG.md | 2079 +++++++++++------ .../utilities/parser/envelopes/__init__.py | 2 + .../utilities/parser/envelopes/kafka.py | 41 + .../utilities/parser/models/__init__.py | 3 + .../utilities/parser/models/kafka.py | 70 + docs/utilities/parser.md | 2 + tests/events/kafkaEvent.json | 34 + tests/functional/parser/schemas.py | 4 + tests/functional/parser/test_kafka.py | 49 + 10 files changed, 1574 insertions(+), 764 deletions(-) create mode 100644 aws_lambda_powertools/utilities/parser/envelopes/kafka.py create mode 100644 aws_lambda_powertools/utilities/parser/models/kafka.py create mode 100644 tests/events/kafkaEvent.json create mode 100644 tests/functional/parser/test_kafka.py diff --git a/.github/scripts/label_related_issue.js b/.github/scripts/label_related_issue.js index a66a63fd005..24b38aa748c 100644 --- a/.github/scripts/label_related_issue.js +++ b/.github/scripts/label_related_issue.js @@ -1,29 +1,53 @@ -module.exports = async ({github, context, core}) => { - const prBody = context.payload.body; - const prNumber = context.payload.number; - const releaseLabel = process.env.RELEASE_LABEL; - const maintainersTeam = process.env.MAINTAINERS_TEAM +const { + PR_AUTHOR, + PR_BODY, + PR_NUMBER, + IGNORE_AUTHORS, + LABEL_PENDING_RELEASE, + HANDLE_MAINTAINERS_TEAM, + PR_IS_MERGED, +} = require("./constants") - const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?\d+)/; +module.exports = async ({ github, context, core }) => { + if (IGNORE_AUTHORS.includes(PR_AUTHOR)) { + return core.notice("Author in IGNORE_AUTHORS list; skipping...") + } - const isMatch = RELATED_ISSUE_REGEX.exec(prBody); + if (PR_IS_MERGED == "false") { + return core.notice("Only merged PRs to avoid spam; skipping") + } + + const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?\d+)/; + + const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY); + + try { if (!isMatch) { - core.setFailed(`Unable to find related issue for PR number ${prNumber}.\n\n Body details: ${prBody}`); + core.setFailed(`Unable to find related issue for PR number ${PR_NUMBER}.\n\n Body details: ${PR_BODY}`); return await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, - body: `${maintainersTeam} No related issues found. Please ensure '${releaseLabel}' label is applied before releasing.`, - issue_number: prNumber, + body: `${HANDLE_MAINTAINERS_TEAM} No related issues found. Please ensure '${LABEL_PENDING_RELEASE}' label is applied before releasing.`, + issue_number: PR_NUMBER, }); } + } catch (error) { + core.setFailed(`Unable to create comment on PR number ${PR_NUMBER}.\n\n Error details: ${error}`); + throw new Error(error); + } - const { groups: {relatedIssueNumber} } = isMatch + const { groups: { issue } } = isMatch - core.info(`Auto-labeling related issue ${relatedIssueNumber} for release`) + try { + core.info(`Auto-labeling related issue ${issue} for release`) return await github.rest.issues.addLabels({ - issue_number: relatedIssueNumber, + issue_number: issue, owner: context.repo.owner, repo: context.repo.repo, - labels: [releaseLabel] + labels: [LABEL_PENDING_RELEASE] }) -} + } catch (error) { + core.setFailed(`Is this issue number (${issue}) valid? Perhaps a discussion?`); + throw new Error(error); + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f12eb68b9..410594483dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,823 +6,1364 @@ ## Bug Fixes -* remove apigw contract when using event-handler, apigw tracing -* path to artefact -* Fix issue with strip_prefixes ([#647](https://github.com/awslabs/aws-lambda-powertools-python/issues/647)) -* removed ambiguous quotes from labels. -* change supported python version from 3.6.1 to 3.6.2, bump black ([#807](https://github.com/awslabs/aws-lambda-powertools-python/issues/807)) -* mathc the name of the cdk synth from the build phase -* package_logger as const over logger instance -* repurpose test to cover parent loggers case -* use decorators, split cold start to ease reading -* use addHandler over monkeypatch -* add entire ARN role instead of account and role name -* download artefact into the layer dir -* remove unused json import -* incorrect log keys, indentation, snippet consistency -* remove f-strings that doesn't evaluate expr -* no need to cache npm since we only install cdk cli and don't have .lock files -* typo in input for layer workflow -* sight, yes a whitespace character breaks the build -* unzip the right artifact name -* **api-gateway:** route regression non-word and unsafe URI chars ([#556](https://github.com/awslabs/aws-lambda-powertools-python/issues/556)) -* **api-gateway:** incorrect plain text mimetype [#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506) -* **api-gateway:** non-greedy route pattern regex ([#533](https://github.com/awslabs/aws-lambda-powertools-python/issues/533)) -* **api-gateway:** HTTP API strip stage name from request path ([#622](https://github.com/awslabs/aws-lambda-powertools-python/issues/622)) -* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) -* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) -* **apigateway:** support [@app](https://github.com/app).not_found() syntax & housekeeping ([#926](https://github.com/awslabs/aws-lambda-powertools-python/issues/926)) -* **apigateway:** allow list of HTTP methods in route method ([#838](https://github.com/awslabs/aws-lambda-powertools-python/issues/838)) -* **apigateway:** remove indentation in debug_mode ([#987](https://github.com/awslabs/aws-lambda-powertools-python/issues/987)) -* **batch:** report multiple failures ([#967](https://github.com/awslabs/aws-lambda-powertools-python/issues/967)) -* **batch:** delete >10 messages in legacy sqs processor ([#818](https://github.com/awslabs/aws-lambda-powertools-python/issues/818)) -* **batch:** missing space in BatchProcessingError message ([#1201](https://github.com/awslabs/aws-lambda-powertools-python/issues/1201)) -* **batch:** docstring fix for success_handler() record parameter ([#1202](https://github.com/awslabs/aws-lambda-powertools-python/issues/1202)) -* **batch:** bugfix to clear exceptions between executions ([#1022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1022)) -* **ci:** move from pip-tools to poetry on layers reusable workflow -* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) -* **ci:** fetch all git info so we can check tags -* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) -* **ci:** remove additional quotes in PR action ([#1317](https://github.com/awslabs/aws-lambda-powertools-python/issues/1317)) -* **ci:** install poetry before calling setup/python with cache ([#1315](https://github.com/awslabs/aws-lambda-powertools-python/issues/1315)) -* **ci:** keep layer version permission ([#1318](https://github.com/awslabs/aws-lambda-powertools-python/issues/1318)) -* **ci:** pr label regex for special chars in title -* **ci:** address conditional type on_merge -* **ci:** unexpected symbol due to double quotes... -* **ci:** address gh-actions additional quotes; remove debug -* **ci:** regex group name for on_merge workflow -* **ci:** escape outputs as certain PRs can break GH Actions expressions -* **ci:** move conditionals from yaml to code; leftover -* **ci:** move conditionals from yaml to code -* **ci:** accept core arg in label related issue workflow -* **ci:** match the name of the cdk synth from the build phase -* **ci:** regex to catch combination of related issues workflow -* **ci:** checkout project before validating related issue workflow -* **ci:** remove unsupported env in workflow_call -* **ci:** accept core arg in label related issue workflow -* **ci:** only event is resolved in cond -* **ci:** cond doesnt support two expr w/ env -* **ci:** label_related_issue unresolved var from history mixup -* **ci:** remove unused secret -* **ci:** allow inherit secrets for reusable workflow -* **ci:** add missing oidc token generation permission -* **ci:** job permissions -* **ci:** add additional input to accurately describe intent on skip -* **ci:** regex to catch combination of related issues workflow -* **ci:** checkout project before validating related issue workflow -* **ci:** changelog workflow must receive git tags too -* **ci:** improve msg visibility on closed issues -* **ci:** add explicit origin to fix release detached head -* **ci:** disable merged_pr workflow -* **ci:** merged_pr add issues write access -* **ci:** quote prBody GH expr on_opened_pr -* **ci:** remove utf-8 body in octokit body req -* **ci:** reusable workflow secrets param -* **ci:** temporarily disable changelog upon release -* **ci:** move from pip-tools to poetry on layers -* **ci:** add cdk v2 dep for layers workflow -* **ci:** disable poetry venv for layer workflow as cdk ignores venv -* **ci:** use poetry to resolve layer deps; pip for CDK -* **ci:** typo and bust gh actions cache -* **ci:** move from pip-tools to poetry on layers to fix conflicts -* **ci:** del flake8 direct dep over py3.6 conflicts and docs failure -* **ci:** fixes typos and small issues on github scripts ([#1302](https://github.com/awslabs/aws-lambda-powertools-python/issues/1302)) -* **ci:** calculate parallel jobs based on infrastructure needs ([#1475](https://github.com/awslabs/aws-lambda-powertools-python/issues/1475)) -* **ci:** event resolution for on_label_added workflow -* **ci:** comment custom publish version checker -* **ci:** gracefully and successful exit changelog upon no changes -* **ci:** ensure PR_AUTHOR is present for large_pr_split workflow -* **ci:** on_label permissioning model & workflow execution * **ci:** pass core fns to large pr workflow script -* **ci:** address pr title semantic not found logic -* **ci:** skip sync master on docs hotfix -* **data-classes:** use correct asdict funciton ([#666](https://github.com/awslabs/aws-lambda-powertools-python/issues/666)) -* **data-classes:** docstring typos and clean up ([#937](https://github.com/awslabs/aws-lambda-powertools-python/issues/937)) -* **data-classes:** include milliseconds in scalar types ([#504](https://github.com/awslabs/aws-lambda-powertools-python/issues/504)) -* **data-classes:** underscore support in api gateway authorizer resource name ([#969](https://github.com/awslabs/aws-lambda-powertools-python/issues/969)) -* **data-classes:** Add missing SES fields and ([#1045](https://github.com/awslabs/aws-lambda-powertools-python/issues/1045)) -* **deps:** correct py36 marker for jmespath -* **deps:** Ignore boto3 changes until needed ([#1151](https://github.com/awslabs/aws-lambda-powertools-python/issues/1151)) -* **deps:** Bump aws-xray-sdk from 2.6.0 to 2.8.0 ([#413](https://github.com/awslabs/aws-lambda-powertools-python/issues/413)) -* **deps:** correct mypy types as dev dependency ([#1322](https://github.com/awslabs/aws-lambda-powertools-python/issues/1322)) -* **deps:** bump poetry to latest ([#592](https://github.com/awslabs/aws-lambda-powertools-python/issues/592)) -* **deps:** update jmespath marker to support 1.0 and py3.6 ([#1139](https://github.com/awslabs/aws-lambda-powertools-python/issues/1139)) -* **deps-dev:** remove jmespath due to dev deps conflict ([#1148](https://github.com/awslabs/aws-lambda-powertools-python/issues/1148)) -* **docs:** Use updated names for ProxyEventType ([#424](https://github.com/awslabs/aws-lambda-powertools-python/issues/424)) -* **docs:** remove Slack link ([#1210](https://github.com/awslabs/aws-lambda-powertools-python/issues/1210)) -* **docs:** correct feature_flags link and json exmaples ([#605](https://github.com/awslabs/aws-lambda-powertools-python/issues/605)) -* **docs:** workflow to include api ref in latest alias ([#408](https://github.com/awslabs/aws-lambda-powertools-python/issues/408)) -* **event-handler:** body to empty string in CORS preflight (ALB non-compliant) ([#1249](https://github.com/awslabs/aws-lambda-powertools-python/issues/1249)) -* **event-sources:** Pass authorizer data to APIGatewayEventAuthorizer ([#897](https://github.com/awslabs/aws-lambda-powertools-python/issues/897)) -* **event-sources:** handle dynamodb null type as none, not bool ([#929](https://github.com/awslabs/aws-lambda-powertools-python/issues/929)) -* **event-sources:** handle claimsOverrideDetails set to null ([#878](https://github.com/awslabs/aws-lambda-powertools-python/issues/878)) -* **event_handler:** docs snippets, high-level import CorsConfig ([#1019](https://github.com/awslabs/aws-lambda-powertools-python/issues/1019)) -* **event_handler:** exception_handler to handle ServiceError exceptions ([#1160](https://github.com/awslabs/aws-lambda-powertools-python/issues/1160)) +* **ci:** on_label permissioning model & workflow execution +* **ci:** ensure PR_AUTHOR is present for large_pr_split workflow +* **ci:** gracefully and successful exit changelog upon no changes +* **ci:** event resolution for on_label_added workflow * **event_handler:** fix bug with previous array implementation -* **event_handler:** Allow for event_source support ([#1159](https://github.com/awslabs/aws-lambda-powertools-python/issues/1159)) -* **event_handlers:** ImportError when importing Response from top-level event_handler ([#1388](https://github.com/awslabs/aws-lambda-powertools-python/issues/1388)) -* **event_handlers:** handle lack of headers when using auto-compression feature ([#1325](https://github.com/awslabs/aws-lambda-powertools-python/issues/1325)) -* **event_sources:** add test for Function URL AuthZ ([#1421](https://github.com/awslabs/aws-lambda-powertools-python/issues/1421)) -* **feature-flags:** bug handling multiple conditions ([#599](https://github.com/awslabs/aws-lambda-powertools-python/issues/599)) -* **feature-flags:** rules should evaluate with an AND op ([#724](https://github.com/awslabs/aws-lambda-powertools-python/issues/724)) -* **feature-toggles:** correct cdk example ([#601](https://github.com/awslabs/aws-lambda-powertools-python/issues/601)) -* **governance:** update label in names in issues -* **idempotency:** include decorated fn name in hash ([#869](https://github.com/awslabs/aws-lambda-powertools-python/issues/869)) -* **idempotency:** pass by value on idem key to guard inadvert mutations ([#1090](https://github.com/awslabs/aws-lambda-powertools-python/issues/1090)) -* **idempotency:** sorting keys before hashing ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) -* **idempotency:** sorting keys before hashing -* **idempotency:** sorting keys before hashing ([#639](https://github.com/awslabs/aws-lambda-powertools-python/issues/639)) -* **jmespath_util:** snappy as dev dep and typing example ([#1446](https://github.com/awslabs/aws-lambda-powertools-python/issues/1446)) -* **lambda-authorizer:** allow proxy resources path in arn ([#1051](https://github.com/awslabs/aws-lambda-powertools-python/issues/1051)) -* **logger:** support additional args for handlers when injecting lambda context ([#1276](https://github.com/awslabs/aws-lambda-powertools-python/issues/1276)) -* **logger:** clear_state regression on absent standard keys ([#1088](https://github.com/awslabs/aws-lambda-powertools-python/issues/1088)) -* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) -* **logger:** ensure state is cleared for custom formatters ([#1072](https://github.com/awslabs/aws-lambda-powertools-python/issues/1072)) -* **logger:** clear_state should keep custom key formats ([#1095](https://github.com/awslabs/aws-lambda-powertools-python/issues/1095)) -* **logger:** test generates logfile -* **logger:** push extra keys to the end ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) -* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) -* **logger:** exclude source_logger in copy_config_to_registered_loggers ([#1001](https://github.com/awslabs/aws-lambda-powertools-python/issues/1001)) -* **logger-utils:** regression on exclude set leading to no formatter ([#1080](https://github.com/awslabs/aws-lambda-powertools-python/issues/1080)) -* **metrics:** flush upon a single metric 100th data point ([#1046](https://github.com/awslabs/aws-lambda-powertools-python/issues/1046)) -* **metrics:** explicit type to single_metric ctx manager ([#865](https://github.com/awslabs/aws-lambda-powertools-python/issues/865)) -* **metrics:** raise SchemaValidationError for >8 metric dimensions ([#1240](https://github.com/awslabs/aws-lambda-powertools-python/issues/1240)) -* **middleware_factory:** ret type annotation for handler dec ([#1066](https://github.com/awslabs/aws-lambda-powertools-python/issues/1066)) -* **mypy:** a few return types, type signatures, and untyped areas ([#718](https://github.com/awslabs/aws-lambda-powertools-python/issues/718)) -* **mypy:** fixes to resolve no implicit optional errors ([#521](https://github.com/awslabs/aws-lambda-powertools-python/issues/521)) -* **parameters:** appconfig transform and return types ([#877](https://github.com/awslabs/aws-lambda-powertools-python/issues/877)) -* **parameters:** appconfig internal _get docstrings ([#934](https://github.com/awslabs/aws-lambda-powertools-python/issues/934)) -* **parser:** overload parse when using envelope ([#885](https://github.com/awslabs/aws-lambda-powertools-python/issues/885)) -* **parser:** Improve types for parser.py ([#419](https://github.com/awslabs/aws-lambda-powertools-python/issues/419)) -* **parser:** apigw wss validation check_message_id; housekeeping ([#553](https://github.com/awslabs/aws-lambda-powertools-python/issues/553)) -* **parser:** kinesis sequence number is str, not int ([#907](https://github.com/awslabs/aws-lambda-powertools-python/issues/907)) -* **parser:** Make ApiGateway version, authorizer fields optional ([#532](https://github.com/awslabs/aws-lambda-powertools-python/issues/532)) -* **parser:** body/QS can be null or omitted in apigw v1/v2 ([#820](https://github.com/awslabs/aws-lambda-powertools-python/issues/820)) -* **parser:** raise ValidationError when SNS->SQS keys are intentionally missing ([#1299](https://github.com/awslabs/aws-lambda-powertools-python/issues/1299)) -* **parser:** mypy support for payload type override as models ([#883](https://github.com/awslabs/aws-lambda-powertools-python/issues/883)) -* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) -* **tracer:** add warm start annotation (ColdStart=False) ([#851](https://github.com/awslabs/aws-lambda-powertools-python/issues/851)) -* **tracer:** mypy generic to preserve decorated method signature ([#529](https://github.com/awslabs/aws-lambda-powertools-python/issues/529)) -* **validator:** handle built-in custom formats correctly ([#498](https://github.com/awslabs/aws-lambda-powertools-python/issues/498)) -* **validator:** event type annotation as any in validate fn ([#405](https://github.com/awslabs/aws-lambda-powertools-python/issues/405)) -* **warning:** future distutils deprecation ([#921](https://github.com/awslabs/aws-lambda-powertools-python/issues/921)) ## Code Refactoring -* simplify custom formatter for minor changes ([#417](https://github.com/awslabs/aws-lambda-powertools-python/issues/417)) -* rename to clear_state -* rename to remove_custom_keys -* **apigateway:** Add BaseRouter and duplicate route check ([#757](https://github.com/awslabs/aws-lambda-powertools-python/issues/757)) * **batch:** remove legacy sqs_batch_processor ([#1492](https://github.com/awslabs/aws-lambda-powertools-python/issues/1492)) -* **data-classes:** clean up internal logic for APIGatewayAuthorizerResponse ([#643](https://github.com/awslabs/aws-lambda-powertools-python/issues/643)) -* **event-handler:** api gateway handler review changes ([#420](https://github.com/awslabs/aws-lambda-powertools-python/issues/420)) -* **event-handler:** Add ResponseBuilder and more docs ([#412](https://github.com/awslabs/aws-lambda-powertools-python/issues/412)) -* **event_handler:** match to match_results; 3.10 new keyword ([#616](https://github.com/awslabs/aws-lambda-powertools-python/issues/616)) -* **feature-flags:** add debug for all features evaluation" ([#590](https://github.com/awslabs/aws-lambda-powertools-python/issues/590)) -* **feature-toggles:** Code coverage and housekeeping ([#530](https://github.com/awslabs/aws-lambda-powertools-python/issues/530)) -* **feature_flags:** optimize UX and maintenance ([#563](https://github.com/awslabs/aws-lambda-powertools-python/issues/563)) -* **logger:** BYOFormatter and Handler, UTC support, and more ([#404](https://github.com/awslabs/aws-lambda-powertools-python/issues/404)) ## Documentation -* fix indentation of SAM snippets in install section ([#778](https://github.com/awslabs/aws-lambda-powertools-python/issues/778)) -* add team behind it and email -* consistency around admonitions and snippets ([#919](https://github.com/awslabs/aws-lambda-powertools-python/issues/919)) -* Added GraphQL Sample API to Examples section of README.md ([#930](https://github.com/awslabs/aws-lambda-powertools-python/issues/930)) -* add new public layer ARNs ([#746](https://github.com/awslabs/aws-lambda-powertools-python/issues/746)) -* external reference to cloudformation custom resource helper ([#914](https://github.com/awslabs/aws-lambda-powertools-python/issues/914)) -* update list of features -* add final consideration section -* disable search blur in non-prod env -* include new public roadmap ([#452](https://github.com/awslabs/aws-lambda-powertools-python/issues/452)) -* add amplify-cli instructions for public layer ([#754](https://github.com/awslabs/aws-lambda-powertools-python/issues/754)) -* fix anchor -* rename to tutorial given the size -* enable dark mode switch ([#471](https://github.com/awslabs/aws-lambda-powertools-python/issues/471)) -* add Layers example for Serverless framework & CDK ([#500](https://github.com/awslabs/aws-lambda-powertools-python/issues/500)) -* rename quickstart to tutorial in readme -* improve public lambda layer wording, clipboard buttons ([#762](https://github.com/awslabs/aws-lambda-powertools-python/issues/762)) -* add new public Slack invite -* update Lambda Layers version -* add better BDD coments -* Terraform reference for SAR Lambda Layer ([#716](https://github.com/awslabs/aws-lambda-powertools-python/issues/716)) -* Idiomatic tenet updated to Progressive -* fix syntax errors and line highlights ([#1004](https://github.com/awslabs/aws-lambda-powertools-python/issues/1004)) -* use higher contrast font ([#822](https://github.com/awslabs/aws-lambda-powertools-python/issues/822)) -* use higher contrast font -* updated Lambda Layers definition & limitations. ([#775](https://github.com/awslabs/aws-lambda-powertools-python/issues/775)) -* **api-gateway:** document new HTTP service error exceptions ([#546](https://github.com/awslabs/aws-lambda-powertools-python/issues/546)) -* **api-gateway:** add support for new router feature ([#767](https://github.com/awslabs/aws-lambda-powertools-python/issues/767)) -* **api-gateway:** add new API mapping support -* **api_gateway:** new event handler for API Gateway and ALB ([#418](https://github.com/awslabs/aws-lambda-powertools-python/issues/418)) -* **apigateway:** fix sample layout provided ([#864](https://github.com/awslabs/aws-lambda-powertools-python/issues/864)) -* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) -* **apigateway:** add new not_found feature ([#915](https://github.com/awslabs/aws-lambda-powertools-python/issues/915)) -* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) -* **apigateway:** re-add sample layout, add considerations ([#826](https://github.com/awslabs/aws-lambda-powertools-python/issues/826)) -* **appsync:** fix typo -* **appsync:** add new router feature ([#821](https://github.com/awslabs/aws-lambda-powertools-python/issues/821)) -* **appsync:** fix users.py typo to locations [#830](https://github.com/awslabs/aws-lambda-powertools-python/issues/830) -* **batch:** remove leftover from legacy -* **batch:** snippet typo on batch processed messages iteration ([#951](https://github.com/awslabs/aws-lambda-powertools-python/issues/951)) -* **batch:** fix typo in context manager keyword ([#938](https://github.com/awslabs/aws-lambda-powertools-python/issues/938)) -* **contributing:** operational excellence pause -* **core:** match code snippet name with filename ([#1286](https://github.com/awslabs/aws-lambda-powertools-python/issues/1286)) -* **data-class:** fix invalid syntax in new AppSync Authorizer -* **data-classes:** make authorizer concise; use enum ([#630](https://github.com/awslabs/aws-lambda-powertools-python/issues/630)) -* **data_classes:** fix missing dynamodb stream get_type/value -* **event-handler:** improve testing section for graphql ([#996](https://github.com/awslabs/aws-lambda-powertools-python/issues/996)) -* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) -* **event-handler:** new custom serializer option -* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) -* **event-handler:** document catch-all routes ([#705](https://github.com/awslabs/aws-lambda-powertools-python/issues/705)) -* **event_handler:** remove beta flag from new HTTP utility -* **event_handler:** fix closing brackets in CORS sample -* **event_handler:** add missing note on trimmed responses -* **examples:** enforce and fix all mypy errors ([#1393](https://github.com/awslabs/aws-lambda-powertools-python/issues/1393)) -* **feature-flags:** fix sample feature name in evaluate -* **feature-flags:** add guidance when to use vs env vars vs parameters -* **feature-flags:** create concrete documentation ([#594](https://github.com/awslabs/aws-lambda-powertools-python/issues/594)) -* **feature-toggles:** correct docs and typing ([#588](https://github.com/awslabs/aws-lambda-powertools-python/issues/588)) -* **feature_flags:** fix SAM infra, convert CDK to Python -* **governance:** typos on PR template fixes [#1314](https://github.com/awslabs/aws-lambda-powertools-python/issues/1314) -* **governance:** link roadmap and maintainers doc -* **governance:** add security doc to the root -* **graphql:** snippets split, improved, and lint ([#1287](https://github.com/awslabs/aws-lambda-powertools-python/issues/1287)) -* **home:** add discord invitation link ([#1471](https://github.com/awslabs/aws-lambda-powertools-python/issues/1471)) -* **home:** fix discord syntax and add Discord badge -* **homepage:** emphasize additional powertools languages ([#1292](https://github.com/awslabs/aws-lambda-powertools-python/issues/1292)) -* **homepage:** link to typescript version ([#950](https://github.com/awslabs/aws-lambda-powertools-python/issues/950)) * **homepage:** note about v2 version -* **idempotency:** add support for DynamoDB composite keys ([#808](https://github.com/awslabs/aws-lambda-powertools-python/issues/808)) -* **idempotency:** fix misleading idempotent examples ([#661](https://github.com/awslabs/aws-lambda-powertools-python/issues/661)) -* **idempotency:** remove beta flag -* **idempotency:** remove old todo -* **install:** new lambda layer for 1.24.0 release -* **install:** instructions to reduce pydantic package size ([#1077](https://github.com/awslabs/aws-lambda-powertools-python/issues/1077)) -* **jmespath:** clarify envelope terminology -* **jmespath_util:** snippets split, improved, and lint ([#1419](https://github.com/awslabs/aws-lambda-powertools-python/issues/1419)) -* **lambda_layer:** fix CDK layer syntax -* **layer:** bump Lambda Layer to version 6 -* **layer:** upgrade to 1.27.0 -* **layer:** upgrade to 1.27.0 -* **layer:** upgrade to 1.26.7 -* **layer:** update to 1.25.7 -* **layer:** update to 1.25.6; cosmetic changes -* **layer:** upgrade to 1.25.10 -* **layer:** upgrade to 1.25.9 -* **layer:** remove link from clipboard button ([#1135](https://github.com/awslabs/aws-lambda-powertools-python/issues/1135)) -* **layer:** update to 1.24.1 -* **layer:** update to 1.24.2 * **layer:** upgrade to 1.28.0 (v33) -* **layer:** update to 1.25.1 -* **layer:** update to 1.25.3 -* **layer:** bump to 1.25.5 -* **lint:** add markdownlint rules and automation ([#1256](https://github.com/awslabs/aws-lambda-powertools-python/issues/1256)) -* **logger:** document enriching logs with logrecord attributes ([#1271](https://github.com/awslabs/aws-lambda-powertools-python/issues/1271)) -* **logger:** document new get_correlation_id method ([#545](https://github.com/awslabs/aws-lambda-powertools-python/issues/545)) -* **logger:** improvements extensibility & new features ([#415](https://github.com/awslabs/aws-lambda-powertools-python/issues/415)) -* **logger:** snippets split, improved, and lint ([#1262](https://github.com/awslabs/aws-lambda-powertools-python/issues/1262)) -* **logger:** add FAQ for cross-account searches ([#501](https://github.com/awslabs/aws-lambda-powertools-python/issues/501)) -* **maintainers:** initial maintainers playbook ([#1222](https://github.com/awslabs/aws-lambda-powertools-python/issues/1222)) -* **metrics:** snippets split, improved, and lint ([#1272](https://github.com/awslabs/aws-lambda-powertools-python/issues/1272)) -* **metrics:** snippets split, improved, and lint -* **metrics:** keep it consistent with other sections, update metric names + +## Features + +* **ci:** add actionlint in pre-commit hook +* **event_handler:** add cookies as 1st class citizen in v2 ([#1487](https://github.com/awslabs/aws-lambda-powertools-python/issues/1487)) +* **event_handler:** improved support for headers and cookies in v2 ([#1455](https://github.com/awslabs/aws-lambda-powertools-python/issues/1455)) +* **event_sources:** add CloudWatch dashboard custom widget event ([#1474](https://github.com/awslabs/aws-lambda-powertools-python/issues/1474)) + +## Maintenance + +* **bandit:** update baseline +* **ci:** add workflow to suggest splitting large PRs ([#1480](https://github.com/awslabs/aws-lambda-powertools-python/issues/1480)) +* **ci:** limit E2E workflow run for source code change +* **ci:** add linter for GitHub Actions as pre-commit hook ([#1479](https://github.com/awslabs/aws-lambda-powertools-python/issues/1479)) +* **ci:** add missing description fields +* **ci:** remove unused and undeclared OS matrix env +* **ci:** sync package version with pypi +* **ci:** fix invalid dependency leftover +* **ci:** create adhoc docs workflow for v2 +* **ci:** create adhoc docs workflow for v2 +* **ci:** create docs workflow for v2 +* **ci:** create reusable docs publishing workflow ([#1482](https://github.com/awslabs/aws-lambda-powertools-python/issues/1482)) +* **ci:** format comment on comment_large_pr script +* **ci:** add note for state persistence on comment_large_pr +* **ci:** destructure assignment on comment_large_pr +* **ci:** record pr details upon labeling +* **ci:** remove dangling debug step +* **ci:** enable ci checks for v2 +* **deps:** bump pydantic from 1.10.0 to 1.10.1 ([#1491](https://github.com/awslabs/aws-lambda-powertools-python/issues/1491)) +* **deps-dev:** bump black from 22.6.0 to 22.8.0 ([#1494](https://github.com/awslabs/aws-lambda-powertools-python/issues/1494)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#1481](https://github.com/awslabs/aws-lambda-powertools-python/issues/1481)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#306](https://github.com/awslabs/aws-lambda-powertools-python/issues/306)) +* **deps-dev:** bump mkdocs-material from 8.4.1 to 8.4.2 ([#1483](https://github.com/awslabs/aws-lambda-powertools-python/issues/1483)) +* **deps-dev:** bump flake8-variables-names from 0.0.4 to 0.0.5 ([#1490](https://github.com/awslabs/aws-lambda-powertools-python/issues/1490)) +* **deps-dev:** bump aws-cdk-lib from 2.39.1 to 2.40.0 ([#1495](https://github.com/awslabs/aws-lambda-powertools-python/issues/1495)) +* **maintainers:** update release workflow link +* **maintenance:** add discord link to first PR and first issue ([#1493](https://github.com/awslabs/aws-lambda-powertools-python/issues/1493)) + + + +## [v1.28.0] - 2022-08-25 +## Bug Fixes + +* **ci:** calculate parallel jobs based on infrastructure needs ([#1475](https://github.com/awslabs/aws-lambda-powertools-python/issues/1475)) +* **ci:** del flake8 direct dep over py3.6 conflicts and docs failure +* **ci:** move from pip-tools to poetry on layers reusable workflow +* **ci:** move from pip-tools to poetry on layers to fix conflicts +* **ci:** typo and bust gh actions cache +* **ci:** use poetry to resolve layer deps; pip for CDK +* **ci:** disable poetry venv for layer workflow as cdk ignores venv +* **ci:** add cdk v2 dep for layers workflow +* **ci:** move from pip-tools to poetry on layers +* **ci:** temporarily disable changelog upon release +* **ci:** add explicit origin to fix release detached head +* **jmespath_util:** snappy as dev dep and typing example ([#1446](https://github.com/awslabs/aws-lambda-powertools-python/issues/1446)) + +## Documentation + +* **apigateway:** removes duplicate admonition ([#1426](https://github.com/awslabs/aws-lambda-powertools-python/issues/1426)) +* **home:** fix discord syntax and add Discord badge +* **home:** add discord invitation link ([#1471](https://github.com/awslabs/aws-lambda-powertools-python/issues/1471)) +* **jmespath_util:** snippets split, improved, and lint ([#1419](https://github.com/awslabs/aws-lambda-powertools-python/issues/1419)) +* **layer:** upgrade to 1.27.0 +* **layer:** upgrade to 1.27.0 * **middleware-factory:** snippets split, improved, and lint ([#1451](https://github.com/awslabs/aws-lambda-powertools-python/issues/1451)) -* **nav:** make REST and GraphQL event handlers more explicit ([#959](https://github.com/awslabs/aws-lambda-powertools-python/issues/959)) -* **parameters:** add testing your code section ([#1017](https://github.com/awslabs/aws-lambda-powertools-python/issues/1017)) -* **parameters:** auto-transforming values based on suffix ([#573](https://github.com/awslabs/aws-lambda-powertools-python/issues/573)) -* **parser:** minor grammar fix ([#1427](https://github.com/awslabs/aws-lambda-powertools-python/issues/1427)) -* **parser:** fix incorrect import in root_validator example ([#735](https://github.com/awslabs/aws-lambda-powertools-python/issues/735)) * **parser:** minor grammar fix ([#1427](https://github.com/awslabs/aws-lambda-powertools-python/issues/1427)) -* **parser:** APIGatewayProxyEvent to APIGatewayProxyEventModel ([#1061](https://github.com/awslabs/aws-lambda-powertools-python/issues/1061)) -* **parser:** fix table and heading syntax -* **plugin:** add mermaid to create diagram as code ([#1070](https://github.com/awslabs/aws-lambda-powertools-python/issues/1070)) -* **quickstart:** make section agnostic to json lib -* **quickstart:** expand on intro line -* **quickstart:** tidy requirements up -* **quickstart:** sentence fragmentation, tidy up -* **quickstart:** same process for Logger -* **quickstart:** add sub-sections, fix highlight & code -* **readme:** add code coverage badge ([#577](https://github.com/awslabs/aws-lambda-powertools-python/issues/577)) -* **roadmap:** use pinned pause issue instead -* **roadmap:** add new roadmap section ([#1204](https://github.com/awslabs/aws-lambda-powertools-python/issues/1204)) -* **tenets:** make core, non-core more explicit -* **tenets:** update Idiomatic tenet to Progressive ([#823](https://github.com/awslabs/aws-lambda-powertools-python/issues/823)) -* **theme:** upgrade mkdocs-material to 8.x ([#1002](https://github.com/awslabs/aws-lambda-powertools-python/issues/1002)) -* **tracer:** warning to note on local traces -* **tracer:** update ServiceLens image w/ API GW, copywriting -* **tracer:** new ignore_endpoint feature ([#931](https://github.com/awslabs/aws-lambda-powertools-python/issues/931)) -* **tracer:** split and lint code snippets ([#1260](https://github.com/awslabs/aws-lambda-powertools-python/issues/1260)) -* **tracer:** snippets split, improved, and lint ([#1261](https://github.com/awslabs/aws-lambda-powertools-python/issues/1261)) -* **tracer:** additional scenario when to disable auto-capture ([#499](https://github.com/awslabs/aws-lambda-powertools-python/issues/499)) -* **tracer:** add annotation, metadata, and image -* **tracer:** add initial image, requirements -* **tracer:** Fix line highlighting ([#395](https://github.com/awslabs/aws-lambda-powertools-python/issues/395)) -* **tracer:** update wording that it auto-disables on non-Lambda env -* **tutorial:** fix broken internal links ([#1000](https://github.com/awslabs/aws-lambda-powertools-python/issues/1000)) -* **tutorial:** fix path to images ([#963](https://github.com/awslabs/aws-lambda-powertools-python/issues/963)) * **typing:** snippets split, improved, and lint ([#1465](https://github.com/awslabs/aws-lambda-powertools-python/issues/1465)) * **validation:** snippets split, improved, and lint ([#1449](https://github.com/awslabs/aws-lambda-powertools-python/issues/1449)) ## Features -* expose jmespath powertools functions ([#736](https://github.com/awslabs/aws-lambda-powertools-python/issues/736)) -* add support to persist default dimensions ([#410](https://github.com/awslabs/aws-lambda-powertools-python/issues/410)) -* add get_raw_configuration property in store; expose store -* boto3 sessions in batch, parameters & idempotency ([#717](https://github.com/awslabs/aws-lambda-powertools-python/issues/717)) -* **api-gateway:** add support for custom serializer ([#568](https://github.com/awslabs/aws-lambda-powertools-python/issues/568)) -* **api-gateway:** add debug mode ([#507](https://github.com/awslabs/aws-lambda-powertools-python/issues/507)) -* **api-gateway:** add common service errors ([#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506)) -* **apigateway:** access parent api resolver from router ([#842](https://github.com/awslabs/aws-lambda-powertools-python/issues/842)) -* **apigateway:** add exception_handler support ([#898](https://github.com/awslabs/aws-lambda-powertools-python/issues/898)) -* **apigateway:** add Router to allow large routing composition ([#645](https://github.com/awslabs/aws-lambda-powertools-python/issues/645)) -* **appsync:** add Router to allow large resolver composition ([#776](https://github.com/awslabs/aws-lambda-powertools-python/issues/776)) -* **batch:** new BatchProcessor for SQS, DynamoDB, Kinesis ([#886](https://github.com/awslabs/aws-lambda-powertools-python/issues/886)) -* **ci:** auto-notify & close issues on release -* **ci:** add actionlint in pre-commit hook +* **parser:** add support for Lambda Function URL ([#1442](https://github.com/awslabs/aws-lambda-powertools-python/issues/1442)) + +## Maintenance + +* **batch:** deprecate sqs_batch_processor ([#1463](https://github.com/awslabs/aws-lambda-powertools-python/issues/1463)) +* **ci:** prevent concurrent git update in critical workflows ([#1478](https://github.com/awslabs/aws-lambda-powertools-python/issues/1478)) +* **ci:** disable e2e py version matrix due to concurrent locking +* **ci:** revert e2e py version matrix +* **ci:** temp disable e2e matrix +* **ci:** update changelog with latest changes +* **ci:** update changelog with latest changes +* **ci:** reduce payload and only send prod notification +* **ci:** remove area/utilities conflicting label +* **ci:** include py version in stack and cache lock +* **ci:** remove conventional changelog commit to reduce noise +* **ci:** update changelog with latest changes +* **deps:** bump release-drafter/release-drafter from 5.20.0 to 5.20.1 ([#1458](https://github.com/awslabs/aws-lambda-powertools-python/issues/1458)) +* **deps:** bump pydantic from 1.9.1 to 1.9.2 ([#1448](https://github.com/awslabs/aws-lambda-powertools-python/issues/1448)) +* **deps-dev:** bump flake8-bugbear from 22.8.22 to 22.8.23 ([#1473](https://github.com/awslabs/aws-lambda-powertools-python/issues/1473)) +* **deps-dev:** bump types-requests from 2.28.7 to 2.28.8 ([#1423](https://github.com/awslabs/aws-lambda-powertools-python/issues/1423)) +* **maintainer:** add Leandro as maintainer ([#1468](https://github.com/awslabs/aws-lambda-powertools-python/issues/1468)) +* **tests:** build and deploy Lambda Layer stack once ([#1466](https://github.com/awslabs/aws-lambda-powertools-python/issues/1466)) +* **tests:** refactor E2E test mechanics to ease maintenance, writing tests and parallelization ([#1444](https://github.com/awslabs/aws-lambda-powertools-python/issues/1444)) +* **tests:** enable end-to-end test workflow ([#1470](https://github.com/awslabs/aws-lambda-powertools-python/issues/1470)) +* **tests:** refactor E2E logger to ease maintenance, writing tests and parallelization ([#1460](https://github.com/awslabs/aws-lambda-powertools-python/issues/1460)) +* **tests:** refactor E2E tracer to ease maintenance, writing tests and parallelization ([#1457](https://github.com/awslabs/aws-lambda-powertools-python/issues/1457)) + +## Reverts +* fix(ci): add explicit origin to fix release detached head + + + +## [v1.27.0] - 2022-08-05 +## Bug Fixes + +* **ci:** changelog workflow must receive git tags too +* **ci:** add additional input to accurately describe intent on skip +* **ci:** job permissions +* **event_sources:** add test for Function URL AuthZ ([#1421](https://github.com/awslabs/aws-lambda-powertools-python/issues/1421)) + +## Documentation + +* **layer:** upgrade to 1.26.7 + +## Features + * **ci:** create reusable changelog generation ([#1418](https://github.com/awslabs/aws-lambda-powertools-python/issues/1418)) -* **ci:** create reusable changelog generation * **ci:** include changelog generation on docs build -* **data-classes:** decorator to instantiate data_classes and docs updates ([#442](https://github.com/awslabs/aws-lambda-powertools-python/issues/442)) -* **data-classes:** decode json_body if based64 encoded ([#560](https://github.com/awslabs/aws-lambda-powertools-python/issues/560)) -* **data-classes:** support for code pipeline job event ([#416](https://github.com/awslabs/aws-lambda-powertools-python/issues/416)) -* **data-classes:** AppSync Lambda authorizer event ([#610](https://github.com/awslabs/aws-lambda-powertools-python/issues/610)) -* **data-classes:** ActiveMQ and RabbitMQ support ([#770](https://github.com/awslabs/aws-lambda-powertools-python/issues/770)) -* **data-classes:** decode base64 encoded body ([#425](https://github.com/awslabs/aws-lambda-powertools-python/issues/425)) -* **data-classes:** authorizer for http api and rest api ([#620](https://github.com/awslabs/aws-lambda-powertools-python/issues/620)) -* **data-classes:** add AttributeValueType to DynamoDBStreamEvent ([#462](https://github.com/awslabs/aws-lambda-powertools-python/issues/462)) -* **data-classes:** data_as_bytes prop KinesisStreamRecordPayload ([#628](https://github.com/awslabs/aws-lambda-powertools-python/issues/628)) -* **event-handle:** allow for cors=None setting ([#421](https://github.com/awslabs/aws-lambda-powertools-python/issues/421)) -* **event-handler:** Support AppSyncResolverEvent subclassing ([#526](https://github.com/awslabs/aws-lambda-powertools-python/issues/526)) -* **event-handler:** prefixes to strip for custom mappings ([#579](https://github.com/awslabs/aws-lambda-powertools-python/issues/579)) -* **event-handler:** new resolvers to fix current_event typing ([#978](https://github.com/awslabs/aws-lambda-powertools-python/issues/978)) -* **event-handler:** add http ProxyEvent handler ([#369](https://github.com/awslabs/aws-lambda-powertools-python/issues/369)) -* **event-sources:** cache parsed json in data class ([#909](https://github.com/awslabs/aws-lambda-powertools-python/issues/909)) -* **event_handler:** improved support for headers and cookies in v2 ([#1455](https://github.com/awslabs/aws-lambda-powertools-python/issues/1455)) -* **event_handler:** add cookies as 1st class citizen in v2 ([#1487](https://github.com/awslabs/aws-lambda-powertools-python/issues/1487)) +* **ci:** create reusable changelog generation * **event_handlers:** Add support for Lambda Function URLs ([#1408](https://github.com/awslabs/aws-lambda-powertools-python/issues/1408)) -* **event_sources:** add CloudWatch dashboard custom widget event ([#1474](https://github.com/awslabs/aws-lambda-powertools-python/issues/1474)) -* **feat-toggle:** New simple feature toggles rule engine (WIP) ([#494](https://github.com/awslabs/aws-lambda-powertools-python/issues/494)) -* **feature flags:** Add not_in action and rename contains to in ([#589](https://github.com/awslabs/aws-lambda-powertools-python/issues/589)) -* **feature-flags:** get_raw_configuration property in Store ([#720](https://github.com/awslabs/aws-lambda-powertools-python/issues/720)) -* **feature-flags:** improve "IN/NOT_IN"; new rule actions ([#710](https://github.com/awslabs/aws-lambda-powertools-python/issues/710)) -* **feature-flags:** Bring your own logger for debug ([#709](https://github.com/awslabs/aws-lambda-powertools-python/issues/709)) -* **feature_flags:** support beyond boolean values (JSON values) ([#804](https://github.com/awslabs/aws-lambda-powertools-python/issues/804)) -* **feature_flags:** Added inequality conditions ([#721](https://github.com/awslabs/aws-lambda-powertools-python/issues/721)) -* **general:** support for Python 3.9 ([#626](https://github.com/awslabs/aws-lambda-powertools-python/issues/626)) -* **idempotency:** handle lambda timeout scenarios for INPROGRESS records ([#1387](https://github.com/awslabs/aws-lambda-powertools-python/issues/1387)) -* **idempotency:** support dataclasses & pydantic models payloads ([#908](https://github.com/awslabs/aws-lambda-powertools-python/issues/908)) -* **idempotency:** support for any synchronous function ([#625](https://github.com/awslabs/aws-lambda-powertools-python/issues/625)) -* **idempotency:** makes customers unit testing easier ([#719](https://github.com/awslabs/aws-lambda-powertools-python/issues/719)) -* **logger:** allow handler with custom kwargs signature ([#913](https://github.com/awslabs/aws-lambda-powertools-python/issues/913)) -* **logger:** add option to clear state per invocation -* **logger:** add ALB correlation ID support ([#816](https://github.com/awslabs/aws-lambda-powertools-python/issues/816)) -* **logger:** add option to clear state per invocation ([#467](https://github.com/awslabs/aws-lambda-powertools-python/issues/467)) -* **logger:** support use_datetime_directive for timestamps ([#920](https://github.com/awslabs/aws-lambda-powertools-python/issues/920)) -* **logger:** log_event support event data classes (e.g. S3Event) ([#984](https://github.com/awslabs/aws-lambda-powertools-python/issues/984)) -* **logger:** clone powertools logger config to any Python logger ([#927](https://github.com/awslabs/aws-lambda-powertools-python/issues/927)) -* **logger:** add get_correlation_id method ([#516](https://github.com/awslabs/aws-lambda-powertools-python/issues/516)) * **metrics:** update max user-defined dimensions from 9 to 29 ([#1417](https://github.com/awslabs/aws-lambda-powertools-python/issues/1417)) -* **mypy:** complete mypy support for the entire codebase ([#943](https://github.com/awslabs/aws-lambda-powertools-python/issues/943)) -* **mypy:** add mypy support to makefile ([#508](https://github.com/awslabs/aws-lambda-powertools-python/issues/508)) -* **parameters:** add clear_cache method for providers ([#1194](https://github.com/awslabs/aws-lambda-powertools-python/issues/1194)) -* **parameters:** accept boto3_client to support private endpoints and ease testing ([#1096](https://github.com/awslabs/aws-lambda-powertools-python/issues/1096)) -* **params:** expose high level max_age, raise_on_transform_error ([#567](https://github.com/awslabs/aws-lambda-powertools-python/issues/567)) -* **parser:** security issue in Pydantic [#436](https://github.com/awslabs/aws-lambda-powertools-python/issues/436) ([#437](https://github.com/awslabs/aws-lambda-powertools-python/issues/437)) -* **parser:** Support for API GW v1 proxy schema & envelope ([#403](https://github.com/awslabs/aws-lambda-powertools-python/issues/403)) -* **parser:** add support for Lambda Function URL ([#1442](https://github.com/awslabs/aws-lambda-powertools-python/issues/1442)) -* **parser:** add support for API Gateway HTTP API [#434](https://github.com/awslabs/aws-lambda-powertools-python/issues/434) ([#441](https://github.com/awslabs/aws-lambda-powertools-python/issues/441)) -* **tracer:** disable tracer when for non-Lambda envs ([#598](https://github.com/awslabs/aws-lambda-powertools-python/issues/598)) -* **tracer:** ignore tracing for certain hostname(s) or url(s) ([#910](https://github.com/awslabs/aws-lambda-powertools-python/issues/910)) -* **tracer:** add service annotation when service is set ([#861](https://github.com/awslabs/aws-lambda-powertools-python/issues/861)) -* **validator:** include missing data elements from a validation error ([#686](https://github.com/awslabs/aws-lambda-powertools-python/issues/686)) ## Maintenance -* bump to 1.20.2 -* bump to 1.15.1 -* bump to 1.16.0 -* bump to 1.16.1 -* trial boring cyborg automation -* include regression in changelog -* bump to 1.25.10 -* assited changelog pre-generation, auto-label PR ([#443](https://github.com/awslabs/aws-lambda-powertools-python/issues/443)) -* bump to 1.21.0 -* bump to 1.25.9 -* bump to 1.25.8 -* bump to 1.25.7 -* bump to 1.25.6 -* bump to 1.25.5 -* bump to 1.25.4 -* bump to 1.26.2 -* enable dependabot for dep upgrades ([#444](https://github.com/awslabs/aws-lambda-powertools-python/issues/444)) -* enable mergify ([#450](https://github.com/awslabs/aws-lambda-powertools-python/issues/450)) -* remove duplicate test -* comment reason for change -* remove unnecessary test -* lint unused import -* bump to 1.25.3 -* bump version 1.26.1 -* bump to 1.25.2 -* add sam build gitignore -* dependabot/mergify guardrail for major versions -* move to approach B for multiple IaC -* bump to 1.25.1 -* bump to 1.25.0 -* correct docs -* correct docs -* fix dependabot commit messages prefix -* fix dependabot unique set config -* bump mkdocs-material from 7.1.5 to 7.1.6 ([#451](https://github.com/awslabs/aws-lambda-powertools-python/issues/451)) -* bump boto3 from 1.17.78 to 1.17.84 ([#449](https://github.com/awslabs/aws-lambda-powertools-python/issues/449)) -* bump to version 1.26.3 -* bump xenon from 0.7.1 to 0.7.3 ([#446](https://github.com/awslabs/aws-lambda-powertools-python/issues/446)) -* bump actions/setup-python from 1 to 2.2.2 ([#445](https://github.com/awslabs/aws-lambda-powertools-python/issues/445)) -* update mergify to require approval on dependabot ([#456](https://github.com/awslabs/aws-lambda-powertools-python/issues/456)) -* fix path for PR auto-labelling -* use isinstance over type -* bump to 1.24.2 -* reintroduce codecov token -* ignore codecov upload -* bump to 1.24.1 -* bump to 1.24.1 -* bump to 1.24.0 -* bump to 1.23.0 -* minor housekeeping before release ([#912](https://github.com/awslabs/aws-lambda-powertools-python/issues/912)) -* correct pr label order -* bump to 1.22.0 -* conditional to publish docs only attempt 3 -* conditional to publish docs only attempt 2 -* conditional to publish docs only -* remove Lambda Layer version tag -* fix var expr -* bump to 1.21.1 -* include dependencies label under maintenance -* include regression in changelog -* fix changelog file redirection -* bump version to 1.17.0 -* ignore constants in test cov ([#745](https://github.com/awslabs/aws-lambda-powertools-python/issues/745)) -* ignore constants in tests cov -* bump 1.17.1 ([#502](https://github.com/awslabs/aws-lambda-powertools-python/issues/502)) -* bump 1.18.0 ([#547](https://github.com/awslabs/aws-lambda-powertools-python/issues/547)) -* bump 1.18.1 -* bump to 1.15.0 ([#422](https://github.com/awslabs/aws-lambda-powertools-python/issues/422)) -* enable autolabel based on PR title -* only build docs on docs path -* bump to 1.19.0 -* update pypi description, keywords -* include feature-flags docs hotfix -* add support for publishing fallback +* **ci:** sync area labels to prevent dedup +* **ci:** update changelog with latest changes +* **ci:** update changelog with latest changes +* **ci:** add manual trigger for docs +* **ci:** update changelog with latest changes +* **ci:** temporarily disable changelog push on release +* **ci:** update changelog with latest changes +* **ci:** move changelog generation to rebuild_latest_doc workflow +* **ci:** update project with version +* **ci:** update release automated activities +* **ci:** readd changelog step on release +* **ci:** move changelog generation to rebuild_latest_doc workflow +* **ci:** drop 3.6 from workflows +* **deps:** bump constructs from 10.1.1 to 10.1.60 ([#1399](https://github.com/awslabs/aws-lambda-powertools-python/issues/1399)) +* **deps:** bump constructs from 10.1.1 to 10.1.66 ([#1414](https://github.com/awslabs/aws-lambda-powertools-python/issues/1414)) +* **deps:** bump jsii from 1.57.0 to 1.63.2 ([#1400](https://github.com/awslabs/aws-lambda-powertools-python/issues/1400)) +* **deps:** bump constructs from 10.1.1 to 10.1.64 ([#1405](https://github.com/awslabs/aws-lambda-powertools-python/issues/1405)) +* **deps:** bump attrs from 21.4.0 to 22.1.0 ([#1397](https://github.com/awslabs/aws-lambda-powertools-python/issues/1397)) +* **deps:** bump constructs from 10.1.1 to 10.1.63 ([#1402](https://github.com/awslabs/aws-lambda-powertools-python/issues/1402)) +* **deps:** bump constructs from 10.1.1 to 10.1.65 ([#1407](https://github.com/awslabs/aws-lambda-powertools-python/issues/1407)) +* **deps-dev:** bump types-requests from 2.28.5 to 2.28.6 ([#1401](https://github.com/awslabs/aws-lambda-powertools-python/issues/1401)) +* **deps-dev:** bump types-requests from 2.28.6 to 2.28.7 ([#1406](https://github.com/awslabs/aws-lambda-powertools-python/issues/1406)) +* **docs:** remove pause sentence from roadmap ([#1409](https://github.com/awslabs/aws-lambda-powertools-python/issues/1409)) +* **docs:** update site name to test ci changelog +* **docs:** update CHANGELOG for v1.26.7 +* **docs:** update description to trigger changelog generation +* **governance:** remove devcontainer in favour of gitpod.io ([#1411](https://github.com/awslabs/aws-lambda-powertools-python/issues/1411)) +* **governance:** add pre-configured dev environment with GitPod.io to ease contributions ([#1403](https://github.com/awslabs/aws-lambda-powertools-python/issues/1403)) +* **layers:** upgrade cdk dep hashes to prevent ci fail + + + +## [v1.26.7] - 2022-07-29 +## Bug Fixes + +* **ci:** add missing oidc token generation permission +* **event_handlers:** ImportError when importing Response from top-level event_handler ([#1388](https://github.com/awslabs/aws-lambda-powertools-python/issues/1388)) + +## Documentation + +* **examples:** enforce and fix all mypy errors ([#1393](https://github.com/awslabs/aws-lambda-powertools-python/issues/1393)) + +## Features + +* **idempotency:** handle lambda timeout scenarios for INPROGRESS records ([#1387](https://github.com/awslabs/aws-lambda-powertools-python/issues/1387)) + +## Maintenance + +* **ci:** increase skip_pypi logic to cover tests/changelog on re-run failures +* **ci:** update project with version 1.26.6 +* **ci:** drop 3.6 from workflows ([#1395](https://github.com/awslabs/aws-lambda-powertools-python/issues/1395)) +* **ci:** add conditional to skip pypi release ([#1366](https://github.com/awslabs/aws-lambda-powertools-python/issues/1366)) +* **ci:** remove leftover logic from on_merged_pr workflow +* **ci:** update project with version 1.26.6 +* **ci:** update project with version 1.26.6 +* **deps:** bump jsii from 1.57.0 to 1.63.1 ([#1390](https://github.com/awslabs/aws-lambda-powertools-python/issues/1390)) +* **deps:** bump constructs from 10.1.1 to 10.1.59 ([#1396](https://github.com/awslabs/aws-lambda-powertools-python/issues/1396)) +* **deps-dev:** bump flake8-isort from 4.1.1 to 4.1.2.post0 ([#1384](https://github.com/awslabs/aws-lambda-powertools-python/issues/1384)) +* **layers:** bump to 1.26.6 using layer v26 +* **maintainers:** add Ruben as a maintainer ([#1392](https://github.com/awslabs/aws-lambda-powertools-python/issues/1392)) + + + +## [v1.26.6] - 2022-07-25 +## Bug Fixes + +* **ci:** remove unsupported env in workflow_call +* **ci:** allow inherit secrets for reusable workflow +* **ci:** remove unused secret +* **ci:** label_related_issue unresolved var from history mixup +* **ci:** cond doesnt support two expr w/ env +* **ci:** only event is resolved in cond +* **ci:** unexpected symbol due to double quotes... +* **event_handlers:** handle lack of headers when using auto-compression feature ([#1325](https://github.com/awslabs/aws-lambda-powertools-python/issues/1325)) + +## Maintenance + * dummy for PR test * print full event depth * print full workflow event depth * debug full event -* bump to 1.20.0 -* update changelog to reflect out-of-band commits -* add python 3.9 support -* update new changelog version tag -* setup codespaces ([#637](https://github.com/awslabs/aws-lambda-powertools-python/issues/637)) -* markdown linter fixes ([#636](https://github.com/awslabs/aws-lambda-powertools-python/issues/636)) * remove leftover from fork one more time -* include public layers changelog -* bump to 1.20.1 -* bump to 1.26.0 -* **actions:** include new labels -* **api-docs:** enable allow_reuse to fix the docs ([#612](https://github.com/awslabs/aws-lambda-powertools-python/issues/612)) -* **bandit:** update baseline -* **batch:** deprecate sqs_batch_processor ([#1463](https://github.com/awslabs/aws-lambda-powertools-python/issues/1463)) -* **ci:** remove leftover logic from on_merged_pr workflow -* **ci:** update project with version 1.26.6 -* **ci:** use gh environment for beta and prod layer deploy ([#1356](https://github.com/awslabs/aws-lambda-powertools-python/issues/1356)) -* **ci:** remove core group from codeowners ([#1358](https://github.com/awslabs/aws-lambda-powertools-python/issues/1358)) -* **ci:** use OIDC and encrypt release secrets ([#1355](https://github.com/awslabs/aws-lambda-powertools-python/issues/1355)) -* **ci:** introduce codeowners ([#1352](https://github.com/awslabs/aws-lambda-powertools-python/issues/1352)) -* **ci:** drop 3.6 from workflows ([#1395](https://github.com/awslabs/aws-lambda-powertools-python/issues/1395)) -* **ci:** lockdown workflow_run by origin ([#1350](https://github.com/awslabs/aws-lambda-powertools-python/issues/1350)) -* **ci:** test upstream job skip * **ci:** test env expr +* **ci:** test upstream job skip +* **ci:** lockdown workflow_run by origin ([#1350](https://github.com/awslabs/aws-lambda-powertools-python/issues/1350)) * **ci:** test default env * **ci:** experiment hardening origin -* **ci:** temporarily disable changelog push on release -* **ci:** move changelog generation to rebuild_latest_doc workflow -* **ci:** update project with version -* **ci:** move changelog generation to rebuild_latest_doc workflow -* **ci:** drop 3.6 from workflows +* **ci:** experiment hardening origin +* **ci:** introduce codeowners ([#1352](https://github.com/awslabs/aws-lambda-powertools-python/issues/1352)) +* **ci:** use OIDC and encrypt release secrets ([#1355](https://github.com/awslabs/aws-lambda-powertools-python/issues/1355)) +* **ci:** remove core group from codeowners ([#1358](https://github.com/awslabs/aws-lambda-powertools-python/issues/1358)) * **ci:** confirm workflow_run event -* **ci:** update project with version 1.26.6 -* **ci:** readd changelog step on release -* **ci:** update release automated activities -* **ci:** update changelog with latest changes -* **ci:** update changelog with latest changes -* **ci:** add conditional to skip pypi release ([#1366](https://github.com/awslabs/aws-lambda-powertools-python/issues/1366)) -* **ci:** add manual trigger for docs -* **ci:** update changelog with latest changes +* **ci:** use gh environment for beta and prod layer deploy ([#1356](https://github.com/awslabs/aws-lambda-powertools-python/issues/1356)) * **ci:** update project with version 1.26.5 -* **ci:** update changelog with latest changes -* **ci:** sync area labels to prevent dedup -* **ci:** update changelog with latest changes +* **deps:** bump constructs from 10.1.1 to 10.1.52 ([#1343](https://github.com/awslabs/aws-lambda-powertools-python/issues/1343)) +* **deps-dev:** bump mypy-boto3-cloudwatch from 1.24.0 to 1.24.35 ([#1342](https://github.com/awslabs/aws-lambda-powertools-python/issues/1342)) +* **governance:** update wording tech debt to summary in maintenance template +* **governance:** add new maintenance issue template for tech debt ([#1326](https://github.com/awslabs/aws-lambda-powertools-python/issues/1326)) +* **layers:** layer canary stack should not hardcode resource name +* **layers:** replace layers account secret ([#1329](https://github.com/awslabs/aws-lambda-powertools-python/issues/1329)) +* **layers:** expand to all aws commercial regions ([#1324](https://github.com/awslabs/aws-lambda-powertools-python/issues/1324)) +* **layers:** bump to 1.26.5 + +## Pull Requests + +* Merge pull request [#285](https://github.com/awslabs/aws-lambda-powertools-python/issues/285) from heitorlessa/chore/skip-dep-workflow +* Merge pull request [#284](https://github.com/awslabs/aws-lambda-powertools-python/issues/284) from heitorlessa/chore/dummy + + + +## [v1.26.5] - 2022-07-20 +## Bug Fixes + +* mathc the name of the cdk synth from the build phase +* typo in input for layer workflow +* no need to cache npm since we only install cdk cli and don't have .lock files +* add entire ARN role instead of account and role name +* path to artefact +* unzip the right artifact name +* download artefact into the layer dir +* sight, yes a whitespace character breaks the build +* **ci:** checkout project before validating related issue workflow +* **ci:** install poetry before calling setup/python with cache ([#1315](https://github.com/awslabs/aws-lambda-powertools-python/issues/1315)) +* **ci:** remove additional quotes in PR action ([#1317](https://github.com/awslabs/aws-lambda-powertools-python/issues/1317)) +* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) +* **ci:** fetch all git info so we can check tags +* **ci:** lambda layer workflow release version and conditionals ([#1316](https://github.com/awslabs/aws-lambda-powertools-python/issues/1316)) +* **ci:** keep layer version permission ([#1318](https://github.com/awslabs/aws-lambda-powertools-python/issues/1318)) +* **ci:** regex to catch combination of related issues workflow +* **deps:** correct mypy types as dev dependency ([#1322](https://github.com/awslabs/aws-lambda-powertools-python/issues/1322)) +* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) + +## Documentation + +* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) +* **governance:** typos on PR template fixes [#1314](https://github.com/awslabs/aws-lambda-powertools-python/issues/1314) +* **governance:** add security doc to the root + +## Maintenance + +* **ci:** limits concurrency for docs workflow * **ci:** adds caching when installing python dependencies ([#1311](https://github.com/awslabs/aws-lambda-powertools-python/issues/1311)) * **ci:** update project with version 1.26.4 +* **ci:** fix reference error in related_issue +* **deps:** bump constructs from 10.1.1 to 10.1.51 ([#1323](https://github.com/awslabs/aws-lambda-powertools-python/issues/1323)) +* **deps-dev:** bump mypy from 0.961 to 0.971 ([#1320](https://github.com/awslabs/aws-lambda-powertools-python/issues/1320)) +* **governance:** fix typo on semantic commit link introduced in [#1](https://github.com/awslabs/aws-lambda-powertools-python/issues/1)aef4 +* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) +* **layers:** bump to 22 for 1.26.3 + + + +## [v1.26.4] - 2022-07-18 +## Bug Fixes + +* **ci:** checkout project before validating related issue workflow +* **ci:** fixes typos and small issues on github scripts ([#1302](https://github.com/awslabs/aws-lambda-powertools-python/issues/1302)) +* **ci:** address conditional type on_merge +* **ci:** address pr title semantic not found logic +* **ci:** address gh-actions additional quotes; remove debug +* **ci:** regex group name for on_merge workflow +* **ci:** escape outputs as certain PRs can break GH Actions expressions +* **ci:** move conditionals from yaml to code; leftover +* **ci:** move conditionals from yaml to code +* **ci:** accept core arg in label related issue workflow +* **ci:** match the name of the cdk synth from the build phase +* **ci:** regex to catch combination of related issues workflow +* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) +* **parser:** raise ValidationError when SNS->SQS keys are intentionally missing ([#1299](https://github.com/awslabs/aws-lambda-powertools-python/issues/1299)) + +## Documentation + +* **event-handler:** snippets split, improved, and lint ([#1279](https://github.com/awslabs/aws-lambda-powertools-python/issues/1279)) +* **graphql:** snippets split, improved, and lint ([#1287](https://github.com/awslabs/aws-lambda-powertools-python/issues/1287)) +* **homepage:** emphasize additional powertools languages ([#1292](https://github.com/awslabs/aws-lambda-powertools-python/issues/1292)) +* **metrics:** snippets split, improved, and lint + +## Maintenance + * **ci:** increase release automation and limit to one manual step ([#1297](https://github.com/awslabs/aws-lambda-powertools-python/issues/1297)) -* **ci:** update changelog with latest changes -* **ci:** split latest docs workflow -* **ci:** update changelog with latest changes +* **ci:** make export PR reusable +* **ci:** auto-merge cdk lib and lambda layer construct +* **ci:** convert inline gh-script to file * **ci:** lockdown 3rd party workflows to pin sha ([#1301](https://github.com/awslabs/aws-lambda-powertools-python/issues/1301)) * **ci:** automatically add area label based on title ([#1300](https://github.com/awslabs/aws-lambda-powertools-python/issues/1300)) -* **ci:** reduce payload and only send prod notification +* **ci:** disable output debugging as pr body isnt accepted * **ci:** experiment with conditional on outputs * **ci:** improve error handling for non-issue numbers * **ci:** add end to end testing mechanism ([#1247](https://github.com/awslabs/aws-lambda-powertools-python/issues/1247)) -* **ci:** update changelog with latest changes -* **ci:** update changelog with latest changes -* **ci:** safely label PR based on title -* **ci:** update mergify bot breaking change -* **ci:** remove mergify legacy key -* **ci:** disable output debugging as pr body isnt accepted -* **ci:** add queue name in mergify -* **ci:** fix mergify dependabot queue -* **ci:** auto-merge cdk lib and lambda layer construct -* **ci:** run codeql analysis on push only -* **ci:** move all scripts under .github/scripts +* **ci:** limits concurrency for docs workflow +* **ci:** fix reference error in related_issue * **ci:** move error prone env to code as constants -* **ci:** make export PR reusable -* **ci:** convert inline gh-script to file -* **ci:** fix reference error in related_issue -* **ci:** update changelog with latest changes -* **ci:** limits concurrency for docs workflow -* **ci:** update changelog with latest changes -* **ci:** fix reference error in related_issue -* **ci:** remove area/utilities conflicting label -* **ci:** limits concurrency for docs workflow -* **ci:** remove conventional changelog commit to reduce noise -* **ci:** update project with version 1.26.6 +* **ci:** move all scripts under .github/scripts +* **deps:** bump cdk-lambda-powertools-python-layer ([#1284](https://github.com/awslabs/aws-lambda-powertools-python/issues/1284)) +* **deps:** bump jsii from 1.61.0 to 1.62.0 ([#1294](https://github.com/awslabs/aws-lambda-powertools-python/issues/1294)) +* **deps:** bump constructs from 10.1.1 to 10.1.46 ([#1306](https://github.com/awslabs/aws-lambda-powertools-python/issues/1306)) +* **deps:** bump actions/setup-node from 2 to 3 ([#1281](https://github.com/awslabs/aws-lambda-powertools-python/issues/1281)) +* **deps:** bump fastjsonschema from 2.15.3 to 2.16.1 ([#1309](https://github.com/awslabs/aws-lambda-powertools-python/issues/1309)) +* **deps:** bump constructs from 10.1.1 to 10.1.49 ([#1308](https://github.com/awslabs/aws-lambda-powertools-python/issues/1308)) +* **deps:** bump attrs from 21.2.0 to 21.4.0 ([#1282](https://github.com/awslabs/aws-lambda-powertools-python/issues/1282)) +* **deps:** bump aws-cdk-lib from 2.29.0 to 2.31.1 ([#1290](https://github.com/awslabs/aws-lambda-powertools-python/issues/1290)) +* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.12 to 1.24.27 ([#1293](https://github.com/awslabs/aws-lambda-powertools-python/issues/1293)) +* **deps-dev:** bump mypy-boto3-appconfig from 1.24.0 to 1.24.29 ([#1295](https://github.com/awslabs/aws-lambda-powertools-python/issues/1295)) +* **governance:** remove any step relying on master branch +* **governance:** update emeritus affiliation +* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) +* **layers:** bump to 22 for 1.26.3 + + + +## [v1.26.3] - 2022-07-04 +## Bug Fixes + +* **ci:** remove utf-8 body in octokit body req +* **ci:** improve msg visibility on closed issues +* **ci:** disable merged_pr workflow +* **ci:** merged_pr add issues write access +* **ci:** quote prBody GH expr on_opened_pr +* **ci:** reusable workflow secrets param +* **logger:** support additional args for handlers when injecting lambda context ([#1276](https://github.com/awslabs/aws-lambda-powertools-python/issues/1276)) +* **logger:** preserve std keys when using custom formatters ([#1264](https://github.com/awslabs/aws-lambda-powertools-python/issues/1264)) + +## Documentation + +* **lint:** add markdownlint rules and automation ([#1256](https://github.com/awslabs/aws-lambda-powertools-python/issues/1256)) +* **logger:** document enriching logs with logrecord attributes ([#1271](https://github.com/awslabs/aws-lambda-powertools-python/issues/1271)) +* **logger:** snippets split, improved, and lint ([#1262](https://github.com/awslabs/aws-lambda-powertools-python/issues/1262)) +* **metrics:** snippets split, improved, and lint ([#1272](https://github.com/awslabs/aws-lambda-powertools-python/issues/1272)) +* **tracer:** snippets split, improved, and lint ([#1261](https://github.com/awslabs/aws-lambda-powertools-python/issues/1261)) +* **tracer:** split and lint code snippets ([#1260](https://github.com/awslabs/aws-lambda-powertools-python/issues/1260)) + +## Maintenance + +* move to approach B for multiple IaC +* add sam build gitignore +* bump to version 1.26.3 * **ci:** reactivate on_merged_pr workflow -* **ci:** temp disable e2e matrix -* **ci:** include py version in stack and cache lock -* **ci:** revert e2e py version matrix -* **ci:** disable e2e py version matrix due to concurrent locking * **ci:** improve wording on closed issues action * **ci:** deactivate on_merged_pr workflow -* **ci:** prevent concurrent git update in critical workflows ([#1478](https://github.com/awslabs/aws-lambda-powertools-python/issues/1478)) -* **ci:** limit E2E workflow run for source code change -* **ci:** remove unused and undeclared OS matrix env -* **ci:** fix invalid dependency leftover -* **ci:** remove dangling debug step -* **ci:** add linter for GitHub Actions as pre-commit hook ([#1479](https://github.com/awslabs/aws-lambda-powertools-python/issues/1479)) -* **ci:** add workflow to suggest splitting large PRs ([#1480](https://github.com/awslabs/aws-lambda-powertools-python/issues/1480)) -* **ci:** enable ci checks for v2 -* **ci:** record pr details upon labeling -* **ci:** destructure assignment on comment_large_pr -* **ci:** add note for state persistence on comment_large_pr -* **ci:** format comment on comment_large_pr script -* **ci:** create reusable docs publishing workflow ([#1482](https://github.com/awslabs/aws-lambda-powertools-python/issues/1482)) -* **ci:** create docs workflow for v2 -* **ci:** create adhoc docs workflow for v2 -* **ci:** disable mergify configuration after breaking changes ([#1188](https://github.com/awslabs/aws-lambda-powertools-python/issues/1188)) -* **ci:** create adhoc docs workflow for v2 -* **ci:** changelog pre-generation to fetch tags from origin -* **ci:** sync package version with pypi -* **ci:** increase skip_pypi logic to cover tests/changelog on re-run failures -* **ci:** add missing description fields -* **ci:** post release on tagged issues too -* **ci:** experiment hardening origin -* **deps:** bump jsii from 1.61.0 to 1.62.0 ([#1294](https://github.com/awslabs/aws-lambda-powertools-python/issues/1294)) -* **deps:** bump boto3 from 1.18.21 to 1.18.22 ([#614](https://github.com/awslabs/aws-lambda-powertools-python/issues/614)) -* **deps:** bump boto3 from 1.18.22 to 1.18.24 ([#619](https://github.com/awslabs/aws-lambda-powertools-python/issues/619)) -* **deps:** bump pydantic from 1.10.0 to 1.10.1 ([#1491](https://github.com/awslabs/aws-lambda-powertools-python/issues/1491)) -* **deps:** bump jsii from 1.57.0 to 1.63.2 ([#1400](https://github.com/awslabs/aws-lambda-powertools-python/issues/1400)) -* **deps:** bump boto3 from 1.18.24 to 1.18.25 ([#623](https://github.com/awslabs/aws-lambda-powertools-python/issues/623)) -* **deps:** bump boto3 from 1.18.25 to 1.18.26 ([#627](https://github.com/awslabs/aws-lambda-powertools-python/issues/627)) -* **deps:** bump constructs from 10.1.1 to 10.1.63 ([#1402](https://github.com/awslabs/aws-lambda-powertools-python/issues/1402)) -* **deps:** bump attrs from 21.4.0 to 22.1.0 ([#1397](https://github.com/awslabs/aws-lambda-powertools-python/issues/1397)) -* **deps:** bump jsii from 1.57.0 to 1.63.1 ([#1390](https://github.com/awslabs/aws-lambda-powertools-python/issues/1390)) -* **deps:** bump boto3 from 1.18.15 to 1.18.17 ([#597](https://github.com/awslabs/aws-lambda-powertools-python/issues/597)) -* **deps:** bump constructs from 10.1.1 to 10.1.59 ([#1396](https://github.com/awslabs/aws-lambda-powertools-python/issues/1396)) -* **deps:** bump pydantic from 1.9.0 to 1.9.1 ([#1221](https://github.com/awslabs/aws-lambda-powertools-python/issues/1221)) -* **deps:** bump email-validator from 1.1.3 to 1.2.1 ([#1199](https://github.com/awslabs/aws-lambda-powertools-python/issues/1199)) -* **deps:** bump boto3 from 1.18.1 to 1.18.15 ([#591](https://github.com/awslabs/aws-lambda-powertools-python/issues/591)) -* **deps:** bump boto3 from 1.18.26 to 1.18.32 ([#663](https://github.com/awslabs/aws-lambda-powertools-python/issues/663)) -* **deps:** bump codecov/codecov-action from 2.0.1 to 2.0.2 ([#558](https://github.com/awslabs/aws-lambda-powertools-python/issues/558)) -* **deps:** bump constructs from 10.1.1 to 10.1.64 ([#1405](https://github.com/awslabs/aws-lambda-powertools-python/issues/1405)) -* **deps:** bump boto3 from 1.18.32 to 1.18.38 ([#671](https://github.com/awslabs/aws-lambda-powertools-python/issues/671)) -* **deps:** bump boto3 from 1.18.17 to 1.18.21 ([#608](https://github.com/awslabs/aws-lambda-powertools-python/issues/608)) -* **deps:** bump github/codeql-action from 1 to 2 ([#1154](https://github.com/awslabs/aws-lambda-powertools-python/issues/1154)) -* **deps:** bump boto3 from 1.18.38 to 1.18.41 ([#677](https://github.com/awslabs/aws-lambda-powertools-python/issues/677)) -* **deps:** bump actions/setup-python from 3 to 4 ([#1244](https://github.com/awslabs/aws-lambda-powertools-python/issues/1244)) -* **deps:** bump codecov/codecov-action from 2.0.2 to 2.1.0 ([#675](https://github.com/awslabs/aws-lambda-powertools-python/issues/675)) -* **deps:** bump codecov/codecov-action from 3.0.0 to 3.1.0 ([#1143](https://github.com/awslabs/aws-lambda-powertools-python/issues/1143)) -* **deps:** bump boto3 from 1.18.41 to 1.18.49 ([#703](https://github.com/awslabs/aws-lambda-powertools-python/issues/703)) -* **deps:** bump boto3 from 1.18.49 to 1.18.51 ([#713](https://github.com/awslabs/aws-lambda-powertools-python/issues/713)) -* **deps:** bump actions/checkout from 2 to 3 ([#1052](https://github.com/awslabs/aws-lambda-powertools-python/issues/1052)) -* **deps:** bump boto3 from 1.18.51 to 1.18.54 ([#733](https://github.com/awslabs/aws-lambda-powertools-python/issues/733)) -* **deps:** bump constructs from 10.1.1 to 10.1.52 ([#1343](https://github.com/awslabs/aws-lambda-powertools-python/issues/1343)) -* **deps:** bump boto3 from 1.18.54 to 1.18.56 ([#742](https://github.com/awslabs/aws-lambda-powertools-python/issues/742)) -* **deps:** bump codecov/codecov-action from 2.1.0 to 3.0.0 ([#1102](https://github.com/awslabs/aws-lambda-powertools-python/issues/1102)) -* **deps:** bump actions/upload-artifact from 2 to 3 ([#1103](https://github.com/awslabs/aws-lambda-powertools-python/issues/1103)) -* **deps:** bump release-drafter/release-drafter from 5.20.0 to 5.20.1 ([#1458](https://github.com/awslabs/aws-lambda-powertools-python/issues/1458)) -* **deps:** bump constructs from 10.1.1 to 10.1.65 ([#1407](https://github.com/awslabs/aws-lambda-powertools-python/issues/1407)) -* **deps:** bump boto3 from 1.17.84 to 1.17.85 ([#455](https://github.com/awslabs/aws-lambda-powertools-python/issues/455)) -* **deps:** bump boto3 from 1.17.85 to 1.17.86 ([#458](https://github.com/awslabs/aws-lambda-powertools-python/issues/458)) -* **deps:** bump boto3 from 1.17.86 to 1.17.87 ([#459](https://github.com/awslabs/aws-lambda-powertools-python/issues/459)) -* **deps:** bump boto3 from 1.18.56 to 1.18.58 ([#755](https://github.com/awslabs/aws-lambda-powertools-python/issues/755)) -* **deps:** bump boto3 from 1.18.58 to 1.18.59 ([#760](https://github.com/awslabs/aws-lambda-powertools-python/issues/760)) -* **deps:** bump boto3 from 1.17.88 to 1.17.89 ([#466](https://github.com/awslabs/aws-lambda-powertools-python/issues/466)) -* **deps:** bump pydantic from 1.9.1 to 1.9.2 ([#1448](https://github.com/awslabs/aws-lambda-powertools-python/issues/1448)) -* **deps:** bump constructs from 10.1.1 to 10.1.51 ([#1323](https://github.com/awslabs/aws-lambda-powertools-python/issues/1323)) -* **deps:** bump constructs from 10.1.1 to 10.1.60 ([#1399](https://github.com/awslabs/aws-lambda-powertools-python/issues/1399)) -* **deps:** bump constructs from 10.1.1 to 10.1.66 ([#1414](https://github.com/awslabs/aws-lambda-powertools-python/issues/1414)) -* **deps:** bump boto3 from 1.17.89 to 1.17.91 ([#473](https://github.com/awslabs/aws-lambda-powertools-python/issues/473)) -* **deps:** bump boto3 from 1.18.59 to 1.18.61 ([#766](https://github.com/awslabs/aws-lambda-powertools-python/issues/766)) -* **deps:** bump email-validator from 1.1.2 to 1.1.3 ([#478](https://github.com/awslabs/aws-lambda-powertools-python/issues/478)) -* **deps:** bump boto3 from 1.17.91 to 1.17.101 ([#490](https://github.com/awslabs/aws-lambda-powertools-python/issues/490)) -* **deps:** bump boto3 from 1.18.61 to 1.19.6 ([#783](https://github.com/awslabs/aws-lambda-powertools-python/issues/783)) -* **deps:** bump urllib3 from 1.26.4 to 1.26.5 ([#787](https://github.com/awslabs/aws-lambda-powertools-python/issues/787)) -* **deps:** bump boto3 from 1.19.6 to 1.20.3 ([#809](https://github.com/awslabs/aws-lambda-powertools-python/issues/809)) -* **deps:** bump boto3 from 1.20.3 to 1.20.5 ([#817](https://github.com/awslabs/aws-lambda-powertools-python/issues/817)) -* **deps:** bump constructs from 10.1.1 to 10.1.49 ([#1308](https://github.com/awslabs/aws-lambda-powertools-python/issues/1308)) -* **deps:** bump actions/setup-python from 2.3.1 to 3 ([#1048](https://github.com/awslabs/aws-lambda-powertools-python/issues/1048)) -* **deps:** bump fastjsonschema from 2.15.3 to 2.16.1 ([#1309](https://github.com/awslabs/aws-lambda-powertools-python/issues/1309)) -* **deps:** bump actions/github-script from 5 to 6 ([#1023](https://github.com/awslabs/aws-lambda-powertools-python/issues/1023)) -* **deps:** bump fastjsonschema from 2.15.2 to 2.15.3 ([#949](https://github.com/awslabs/aws-lambda-powertools-python/issues/949)) -* **deps:** bump dependabot/fetch-metadata from 1.1.1 to 1.3.2 ([#1269](https://github.com/awslabs/aws-lambda-powertools-python/issues/1269)) -* **deps:** bump boto3 from 1.17.101 to 1.17.102 ([#493](https://github.com/awslabs/aws-lambda-powertools-python/issues/493)) * **deps:** bump aws-xray-sdk from 2.9.0 to 2.10.0 ([#1270](https://github.com/awslabs/aws-lambda-powertools-python/issues/1270)) -* **deps:** bump actions/setup-python from 2.2.2 to 2.3.0 ([#831](https://github.com/awslabs/aws-lambda-powertools-python/issues/831)) -* **deps:** bump actions/setup-python from 2.3.0 to 2.3.1 ([#852](https://github.com/awslabs/aws-lambda-powertools-python/issues/852)) +* **deps:** bump dependabot/fetch-metadata from 1.1.1 to 1.3.2 ([#1269](https://github.com/awslabs/aws-lambda-powertools-python/issues/1269)) * **deps:** bump dependabot/fetch-metadata from 1.3.2 to 1.3.3 ([#1273](https://github.com/awslabs/aws-lambda-powertools-python/issues/1273)) -* **deps:** bump boto3 from 1.17.102 to 1.17.110 ([#523](https://github.com/awslabs/aws-lambda-powertools-python/issues/523)) -* **deps:** support arm64 when developing locally ([#862](https://github.com/awslabs/aws-lambda-powertools-python/issues/862)) -* **deps:** bump aws-xray-sdk from 2.8.0 to 2.9.0 ([#876](https://github.com/awslabs/aws-lambda-powertools-python/issues/876)) -* **deps:** bump boto3 from 1.17.110 to 1.18.0 ([#527](https://github.com/awslabs/aws-lambda-powertools-python/issues/527)) -* **deps:** bump boto3 from 1.18.0 to 1.18.1 ([#528](https://github.com/awslabs/aws-lambda-powertools-python/issues/528)) -* **deps:** bump codecov/codecov-action from 1 to 2.0.1 ([#539](https://github.com/awslabs/aws-lambda-powertools-python/issues/539)) -* **deps:** bump actions/setup-node from 2 to 3 ([#1281](https://github.com/awslabs/aws-lambda-powertools-python/issues/1281)) -* **deps:** bump constructs from 10.1.1 to 10.1.46 ([#1306](https://github.com/awslabs/aws-lambda-powertools-python/issues/1306)) -* **deps:** bump aws-cdk-lib from 2.29.0 to 2.31.1 ([#1290](https://github.com/awslabs/aws-lambda-powertools-python/issues/1290)) -* **deps:** bump cdk-lambda-powertools-python-layer ([#1284](https://github.com/awslabs/aws-lambda-powertools-python/issues/1284)) -* **deps:** bump pydantic from 1.8.2 to 1.9.0 ([#933](https://github.com/awslabs/aws-lambda-powertools-python/issues/933)) -* **deps:** bump fastjsonschema from 2.15.1 to 2.15.2 ([#891](https://github.com/awslabs/aws-lambda-powertools-python/issues/891)) -* **deps:** bump attrs from 21.2.0 to 21.4.0 ([#1282](https://github.com/awslabs/aws-lambda-powertools-python/issues/1282)) -* **deps:** bump boto3 from 1.17.87 to 1.17.88 ([#463](https://github.com/awslabs/aws-lambda-powertools-python/issues/463)) -* **deps-dev:** bump mypy from 0.910 to 0.920 ([#903](https://github.com/awslabs/aws-lambda-powertools-python/issues/903)) -* **deps-dev:** bump mypy-boto3-appconfig from 1.24.0 to 1.24.29 ([#1295](https://github.com/awslabs/aws-lambda-powertools-python/issues/1295)) -* **deps-dev:** bump mypy from 0.920 to 0.930 ([#925](https://github.com/awslabs/aws-lambda-powertools-python/issues/925)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.12 to 1.24.27 ([#1293](https://github.com/awslabs/aws-lambda-powertools-python/issues/1293)) -* **deps-dev:** bump mypy from 0.930 to 0.931 ([#941](https://github.com/awslabs/aws-lambda-powertools-python/issues/941)) -* **deps-dev:** bump mkdocs-material from 7.1.10 to 7.1.11 ([#542](https://github.com/awslabs/aws-lambda-powertools-python/issues/542)) -* **deps-dev:** bump black from 21.11b1 to 21.12b0 ([#872](https://github.com/awslabs/aws-lambda-powertools-python/issues/872)) -* **deps-dev:** bump mkdocs-material from 7.1.9 to 7.1.10 ([#522](https://github.com/awslabs/aws-lambda-powertools-python/issues/522)) -* **deps-dev:** bump flake8-bugbear from 21.11.29 to 22.1.11 ([#955](https://github.com/awslabs/aws-lambda-powertools-python/issues/955)) -* **deps-dev:** bump flake8 from 3.9.2 to 4.0.1 ([#789](https://github.com/awslabs/aws-lambda-powertools-python/issues/789)) * **deps-dev:** bump flake8-bugbear from 22.6.22 to 22.7.1 ([#1274](https://github.com/awslabs/aws-lambda-powertools-python/issues/1274)) -* **deps-dev:** bump black from 21.10b0 to 21.11b1 ([#839](https://github.com/awslabs/aws-lambda-powertools-python/issues/839)) -* **deps-dev:** bump isort from 5.9.1 to 5.9.2 ([#514](https://github.com/awslabs/aws-lambda-powertools-python/issues/514)) -* **deps-dev:** bump flake8-eradicate from 1.0.0 to 1.1.0 ([#492](https://github.com/awslabs/aws-lambda-powertools-python/issues/492)) -* **deps-dev:** bump isort from 5.9.3 to 5.10.1 ([#811](https://github.com/awslabs/aws-lambda-powertools-python/issues/811)) -* **deps-dev:** bump coverage from 6.0.2 to 6.1.2 ([#810](https://github.com/awslabs/aws-lambda-powertools-python/issues/810)) -* **deps-dev:** bump mkdocs-material from 8.1.9 to 8.2.4 ([#1054](https://github.com/awslabs/aws-lambda-powertools-python/issues/1054)) * **deps-dev:** bump flake8-bugbear from 22.4.25 to 22.6.22 ([#1258](https://github.com/awslabs/aws-lambda-powertools-python/issues/1258)) * **deps-dev:** bump mypy-boto3-dynamodb from 1.24.0 to 1.24.12 ([#1255](https://github.com/awslabs/aws-lambda-powertools-python/issues/1255)) -* **deps-dev:** bump mkdocs-material from 7.3.5 to 7.3.6 ([#791](https://github.com/awslabs/aws-lambda-powertools-python/issues/791)) -* **deps-dev:** bump mkdocs-material from 7.3.3 to 7.3.5 ([#781](https://github.com/awslabs/aws-lambda-powertools-python/issues/781)) -* **deps-dev:** bump flake8-isort from 4.0.0 to 4.1.1 ([#785](https://github.com/awslabs/aws-lambda-powertools-python/issues/785)) * **deps-dev:** bump mypy-boto3-secretsmanager ([#1252](https://github.com/awslabs/aws-lambda-powertools-python/issues/1252)) -* **deps-dev:** bump flake8-eradicate from 1.1.0 to 1.2.0 ([#784](https://github.com/awslabs/aws-lambda-powertools-python/issues/784)) -* **deps-dev:** bump isort from 5.8.0 to 5.9.1 ([#487](https://github.com/awslabs/aws-lambda-powertools-python/issues/487)) -* **deps-dev:** bump pytest-asyncio from 0.15.1 to 0.16.0 ([#782](https://github.com/awslabs/aws-lambda-powertools-python/issues/782)) -* **deps-dev:** bump coverage from 6.0.1 to 6.0.2 ([#764](https://github.com/awslabs/aws-lambda-powertools-python/issues/764)) -* **deps-dev:** bump mkdocs-material from 7.1.7 to 7.1.9 ([#491](https://github.com/awslabs/aws-lambda-powertools-python/issues/491)) -* **deps-dev:** bump flake8-black from 0.2.1 to 0.2.3 ([#541](https://github.com/awslabs/aws-lambda-powertools-python/issues/541)) -* **deps-dev:** bump mypy from 0.961 to 0.971 ([#1320](https://github.com/awslabs/aws-lambda-powertools-python/issues/1320)) -* **deps-dev:** bump types-requests from 2.28.7 to 2.28.8 ([#1423](https://github.com/awslabs/aws-lambda-powertools-python/issues/1423)) -* **deps-dev:** bump mkdocs-material from 7.3.2 to 7.3.3 ([#758](https://github.com/awslabs/aws-lambda-powertools-python/issues/758)) -* **deps-dev:** bump flake8-comprehensions from 3.6.1 to 3.7.0 ([#759](https://github.com/awslabs/aws-lambda-powertools-python/issues/759)) -* **deps-dev:** bump flake8-eradicate from 1.2.0 to 1.2.1 ([#1158](https://github.com/awslabs/aws-lambda-powertools-python/issues/1158)) -* **deps-dev:** bump coverage from 6.0 to 6.0.1 ([#751](https://github.com/awslabs/aws-lambda-powertools-python/issues/751)) -* **deps-dev:** bump mkdocs-material from 7.1.6 to 7.1.7 ([#464](https://github.com/awslabs/aws-lambda-powertools-python/issues/464)) -* **deps-dev:** bump mkdocs-material from 7.2.4 to 7.2.6 ([#665](https://github.com/awslabs/aws-lambda-powertools-python/issues/665)) -* **deps-dev:** bump mkdocs-material from 7.1.11 to 7.2.0 ([#551](https://github.com/awslabs/aws-lambda-powertools-python/issues/551)) -* **deps-dev:** bump mkdocs-material from 7.2.0 to 7.2.1 ([#566](https://github.com/awslabs/aws-lambda-powertools-python/issues/566)) -* **deps-dev:** bump pytest-cov from 2.12.0 to 2.12.1 ([#454](https://github.com/awslabs/aws-lambda-powertools-python/issues/454)) -* **deps-dev:** bump pdoc3 from 0.9.2 to 0.10.0 ([#584](https://github.com/awslabs/aws-lambda-powertools-python/issues/584)) -* **deps-dev:** bump pytest from 6.2.5 to 7.0.1 ([#1063](https://github.com/awslabs/aws-lambda-powertools-python/issues/1063)) -* **deps-dev:** bump mkdocs-material from 7.3.1 to 7.3.2 ([#741](https://github.com/awslabs/aws-lambda-powertools-python/issues/741)) -* **deps-dev:** bump types-requests from 2.28.6 to 2.28.7 ([#1406](https://github.com/awslabs/aws-lambda-powertools-python/issues/1406)) -* **deps-dev:** bump mypy-boto3-cloudwatch from 1.24.0 to 1.24.35 ([#1342](https://github.com/awslabs/aws-lambda-powertools-python/issues/1342)) -* **deps-dev:** bump mkdocs-material from 8.2.4 to 8.2.7 ([#1131](https://github.com/awslabs/aws-lambda-powertools-python/issues/1131)) -* **deps-dev:** bump isort from 5.9.2 to 5.9.3 ([#574](https://github.com/awslabs/aws-lambda-powertools-python/issues/574)) -* **deps-dev:** bump pytest-cov from 2.12.1 to 3.0.0 ([#730](https://github.com/awslabs/aws-lambda-powertools-python/issues/730)) -* **deps-dev:** bump coverage from 5.5 to 6.0 ([#732](https://github.com/awslabs/aws-lambda-powertools-python/issues/732)) -* **deps-dev:** bump flake8-bugbear from 22.8.22 to 22.8.23 ([#1473](https://github.com/awslabs/aws-lambda-powertools-python/issues/1473)) -* **deps-dev:** bump mkdocs-material from 7.3.0 to 7.3.1 ([#731](https://github.com/awslabs/aws-lambda-powertools-python/issues/731)) -* **deps-dev:** bump flake8-bugbear from 21.9.1 to 21.9.2 ([#712](https://github.com/awslabs/aws-lambda-powertools-python/issues/712)) -* **deps-dev:** bump mypy from 0.931 to 0.942 ([#1133](https://github.com/awslabs/aws-lambda-powertools-python/issues/1133)) -* **deps-dev:** bump xenon from 0.8.0 to 0.9.0 ([#1145](https://github.com/awslabs/aws-lambda-powertools-python/issues/1145)) -* **deps-dev:** bump mkdocs-git-revision-date-plugin ([#1146](https://github.com/awslabs/aws-lambda-powertools-python/issues/1146)) -* **deps-dev:** bump black from 22.6.0 to 22.8.0 ([#1494](https://github.com/awslabs/aws-lambda-powertools-python/issues/1494)) -* **deps-dev:** bump mkdocs-material from 7.2.8 to 7.3.0 ([#695](https://github.com/awslabs/aws-lambda-powertools-python/issues/695)) -* **deps-dev:** bump mkdocs-material from 7.2.6 to 7.2.8 ([#682](https://github.com/awslabs/aws-lambda-powertools-python/issues/682)) -* **deps-dev:** bump flake8-bugbear from 21.4.3 to 21.9.1 ([#676](https://github.com/awslabs/aws-lambda-powertools-python/issues/676)) -* **deps-dev:** bump mypy-boto3-appconfig from 1.23.0.post1 to 1.24.0 ([#1233](https://github.com/awslabs/aws-lambda-powertools-python/issues/1233)) -* **deps-dev:** bump radon from 4.5.2 to 5.1.0 ([#673](https://github.com/awslabs/aws-lambda-powertools-python/issues/673)) -* **deps-dev:** bump mypy from 0.942 to 0.950 ([#1162](https://github.com/awslabs/aws-lambda-powertools-python/issues/1162)) -* **deps-dev:** bump xenon from 0.7.3 to 0.8.0 ([#669](https://github.com/awslabs/aws-lambda-powertools-python/issues/669)) -* **deps-dev:** bump flake8-bugbear from 22.1.11 to 22.4.25 ([#1156](https://github.com/awslabs/aws-lambda-powertools-python/issues/1156)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#1481](https://github.com/awslabs/aws-lambda-powertools-python/issues/1481)) +* **governance:** fix on_merged_pr workflow syntax +* **governance:** warn message on closed issues +* **layers:** bump to 21 for 1.26.2 +* **test-perf:** use pytest-benchmark to improve reliability ([#1250](https://github.com/awslabs/aws-lambda-powertools-python/issues/1250)) + + + +## [v1.26.2] - 2022-06-16 +## Bug Fixes + +* **event-handler:** body to empty string in CORS preflight (ALB non-compliant) ([#1249](https://github.com/awslabs/aws-lambda-powertools-python/issues/1249)) + +## Code Refactoring + +* rename to clear_state +* rename to remove_custom_keys + +## Documentation + +* fix anchor + +## Features + +* **logger:** add option to clear state per invocation + +## Maintenance + +* bump to 1.26.2 +* **deps:** bump actions/setup-python from 3 to 4 ([#1244](https://github.com/awslabs/aws-lambda-powertools-python/issues/1244)) +* **deps-dev:** bump mypy from 0.960 to 0.961 ([#1241](https://github.com/awslabs/aws-lambda-powertools-python/issues/1241)) +* **deps-dev:** bump mypy-boto3-ssm from 1.23.0.post1 to 1.24.0 ([#1231](https://github.com/awslabs/aws-lambda-powertools-python/issues/1231)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.8 to 1.24.0 ([#1232](https://github.com/awslabs/aws-lambda-powertools-python/issues/1232)) * **deps-dev:** bump mypy-boto3-dynamodb from 1.23.0.post1 to 1.24.0 ([#1234](https://github.com/awslabs/aws-lambda-powertools-python/issues/1234)) -* **deps-dev:** bump pytest from 6.2.4 to 6.2.5 ([#662](https://github.com/awslabs/aws-lambda-powertools-python/issues/662)) -* **deps-dev:** bump mypy-boto3-dynamodb from 1.24.55.post1 to 1.24.60 ([#306](https://github.com/awslabs/aws-lambda-powertools-python/issues/306)) -* **deps-dev:** bump mkdocs-material from 7.2.2 to 7.2.3 ([#596](https://github.com/awslabs/aws-lambda-powertools-python/issues/596)) -* **deps-dev:** bump flake8-isort from 4.1.1 to 4.1.2.post0 ([#1384](https://github.com/awslabs/aws-lambda-powertools-python/issues/1384)) -* **deps-dev:** bump mypy-boto3-ssm from 1.21.34 to 1.23.0.post1 ([#1220](https://github.com/awslabs/aws-lambda-powertools-python/issues/1220)) -* **deps-dev:** bump mypy-boto3-appconfig from 1.21.34 to 1.23.0.post1 ([#1219](https://github.com/awslabs/aws-lambda-powertools-python/issues/1219)) -* **deps-dev:** bump mypy-boto3-secretsmanager from 1.21.34 to 1.23.0.post1 ([#1218](https://github.com/awslabs/aws-lambda-powertools-python/issues/1218)) -* **deps-dev:** bump mkdocs-material from 8.4.1 to 8.4.2 ([#1483](https://github.com/awslabs/aws-lambda-powertools-python/issues/1483)) -* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.0.post1 to 1.23.8 ([#1225](https://github.com/awslabs/aws-lambda-powertools-python/issues/1225)) -* **deps-dev:** bump mypy from 0.950 to 0.960 ([#1224](https://github.com/awslabs/aws-lambda-powertools-python/issues/1224)) -* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.8 to 1.24.0 ([#1232](https://github.com/awslabs/aws-lambda-powertools-python/issues/1232)) -* **deps-dev:** bump flake8-variables-names from 0.0.4 to 0.0.5 ([#1490](https://github.com/awslabs/aws-lambda-powertools-python/issues/1490)) -* **deps-dev:** bump aws-cdk-lib from 2.39.1 to 2.40.0 ([#1495](https://github.com/awslabs/aws-lambda-powertools-python/issues/1495)) -* **deps-dev:** bump flake8-comprehensions from 3.6.0 to 3.6.1 ([#615](https://github.com/awslabs/aws-lambda-powertools-python/issues/615)) -* **deps-dev:** bump mypy from 0.960 to 0.961 ([#1241](https://github.com/awslabs/aws-lambda-powertools-python/issues/1241)) -* **deps-dev:** bump types-requests from 2.28.5 to 2.28.6 ([#1401](https://github.com/awslabs/aws-lambda-powertools-python/issues/1401)) -* **deps-dev:** bump mkdocs-material from 7.2.3 to 7.2.4 ([#607](https://github.com/awslabs/aws-lambda-powertools-python/issues/607)) -* **deps-dev:** bump mypy-boto3-ssm from 1.23.0.post1 to 1.24.0 ([#1231](https://github.com/awslabs/aws-lambda-powertools-python/issues/1231)) -* **deps-dev:** bump flake8-comprehensions from 3.5.0 to 3.6.0 ([#609](https://github.com/awslabs/aws-lambda-powertools-python/issues/609)) -* **deps-dev:** bump mkdocs-material from 7.2.1 to 7.2.2 ([#582](https://github.com/awslabs/aws-lambda-powertools-python/issues/582)) -* **docs:** update description to trigger changelog generation -* **docs:** correct markdown based on markdown lint ([#603](https://github.com/awslabs/aws-lambda-powertools-python/issues/603)) -* **docs:** remove pause sentence from roadmap ([#1409](https://github.com/awslabs/aws-lambda-powertools-python/issues/1409)) -* **docs:** update CHANGELOG for v1.26.7 -* **docs:** update site name to test ci changelog -* **event-handler:** adjusts exception docstrings to not confuse AppSync customers -* **governance:** remove devcontainer in favour of gitpod.io ([#1411](https://github.com/awslabs/aws-lambda-powertools-python/issues/1411)) -* **governance:** add release label on pr merge +* **deps-dev:** bump mypy-boto3-appconfig from 1.23.0.post1 to 1.24.0 ([#1233](https://github.com/awslabs/aws-lambda-powertools-python/issues/1233)) * **governance:** auto-merge on all PR events +* **governance:** add release label on pr merge * **governance:** enforce safe scope on pr merge labelling * **governance:** limit build workflow to code changes only +* **governance:** auto-merge workflow_dispatch off +* **governance:** auto-merge to use squash +* **governance:** check for related issue in new PRs +* **governance:** auto-merge mypy-stub dependabot +* **governance:** address gh reusable workflow limitation +* **governance:** fix workflow action requirements & syntax +* **governance:** warn message on closed issues +* **metrics:** revert dimensions test before splitting ([#1243](https://github.com/awslabs/aws-lambda-powertools-python/issues/1243)) + + + +## [v1.26.1] - 2022-06-07 +## Bug Fixes + +* **metrics:** raise SchemaValidationError for >8 metric dimensions ([#1240](https://github.com/awslabs/aws-lambda-powertools-python/issues/1240)) + +## Documentation + +* **governance:** link roadmap and maintainers doc +* **maintainers:** initial maintainers playbook ([#1222](https://github.com/awslabs/aws-lambda-powertools-python/issues/1222)) +* **roadmap:** use pinned pause issue instead + +## Maintenance + +* bump version 1.26.1 +* **deps-dev:** bump mypy from 0.950 to 0.960 ([#1224](https://github.com/awslabs/aws-lambda-powertools-python/issues/1224)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.23.0.post1 to 1.23.8 ([#1225](https://github.com/awslabs/aws-lambda-powertools-python/issues/1225)) + + + +## [v1.26.0] - 2022-05-20 +## Bug Fixes + +* **batch:** missing space in BatchProcessingError message ([#1201](https://github.com/awslabs/aws-lambda-powertools-python/issues/1201)) +* **batch:** docstring fix for success_handler() record parameter ([#1202](https://github.com/awslabs/aws-lambda-powertools-python/issues/1202)) +* **docs:** remove Slack link ([#1210](https://github.com/awslabs/aws-lambda-powertools-python/issues/1210)) + +## Documentation + +* **layer:** upgrade to 1.25.10 +* **roadmap:** add new roadmap section ([#1204](https://github.com/awslabs/aws-lambda-powertools-python/issues/1204)) + +## Features + +* **parameters:** accept boto3_client to support private endpoints and ease testing ([#1096](https://github.com/awslabs/aws-lambda-powertools-python/issues/1096)) + +## Maintenance + +* bump to 1.26.0 +* **deps:** bump pydantic from 1.9.0 to 1.9.1 ([#1221](https://github.com/awslabs/aws-lambda-powertools-python/issues/1221)) +* **deps:** bump email-validator from 1.1.3 to 1.2.1 ([#1199](https://github.com/awslabs/aws-lambda-powertools-python/issues/1199)) +* **deps-dev:** bump mypy-boto3-secretsmanager from 1.21.34 to 1.23.0.post1 ([#1218](https://github.com/awslabs/aws-lambda-powertools-python/issues/1218)) +* **deps-dev:** bump mypy-boto3-appconfig from 1.21.34 to 1.23.0.post1 ([#1219](https://github.com/awslabs/aws-lambda-powertools-python/issues/1219)) +* **deps-dev:** bump mypy-boto3-ssm from 1.21.34 to 1.23.0.post1 ([#1220](https://github.com/awslabs/aws-lambda-powertools-python/issues/1220)) + + + +## [v1.25.10] - 2022-04-29 +## Bug Fixes + +* **data-classes:** Add missing SES fields and ([#1045](https://github.com/awslabs/aws-lambda-powertools-python/issues/1045)) +* **deps:** Ignore boto3 changes until needed ([#1151](https://github.com/awslabs/aws-lambda-powertools-python/issues/1151)) +* **deps-dev:** remove jmespath due to dev deps conflict ([#1148](https://github.com/awslabs/aws-lambda-powertools-python/issues/1148)) +* **event_handler:** exception_handler to handle ServiceError exceptions ([#1160](https://github.com/awslabs/aws-lambda-powertools-python/issues/1160)) +* **event_handler:** Allow for event_source support ([#1159](https://github.com/awslabs/aws-lambda-powertools-python/issues/1159)) +* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) + +## Documentation + +* **layer:** upgrade to 1.25.9 + +## Features + +* **parameters:** add clear_cache method for providers ([#1194](https://github.com/awslabs/aws-lambda-powertools-python/issues/1194)) + +## Maintenance + +* include regression in changelog +* bump to 1.25.10 +* **ci:** changelog pre-generation to fetch tags from origin +* **ci:** disable mergify configuration after breaking changes ([#1188](https://github.com/awslabs/aws-lambda-powertools-python/issues/1188)) +* **ci:** post release on tagged issues too +* **deps:** bump codecov/codecov-action from 3.0.0 to 3.1.0 ([#1143](https://github.com/awslabs/aws-lambda-powertools-python/issues/1143)) +* **deps:** bump github/codeql-action from 1 to 2 ([#1154](https://github.com/awslabs/aws-lambda-powertools-python/issues/1154)) +* **deps-dev:** bump flake8-eradicate from 1.2.0 to 1.2.1 ([#1158](https://github.com/awslabs/aws-lambda-powertools-python/issues/1158)) +* **deps-dev:** bump mypy from 0.942 to 0.950 ([#1162](https://github.com/awslabs/aws-lambda-powertools-python/issues/1162)) +* **deps-dev:** bump mkdocs-git-revision-date-plugin ([#1146](https://github.com/awslabs/aws-lambda-powertools-python/issues/1146)) +* **deps-dev:** bump flake8-bugbear from 22.1.11 to 22.4.25 ([#1156](https://github.com/awslabs/aws-lambda-powertools-python/issues/1156)) +* **deps-dev:** bump xenon from 0.8.0 to 0.9.0 ([#1145](https://github.com/awslabs/aws-lambda-powertools-python/issues/1145)) +* **deps-dev:** bump mypy from 0.931 to 0.942 ([#1133](https://github.com/awslabs/aws-lambda-powertools-python/issues/1133)) + +## Regression + +* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) ([#1190](https://github.com/awslabs/aws-lambda-powertools-python/issues/1190)) + + + +## [v1.25.9] - 2022-04-21 +## Bug Fixes + +* **deps:** correct py36 marker for jmespath + +## Maintenance + +* bump to 1.25.9 + + + +## [v1.25.8] - 2022-04-21 +## Bug Fixes + +* removed ambiguous quotes from labels. +* **deps:** update jmespath marker to support 1.0 and py3.6 ([#1139](https://github.com/awslabs/aws-lambda-powertools-python/issues/1139)) +* **governance:** update label in names in issues + +## Documentation + +* **install:** instructions to reduce pydantic package size ([#1077](https://github.com/awslabs/aws-lambda-powertools-python/issues/1077)) +* **layer:** remove link from clipboard button ([#1135](https://github.com/awslabs/aws-lambda-powertools-python/issues/1135)) +* **layer:** update to 1.25.7 + +## Maintenance + +* bump to 1.25.8 +* **deps:** bump codecov/codecov-action from 2.1.0 to 3.0.0 ([#1102](https://github.com/awslabs/aws-lambda-powertools-python/issues/1102)) +* **deps:** bump actions/upload-artifact from 2 to 3 ([#1103](https://github.com/awslabs/aws-lambda-powertools-python/issues/1103)) +* **deps-dev:** bump mkdocs-material from 8.2.4 to 8.2.7 ([#1131](https://github.com/awslabs/aws-lambda-powertools-python/issues/1131)) +* **deps-dev:** bump pytest from 6.2.5 to 7.0.1 ([#1063](https://github.com/awslabs/aws-lambda-powertools-python/issues/1063)) + + + +## [v1.25.7] - 2022-04-08 +## Bug Fixes + +* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) +* **api_gateway:** allow whitespace in routes' path parameter ([#1099](https://github.com/awslabs/aws-lambda-powertools-python/issues/1099)) +* **idempotency:** pass by value on idem key to guard inadvert mutations ([#1090](https://github.com/awslabs/aws-lambda-powertools-python/issues/1090)) +* **logger:** clear_state should keep custom key formats ([#1095](https://github.com/awslabs/aws-lambda-powertools-python/issues/1095)) +* **middleware_factory:** ret type annotation for handler dec ([#1066](https://github.com/awslabs/aws-lambda-powertools-python/issues/1066)) + +## Documentation + +* **layer:** update to 1.25.6; cosmetic changes + +## Maintenance + +* bump to 1.25.7 * **governance:** refresh pull request template sections * **governance:** update external non-triage effort disclaimer -* **governance:** update wording tech debt to summary in maintenance template -* **governance:** add new maintenance issue template for tech debt ([#1326](https://github.com/awslabs/aws-lambda-powertools-python/issues/1326)) -* **governance:** fix typo on semantic commit link introduced in [#1](https://github.com/awslabs/aws-lambda-powertools-python/issues/1)aef4 -* **governance:** add pre-configured dev environment with GitPod.io to ease contributions ([#1403](https://github.com/awslabs/aws-lambda-powertools-python/issues/1403)) -* **governance:** auto-merge workflow_dispatch off -* **governance:** update emeritus affiliation -* **governance:** remove any step relying on master branch * **governance:** update static typing to a form * **governance:** update rfc to a form * **governance:** update feat request to a form * **governance:** bug report form typo -* **governance:** fix workflow action requirements & syntax -* **governance:** auto-merge to use squash -* **governance:** warn message on closed issues +* **governance:** update docs report to a form * **governance:** update bug report to a form -* **governance:** auto-merge mypy-stub dependabot -* **governance:** fix on_merged_pr workflow syntax * **governance:** new ask a question * **governance:** new static typing report -* **governance:** warn message on closed issues -* **governance:** address gh reusable workflow limitation -* **governance:** check for related issue in new PRs -* **governance:** update docs report to a form -* **layers:** bump to 1.26.6 using layer v26 -* **layers:** upgrade cdk dep hashes to prevent ci fail -* **layers:** bump to 21 for 1.26.2 -* **layers:** bump to 10 for 1.25.0 -* **layers:** bump to 1.26.5 -* **layers:** bump to 22 for 1.26.3 -* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) -* **layers:** bump to 22 for 1.26.3 -* **layers:** add release pipeline in GitHub Actions ([#1278](https://github.com/awslabs/aws-lambda-powertools-python/issues/1278)) -* **layers:** replace layers account secret ([#1329](https://github.com/awslabs/aws-lambda-powertools-python/issues/1329)) -* **layers:** layer canary stack should not hardcode resource name -* **layers:** expand to all aws commercial regions ([#1324](https://github.com/awslabs/aws-lambda-powertools-python/issues/1324)) -* **license:** Add THIRD-PARTY-LICENSES ([#641](https://github.com/awslabs/aws-lambda-powertools-python/issues/641)) -* **license:** add third party license ([#635](https://github.com/awslabs/aws-lambda-powertools-python/issues/635)) -* **maintainer:** add Leandro as maintainer ([#1468](https://github.com/awslabs/aws-lambda-powertools-python/issues/1468)) -* **maintainers:** add Ruben as a maintainer ([#1392](https://github.com/awslabs/aws-lambda-powertools-python/issues/1392)) -* **maintainers:** update release workflow link -* **maintenance:** add discord link to first PR and first issue ([#1493](https://github.com/awslabs/aws-lambda-powertools-python/issues/1493)) -* **mergify:** disable check for matrix jobs -* **mergify:** use job name to match GH Actions -* **metrics:** revert dimensions test before splitting ([#1243](https://github.com/awslabs/aws-lambda-powertools-python/issues/1243)) -* **metrics:** fix tests when warnings are disabled ([#994](https://github.com/awslabs/aws-lambda-powertools-python/issues/994)) -* **shared:** fix cyclic import & refactor data extraction fn ([#613](https://github.com/awslabs/aws-lambda-powertools-python/issues/613)) -* **test-perf:** use pytest-benchmark to improve reliability ([#1250](https://github.com/awslabs/aws-lambda-powertools-python/issues/1250)) -* **tests:** build and deploy Lambda Layer stack once ([#1466](https://github.com/awslabs/aws-lambda-powertools-python/issues/1466)) -* **tests:** refactor E2E test mechanics to ease maintenance, writing tests and parallelization ([#1444](https://github.com/awslabs/aws-lambda-powertools-python/issues/1444)) -* **tests:** enable end-to-end test workflow ([#1470](https://github.com/awslabs/aws-lambda-powertools-python/issues/1470)) -* **tests:** refactor E2E logger to ease maintenance, writing tests and parallelization ([#1460](https://github.com/awslabs/aws-lambda-powertools-python/issues/1460)) -* **tests:** refactor E2E tracer to ease maintenance, writing tests and parallelization ([#1457](https://github.com/awslabs/aws-lambda-powertools-python/issues/1457)) + + + +## [v1.25.6] - 2022-04-01 +## Bug Fixes + +* **logger:** clear_state regression on absent standard keys ([#1088](https://github.com/awslabs/aws-lambda-powertools-python/issues/1088)) + +## Documentation + +* **layer:** bump to 1.25.5 + +## Maintenance + +* bump to 1.25.6 + + + +## [v1.25.5] - 2022-03-18 +## Bug Fixes + +* **logger-utils:** regression on exclude set leading to no formatter ([#1080](https://github.com/awslabs/aws-lambda-powertools-python/issues/1080)) + +## Maintenance + +* bump to 1.25.5 + + + +## [v1.25.4] - 2022-03-17 +## Bug Fixes + +* package_logger as const over logger instance +* repurpose test to cover parent loggers case +* use addHandler over monkeypatch + +## Documentation + +* **appsync:** fix typo +* **contributing:** operational excellence pause +* **layer:** update to 1.25.3 + +## Maintenance + +* bump to 1.25.4 +* remove duplicate test +* comment reason for change +* remove unnecessary test +* lint unused import ## Regression * service_name fixture -* order to APP logger/service name due to screenshots -* **metrics:** typing regression on log_metrics callable ([#744](https://github.com/awslabs/aws-lambda-powertools-python/issues/744)) -* **parser:** Add missing fields for SESEvent ([#1027](https://github.com/awslabs/aws-lambda-powertools-python/issues/1027)) ([#1190](https://github.com/awslabs/aws-lambda-powertools-python/issues/1190)) + +## Pull Requests + +* Merge pull request [#1075](https://github.com/awslabs/aws-lambda-powertools-python/issues/1075) from mploski/fix/existing-loggers-duplicated-logs + + + +## [v1.25.3] - 2022-03-09 +## Bug Fixes + +* **logger:** ensure state is cleared for custom formatters ([#1072](https://github.com/awslabs/aws-lambda-powertools-python/issues/1072)) + +## Documentation + +* **plugin:** add mermaid to create diagram as code ([#1070](https://github.com/awslabs/aws-lambda-powertools-python/issues/1070)) + +## Maintenance + +* bump to 1.25.3 + + + +## [v1.25.2] - 2022-03-07 +## Bug Fixes + +* **event_handler:** docs snippets, high-level import CorsConfig ([#1019](https://github.com/awslabs/aws-lambda-powertools-python/issues/1019)) +* **lambda-authorizer:** allow proxy resources path in arn ([#1051](https://github.com/awslabs/aws-lambda-powertools-python/issues/1051)) +* **metrics:** flush upon a single metric 100th data point ([#1046](https://github.com/awslabs/aws-lambda-powertools-python/issues/1046)) + +## Documentation + +* **layer:** update to 1.25.1 +* **parser:** APIGatewayProxyEvent to APIGatewayProxyEventModel ([#1061](https://github.com/awslabs/aws-lambda-powertools-python/issues/1061)) + +## Maintenance + +* bump to 1.25.2 +* **deps:** bump actions/setup-python from 2.3.1 to 3 ([#1048](https://github.com/awslabs/aws-lambda-powertools-python/issues/1048)) +* **deps:** bump actions/checkout from 2 to 3 ([#1052](https://github.com/awslabs/aws-lambda-powertools-python/issues/1052)) +* **deps:** bump actions/github-script from 5 to 6 ([#1023](https://github.com/awslabs/aws-lambda-powertools-python/issues/1023)) +* **deps:** bump fastjsonschema from 2.15.2 to 2.15.3 ([#949](https://github.com/awslabs/aws-lambda-powertools-python/issues/949)) +* **deps-dev:** bump mkdocs-material from 8.1.9 to 8.2.4 ([#1054](https://github.com/awslabs/aws-lambda-powertools-python/issues/1054)) + + + +## [v1.25.1] - 2022-02-14 +## Bug Fixes + +* **batch:** bugfix to clear exceptions between executions ([#1022](https://github.com/awslabs/aws-lambda-powertools-python/issues/1022)) + +## Maintenance + +* bump to 1.25.1 +* **layers:** bump to 10 for 1.25.0 + + + +## [v1.25.0] - 2022-02-09 +## Bug Fixes + +* **apigateway:** remove indentation in debug_mode ([#987](https://github.com/awslabs/aws-lambda-powertools-python/issues/987)) +* **batch:** delete >10 messages in legacy sqs processor ([#818](https://github.com/awslabs/aws-lambda-powertools-python/issues/818)) +* **ci:** pr label regex for special chars in title +* **logger:** exclude source_logger in copy_config_to_registered_loggers ([#1001](https://github.com/awslabs/aws-lambda-powertools-python/issues/1001)) +* **logger:** test generates logfile + +## Documentation + +* fix syntax errors and line highlights ([#1004](https://github.com/awslabs/aws-lambda-powertools-python/issues/1004)) +* add better BDD coments +* **event-handler:** improve testing section for graphql ([#996](https://github.com/awslabs/aws-lambda-powertools-python/issues/996)) +* **layer:** update to 1.24.2 +* **parameters:** add testing your code section ([#1017](https://github.com/awslabs/aws-lambda-powertools-python/issues/1017)) +* **theme:** upgrade mkdocs-material to 8.x ([#1002](https://github.com/awslabs/aws-lambda-powertools-python/issues/1002)) +* **tutorial:** fix broken internal links ([#1000](https://github.com/awslabs/aws-lambda-powertools-python/issues/1000)) + +## Features + +* **event-handler:** new resolvers to fix current_event typing ([#978](https://github.com/awslabs/aws-lambda-powertools-python/issues/978)) +* **logger:** log_event support event data classes (e.g. S3Event) ([#984](https://github.com/awslabs/aws-lambda-powertools-python/issues/984)) +* **mypy:** complete mypy support for the entire codebase ([#943](https://github.com/awslabs/aws-lambda-powertools-python/issues/943)) + +## Maintenance + +* bump to 1.25.0 +* correct docs +* correct docs +* use isinstance over type +* **deps-dev:** bump flake8-bugbear from 21.11.29 to 22.1.11 ([#955](https://github.com/awslabs/aws-lambda-powertools-python/issues/955)) +* **metrics:** fix tests when warnings are disabled ([#994](https://github.com/awslabs/aws-lambda-powertools-python/issues/994)) + +## Pull Requests + +* Merge pull request [#971](https://github.com/awslabs/aws-lambda-powertools-python/issues/971) from gyft/fix-logger-util-tests + + + +## [v1.24.2] - 2022-01-21 +## Bug Fixes + +* **data-classes:** underscore support in api gateway authorizer resource name ([#969](https://github.com/awslabs/aws-lambda-powertools-python/issues/969)) + +## Documentation + +* **layer:** update to 1.24.1 + +## Maintenance + +* bump to 1.24.2 + + + +## [v1.24.1] - 2022-01-20 +## Bug Fixes + +* remove unused json import +* remove apigw contract when using event-handler, apigw tracing +* use decorators, split cold start to ease reading +* incorrect log keys, indentation, snippet consistency +* remove f-strings that doesn't evaluate expr +* **batch:** report multiple failures ([#967](https://github.com/awslabs/aws-lambda-powertools-python/issues/967)) +* **data-classes:** docstring typos and clean up ([#937](https://github.com/awslabs/aws-lambda-powertools-python/issues/937)) +* **parameters:** appconfig internal _get docstrings ([#934](https://github.com/awslabs/aws-lambda-powertools-python/issues/934)) + +## Documentation + +* rename quickstart to tutorial in readme +* rename to tutorial given the size +* add final consideration section +* **batch:** snippet typo on batch processed messages iteration ([#951](https://github.com/awslabs/aws-lambda-powertools-python/issues/951)) +* **batch:** fix typo in context manager keyword ([#938](https://github.com/awslabs/aws-lambda-powertools-python/issues/938)) +* **homepage:** link to typescript version ([#950](https://github.com/awslabs/aws-lambda-powertools-python/issues/950)) +* **install:** new lambda layer for 1.24.0 release +* **metrics:** keep it consistent with other sections, update metric names +* **nav:** make REST and GraphQL event handlers more explicit ([#959](https://github.com/awslabs/aws-lambda-powertools-python/issues/959)) +* **quickstart:** expand on intro line +* **quickstart:** tidy requirements up +* **quickstart:** make section agnostic to json lib +* **quickstart:** same process for Logger +* **quickstart:** add sub-sections, fix highlight & code +* **quickstart:** sentence fragmentation, tidy up +* **tenets:** make core, non-core more explicit +* **tracer:** warning to note on local traces +* **tracer:** add initial image, requirements +* **tracer:** add annotation, metadata, and image +* **tracer:** update ServiceLens image w/ API GW, copywriting +* **tutorial:** fix path to images ([#963](https://github.com/awslabs/aws-lambda-powertools-python/issues/963)) + +## Features + +* **ci:** auto-notify & close issues on release +* **logger:** clone powertools logger config to any Python logger ([#927](https://github.com/awslabs/aws-lambda-powertools-python/issues/927)) + +## Maintenance + +* bump to 1.24.1 +* bump to 1.24.1 +* **ci:** run codeql analysis on push only +* **ci:** fix mergify dependabot queue +* **ci:** add queue name in mergify +* **ci:** remove mergify legacy key +* **ci:** update mergify bot breaking change +* **ci:** safely label PR based on title +* **deps:** bump pydantic from 1.8.2 to 1.9.0 ([#933](https://github.com/awslabs/aws-lambda-powertools-python/issues/933)) +* **deps-dev:** bump mypy from 0.930 to 0.931 ([#941](https://github.com/awslabs/aws-lambda-powertools-python/issues/941)) + +## Regression + +* order to APP logger/service name due to screenshots + +## Pull Requests + +* Merge pull request [#769](https://github.com/awslabs/aws-lambda-powertools-python/issues/769) from mploski/docs/quick-start + + + +## [v1.24.0] - 2021-12-31 +## Bug Fixes + +* **apigateway:** support [@app](https://github.com/app).not_found() syntax & housekeeping ([#926](https://github.com/awslabs/aws-lambda-powertools-python/issues/926)) +* **event-sources:** handle dynamodb null type as none, not bool ([#929](https://github.com/awslabs/aws-lambda-powertools-python/issues/929)) +* **warning:** future distutils deprecation ([#921](https://github.com/awslabs/aws-lambda-powertools-python/issues/921)) + +## Documentation + +* consistency around admonitions and snippets ([#919](https://github.com/awslabs/aws-lambda-powertools-python/issues/919)) +* Added GraphQL Sample API to Examples section of README.md ([#930](https://github.com/awslabs/aws-lambda-powertools-python/issues/930)) +* **batch:** remove leftover from legacy +* **layer:** bump Lambda Layer to version 6 +* **tracer:** new ignore_endpoint feature ([#931](https://github.com/awslabs/aws-lambda-powertools-python/issues/931)) + +## Features + +* **event-sources:** cache parsed json in data class ([#909](https://github.com/awslabs/aws-lambda-powertools-python/issues/909)) +* **feature_flags:** support beyond boolean values (JSON values) ([#804](https://github.com/awslabs/aws-lambda-powertools-python/issues/804)) +* **idempotency:** support dataclasses & pydantic models payloads ([#908](https://github.com/awslabs/aws-lambda-powertools-python/issues/908)) +* **logger:** support use_datetime_directive for timestamps ([#920](https://github.com/awslabs/aws-lambda-powertools-python/issues/920)) +* **tracer:** ignore tracing for certain hostname(s) or url(s) ([#910](https://github.com/awslabs/aws-lambda-powertools-python/issues/910)) + +## Maintenance + +* bump to 1.24.0 +* **deps-dev:** bump mypy from 0.920 to 0.930 ([#925](https://github.com/awslabs/aws-lambda-powertools-python/issues/925)) + + + +## [v1.23.0] - 2021-12-20 +## Bug Fixes + +* **apigateway:** allow list of HTTP methods in route method ([#838](https://github.com/awslabs/aws-lambda-powertools-python/issues/838)) +* **event-sources:** Pass authorizer data to APIGatewayEventAuthorizer ([#897](https://github.com/awslabs/aws-lambda-powertools-python/issues/897)) +* **event-sources:** handle claimsOverrideDetails set to null ([#878](https://github.com/awslabs/aws-lambda-powertools-python/issues/878)) +* **idempotency:** include decorated fn name in hash ([#869](https://github.com/awslabs/aws-lambda-powertools-python/issues/869)) +* **metrics:** explicit type to single_metric ctx manager ([#865](https://github.com/awslabs/aws-lambda-powertools-python/issues/865)) +* **parameters:** appconfig transform and return types ([#877](https://github.com/awslabs/aws-lambda-powertools-python/issues/877)) +* **parser:** overload parse when using envelope ([#885](https://github.com/awslabs/aws-lambda-powertools-python/issues/885)) +* **parser:** kinesis sequence number is str, not int ([#907](https://github.com/awslabs/aws-lambda-powertools-python/issues/907)) +* **parser:** mypy support for payload type override as models ([#883](https://github.com/awslabs/aws-lambda-powertools-python/issues/883)) +* **tracer:** add warm start annotation (ColdStart=False) ([#851](https://github.com/awslabs/aws-lambda-powertools-python/issues/851)) + +## Documentation + +* external reference to cloudformation custom resource helper ([#914](https://github.com/awslabs/aws-lambda-powertools-python/issues/914)) +* add new public Slack invite +* disable search blur in non-prod env +* update Lambda Layers version +* **apigateway:** add new not_found feature ([#915](https://github.com/awslabs/aws-lambda-powertools-python/issues/915)) +* **apigateway:** fix sample layout provided ([#864](https://github.com/awslabs/aws-lambda-powertools-python/issues/864)) +* **appsync:** fix users.py typo to locations [#830](https://github.com/awslabs/aws-lambda-powertools-python/issues/830) +* **lambda_layer:** fix CDK layer syntax + +## Features + +* **apigateway:** add exception_handler support ([#898](https://github.com/awslabs/aws-lambda-powertools-python/issues/898)) +* **apigateway:** access parent api resolver from router ([#842](https://github.com/awslabs/aws-lambda-powertools-python/issues/842)) +* **batch:** new BatchProcessor for SQS, DynamoDB, Kinesis ([#886](https://github.com/awslabs/aws-lambda-powertools-python/issues/886)) +* **logger:** allow handler with custom kwargs signature ([#913](https://github.com/awslabs/aws-lambda-powertools-python/issues/913)) +* **tracer:** add service annotation when service is set ([#861](https://github.com/awslabs/aws-lambda-powertools-python/issues/861)) + +## Maintenance + +* correct pr label order +* minor housekeeping before release ([#912](https://github.com/awslabs/aws-lambda-powertools-python/issues/912)) +* bump to 1.23.0 +* **ci:** split latest docs workflow +* **deps:** bump fastjsonschema from 2.15.1 to 2.15.2 ([#891](https://github.com/awslabs/aws-lambda-powertools-python/issues/891)) +* **deps:** bump actions/setup-python from 2.2.2 to 2.3.0 ([#831](https://github.com/awslabs/aws-lambda-powertools-python/issues/831)) +* **deps:** bump aws-xray-sdk from 2.8.0 to 2.9.0 ([#876](https://github.com/awslabs/aws-lambda-powertools-python/issues/876)) +* **deps:** support arm64 when developing locally ([#862](https://github.com/awslabs/aws-lambda-powertools-python/issues/862)) +* **deps:** bump actions/setup-python from 2.3.0 to 2.3.1 ([#852](https://github.com/awslabs/aws-lambda-powertools-python/issues/852)) +* **deps-dev:** bump flake8 from 3.9.2 to 4.0.1 ([#789](https://github.com/awslabs/aws-lambda-powertools-python/issues/789)) +* **deps-dev:** bump black from 21.10b0 to 21.11b1 ([#839](https://github.com/awslabs/aws-lambda-powertools-python/issues/839)) +* **deps-dev:** bump black from 21.11b1 to 21.12b0 ([#872](https://github.com/awslabs/aws-lambda-powertools-python/issues/872)) +* **deps-dev:** bump mypy from 0.910 to 0.920 ([#903](https://github.com/awslabs/aws-lambda-powertools-python/issues/903)) + + + +## [v1.22.0] - 2021-11-17 +## Bug Fixes + +* change supported python version from 3.6.1 to 3.6.2, bump black ([#807](https://github.com/awslabs/aws-lambda-powertools-python/issues/807)) +* **ci:** comment custom publish version checker +* **ci:** skip sync master on docs hotfix +* **parser:** body/QS can be null or omitted in apigw v1/v2 ([#820](https://github.com/awslabs/aws-lambda-powertools-python/issues/820)) + +## Code Refactoring + +* **apigateway:** Add BaseRouter and duplicate route check ([#757](https://github.com/awslabs/aws-lambda-powertools-python/issues/757)) + +## Documentation + +* updated Lambda Layers definition & limitations. ([#775](https://github.com/awslabs/aws-lambda-powertools-python/issues/775)) +* Idiomatic tenet updated to Progressive +* use higher contrast font ([#822](https://github.com/awslabs/aws-lambda-powertools-python/issues/822)) +* use higher contrast font +* fix indentation of SAM snippets in install section ([#778](https://github.com/awslabs/aws-lambda-powertools-python/issues/778)) +* improve public lambda layer wording, clipboard buttons ([#762](https://github.com/awslabs/aws-lambda-powertools-python/issues/762)) +* add amplify-cli instructions for public layer ([#754](https://github.com/awslabs/aws-lambda-powertools-python/issues/754)) +* **api-gateway:** add support for new router feature ([#767](https://github.com/awslabs/aws-lambda-powertools-python/issues/767)) +* **apigateway:** re-add sample layout, add considerations ([#826](https://github.com/awslabs/aws-lambda-powertools-python/issues/826)) +* **appsync:** add new router feature ([#821](https://github.com/awslabs/aws-lambda-powertools-python/issues/821)) +* **idempotency:** add support for DynamoDB composite keys ([#808](https://github.com/awslabs/aws-lambda-powertools-python/issues/808)) +* **tenets:** update Idiomatic tenet to Progressive ([#823](https://github.com/awslabs/aws-lambda-powertools-python/issues/823)) + +## Features + +* **apigateway:** add Router to allow large routing composition ([#645](https://github.com/awslabs/aws-lambda-powertools-python/issues/645)) +* **appsync:** add Router to allow large resolver composition ([#776](https://github.com/awslabs/aws-lambda-powertools-python/issues/776)) +* **data-classes:** ActiveMQ and RabbitMQ support ([#770](https://github.com/awslabs/aws-lambda-powertools-python/issues/770)) +* **logger:** add ALB correlation ID support ([#816](https://github.com/awslabs/aws-lambda-powertools-python/issues/816)) + +## Maintenance + +* fix var expr +* remove Lambda Layer version tag +* bump to 1.22.0 +* conditional to publish docs only attempt 3 +* conditional to publish docs only attempt 2 +* conditional to publish docs only +* **deps:** bump boto3 from 1.18.58 to 1.18.59 ([#760](https://github.com/awslabs/aws-lambda-powertools-python/issues/760)) +* **deps:** bump boto3 from 1.18.56 to 1.18.58 ([#755](https://github.com/awslabs/aws-lambda-powertools-python/issues/755)) +* **deps:** bump urllib3 from 1.26.4 to 1.26.5 ([#787](https://github.com/awslabs/aws-lambda-powertools-python/issues/787)) +* **deps:** bump boto3 from 1.19.6 to 1.20.3 ([#809](https://github.com/awslabs/aws-lambda-powertools-python/issues/809)) +* **deps:** bump boto3 from 1.18.61 to 1.19.6 ([#783](https://github.com/awslabs/aws-lambda-powertools-python/issues/783)) +* **deps:** bump boto3 from 1.20.3 to 1.20.5 ([#817](https://github.com/awslabs/aws-lambda-powertools-python/issues/817)) +* **deps:** bump boto3 from 1.18.59 to 1.18.61 ([#766](https://github.com/awslabs/aws-lambda-powertools-python/issues/766)) +* **deps-dev:** bump coverage from 6.0.1 to 6.0.2 ([#764](https://github.com/awslabs/aws-lambda-powertools-python/issues/764)) +* **deps-dev:** bump pytest-asyncio from 0.15.1 to 0.16.0 ([#782](https://github.com/awslabs/aws-lambda-powertools-python/issues/782)) +* **deps-dev:** bump flake8-eradicate from 1.1.0 to 1.2.0 ([#784](https://github.com/awslabs/aws-lambda-powertools-python/issues/784)) +* **deps-dev:** bump flake8-isort from 4.0.0 to 4.1.1 ([#785](https://github.com/awslabs/aws-lambda-powertools-python/issues/785)) +* **deps-dev:** bump mkdocs-material from 7.3.2 to 7.3.3 ([#758](https://github.com/awslabs/aws-lambda-powertools-python/issues/758)) +* **deps-dev:** bump flake8-comprehensions from 3.6.1 to 3.7.0 ([#759](https://github.com/awslabs/aws-lambda-powertools-python/issues/759)) +* **deps-dev:** bump mkdocs-material from 7.3.3 to 7.3.5 ([#781](https://github.com/awslabs/aws-lambda-powertools-python/issues/781)) +* **deps-dev:** bump coverage from 6.0 to 6.0.1 ([#751](https://github.com/awslabs/aws-lambda-powertools-python/issues/751)) +* **deps-dev:** bump mkdocs-material from 7.3.5 to 7.3.6 ([#791](https://github.com/awslabs/aws-lambda-powertools-python/issues/791)) +* **deps-dev:** bump coverage from 6.0.2 to 6.1.2 ([#810](https://github.com/awslabs/aws-lambda-powertools-python/issues/810)) +* **deps-dev:** bump isort from 5.9.3 to 5.10.1 ([#811](https://github.com/awslabs/aws-lambda-powertools-python/issues/811)) + + + +## [v1.21.1] - 2021-10-07 +## Documentation + +* add new public layer ARNs ([#746](https://github.com/awslabs/aws-lambda-powertools-python/issues/746)) + +## Maintenance + +* include public layers changelog +* bump to 1.21.1 +* include regression in changelog +* ignore constants in test cov ([#745](https://github.com/awslabs/aws-lambda-powertools-python/issues/745)) +* ignore constants in tests cov +* add support for publishing fallback +* **deps:** bump boto3 from 1.18.54 to 1.18.56 ([#742](https://github.com/awslabs/aws-lambda-powertools-python/issues/742)) +* **deps-dev:** bump mkdocs-material from 7.3.1 to 7.3.2 ([#741](https://github.com/awslabs/aws-lambda-powertools-python/issues/741)) + +## Regression + +* **metrics:** typing regression on log_metrics callable ([#744](https://github.com/awslabs/aws-lambda-powertools-python/issues/744)) + + + +## [v1.21.0] - 2021-10-05 +## Bug Fixes + +* **data-classes:** use correct asdict funciton ([#666](https://github.com/awslabs/aws-lambda-powertools-python/issues/666)) +* **feature-flags:** rules should evaluate with an AND op ([#724](https://github.com/awslabs/aws-lambda-powertools-python/issues/724)) +* **idempotency:** sorting keys before hashing ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) +* **idempotency:** sorting keys before hashing +* **logger:** push extra keys to the end ([#722](https://github.com/awslabs/aws-lambda-powertools-python/issues/722)) +* **mypy:** a few return types, type signatures, and untyped areas ([#718](https://github.com/awslabs/aws-lambda-powertools-python/issues/718)) + +## Code Refactoring + +* **data-classes:** clean up internal logic for APIGatewayAuthorizerResponse ([#643](https://github.com/awslabs/aws-lambda-powertools-python/issues/643)) + +## Documentation + +* Terraform reference for SAR Lambda Layer ([#716](https://github.com/awslabs/aws-lambda-powertools-python/issues/716)) +* add team behind it and email +* **event-handler:** document catch-all routes ([#705](https://github.com/awslabs/aws-lambda-powertools-python/issues/705)) +* **idempotency:** fix misleading idempotent examples ([#661](https://github.com/awslabs/aws-lambda-powertools-python/issues/661)) +* **jmespath:** clarify envelope terminology +* **parser:** fix incorrect import in root_validator example ([#735](https://github.com/awslabs/aws-lambda-powertools-python/issues/735)) + +## Features + +* expose jmespath powertools functions ([#736](https://github.com/awslabs/aws-lambda-powertools-python/issues/736)) +* add get_raw_configuration property in store; expose store +* boto3 sessions in batch, parameters & idempotency ([#717](https://github.com/awslabs/aws-lambda-powertools-python/issues/717)) +* **feature-flags:** Bring your own logger for debug ([#709](https://github.com/awslabs/aws-lambda-powertools-python/issues/709)) +* **feature-flags:** improve "IN/NOT_IN"; new rule actions ([#710](https://github.com/awslabs/aws-lambda-powertools-python/issues/710)) +* **feature-flags:** get_raw_configuration property in Store ([#720](https://github.com/awslabs/aws-lambda-powertools-python/issues/720)) +* **feature_flags:** Added inequality conditions ([#721](https://github.com/awslabs/aws-lambda-powertools-python/issues/721)) +* **idempotency:** makes customers unit testing easier ([#719](https://github.com/awslabs/aws-lambda-powertools-python/issues/719)) +* **validator:** include missing data elements from a validation error ([#686](https://github.com/awslabs/aws-lambda-powertools-python/issues/686)) + +## Maintenance + +* add python 3.9 support +* bump to 1.21.0 +* **deps:** bump boto3 from 1.18.41 to 1.18.49 ([#703](https://github.com/awslabs/aws-lambda-powertools-python/issues/703)) +* **deps:** bump boto3 from 1.18.32 to 1.18.38 ([#671](https://github.com/awslabs/aws-lambda-powertools-python/issues/671)) +* **deps:** bump boto3 from 1.18.38 to 1.18.41 ([#677](https://github.com/awslabs/aws-lambda-powertools-python/issues/677)) +* **deps:** bump boto3 from 1.18.51 to 1.18.54 ([#733](https://github.com/awslabs/aws-lambda-powertools-python/issues/733)) +* **deps:** bump boto3 from 1.18.49 to 1.18.51 ([#713](https://github.com/awslabs/aws-lambda-powertools-python/issues/713)) +* **deps:** bump codecov/codecov-action from 2.0.2 to 2.1.0 ([#675](https://github.com/awslabs/aws-lambda-powertools-python/issues/675)) +* **deps-dev:** bump flake8-bugbear from 21.9.1 to 21.9.2 ([#712](https://github.com/awslabs/aws-lambda-powertools-python/issues/712)) +* **deps-dev:** bump mkdocs-material from 7.3.0 to 7.3.1 ([#731](https://github.com/awslabs/aws-lambda-powertools-python/issues/731)) +* **deps-dev:** bump mkdocs-material from 7.2.8 to 7.3.0 ([#695](https://github.com/awslabs/aws-lambda-powertools-python/issues/695)) +* **deps-dev:** bump mkdocs-material from 7.2.6 to 7.2.8 ([#682](https://github.com/awslabs/aws-lambda-powertools-python/issues/682)) +* **deps-dev:** bump flake8-bugbear from 21.4.3 to 21.9.1 ([#676](https://github.com/awslabs/aws-lambda-powertools-python/issues/676)) +* **deps-dev:** bump coverage from 5.5 to 6.0 ([#732](https://github.com/awslabs/aws-lambda-powertools-python/issues/732)) +* **deps-dev:** bump radon from 4.5.2 to 5.1.0 ([#673](https://github.com/awslabs/aws-lambda-powertools-python/issues/673)) +* **deps-dev:** bump pytest-cov from 2.12.1 to 3.0.0 ([#730](https://github.com/awslabs/aws-lambda-powertools-python/issues/730)) +* **deps-dev:** bump xenon from 0.7.3 to 0.8.0 ([#669](https://github.com/awslabs/aws-lambda-powertools-python/issues/669)) + + + +## [v1.20.2] - 2021-09-02 +## Bug Fixes + +* Fix issue with strip_prefixes ([#647](https://github.com/awslabs/aws-lambda-powertools-python/issues/647)) + +## Maintenance + +* bump to 1.20.2 +* **deps:** bump boto3 from 1.18.26 to 1.18.32 ([#663](https://github.com/awslabs/aws-lambda-powertools-python/issues/663)) +* **deps-dev:** bump mkdocs-material from 7.2.4 to 7.2.6 ([#665](https://github.com/awslabs/aws-lambda-powertools-python/issues/665)) +* **deps-dev:** bump pytest from 6.2.4 to 6.2.5 ([#662](https://github.com/awslabs/aws-lambda-powertools-python/issues/662)) +* **license:** Add THIRD-PARTY-LICENSES ([#641](https://github.com/awslabs/aws-lambda-powertools-python/issues/641)) + + + +## [v1.20.1] - 2021-08-22 +## Bug Fixes + +* **idempotency:** sorting keys before hashing ([#639](https://github.com/awslabs/aws-lambda-powertools-python/issues/639)) + +## Maintenance + +* bump to 1.20.1 +* markdown linter fixes ([#636](https://github.com/awslabs/aws-lambda-powertools-python/issues/636)) +* setup codespaces ([#637](https://github.com/awslabs/aws-lambda-powertools-python/issues/637)) +* **license:** add third party license ([#635](https://github.com/awslabs/aws-lambda-powertools-python/issues/635)) + + + +## [v1.20.0] - 2021-08-21 +## Bug Fixes + +* **api-gateway:** HTTP API strip stage name from request path ([#622](https://github.com/awslabs/aws-lambda-powertools-python/issues/622)) +* **docs:** correct feature_flags link and json exmaples ([#605](https://github.com/awslabs/aws-lambda-powertools-python/issues/605)) + +## Code Refactoring + +* **event_handler:** match to match_results; 3.10 new keyword ([#616](https://github.com/awslabs/aws-lambda-powertools-python/issues/616)) + +## Documentation + +* **api-gateway:** add new API mapping support +* **data-class:** fix invalid syntax in new AppSync Authorizer +* **data-classes:** make authorizer concise; use enum ([#630](https://github.com/awslabs/aws-lambda-powertools-python/issues/630)) + +## Features + +* **data-classes:** authorizer for http api and rest api ([#620](https://github.com/awslabs/aws-lambda-powertools-python/issues/620)) +* **data-classes:** data_as_bytes prop KinesisStreamRecordPayload ([#628](https://github.com/awslabs/aws-lambda-powertools-python/issues/628)) +* **data-classes:** AppSync Lambda authorizer event ([#610](https://github.com/awslabs/aws-lambda-powertools-python/issues/610)) +* **event-handler:** prefixes to strip for custom mappings ([#579](https://github.com/awslabs/aws-lambda-powertools-python/issues/579)) +* **general:** support for Python 3.9 ([#626](https://github.com/awslabs/aws-lambda-powertools-python/issues/626)) +* **idempotency:** support for any synchronous function ([#625](https://github.com/awslabs/aws-lambda-powertools-python/issues/625)) + +## Maintenance + +* update changelog to reflect out-of-band commits +* bump to 1.20.0 +* update new changelog version tag +* **actions:** include new labels +* **api-docs:** enable allow_reuse to fix the docs ([#612](https://github.com/awslabs/aws-lambda-powertools-python/issues/612)) +* **deps:** bump boto3 from 1.18.25 to 1.18.26 ([#627](https://github.com/awslabs/aws-lambda-powertools-python/issues/627)) +* **deps:** bump boto3 from 1.18.24 to 1.18.25 ([#623](https://github.com/awslabs/aws-lambda-powertools-python/issues/623)) +* **deps:** bump boto3 from 1.18.22 to 1.18.24 ([#619](https://github.com/awslabs/aws-lambda-powertools-python/issues/619)) +* **deps:** bump boto3 from 1.18.21 to 1.18.22 ([#614](https://github.com/awslabs/aws-lambda-powertools-python/issues/614)) +* **deps:** bump boto3 from 1.18.17 to 1.18.21 ([#608](https://github.com/awslabs/aws-lambda-powertools-python/issues/608)) +* **deps-dev:** bump flake8-comprehensions from 3.6.0 to 3.6.1 ([#615](https://github.com/awslabs/aws-lambda-powertools-python/issues/615)) +* **deps-dev:** bump flake8-comprehensions from 3.5.0 to 3.6.0 ([#609](https://github.com/awslabs/aws-lambda-powertools-python/issues/609)) +* **deps-dev:** bump mkdocs-material from 7.2.3 to 7.2.4 ([#607](https://github.com/awslabs/aws-lambda-powertools-python/issues/607)) +* **docs:** correct markdown based on markdown lint ([#603](https://github.com/awslabs/aws-lambda-powertools-python/issues/603)) +* **shared:** fix cyclic import & refactor data extraction fn ([#613](https://github.com/awslabs/aws-lambda-powertools-python/issues/613)) + + + +## [v1.19.0] - 2021-08-11 +## Bug Fixes + +* **deps:** bump poetry to latest ([#592](https://github.com/awslabs/aws-lambda-powertools-python/issues/592)) +* **feature-flags:** bug handling multiple conditions ([#599](https://github.com/awslabs/aws-lambda-powertools-python/issues/599)) +* **feature-toggles:** correct cdk example ([#601](https://github.com/awslabs/aws-lambda-powertools-python/issues/601)) +* **parser:** apigw wss validation check_message_id; housekeeping ([#553](https://github.com/awslabs/aws-lambda-powertools-python/issues/553)) + +## Code Refactoring + +* **feature-flags:** add debug for all features evaluation" ([#590](https://github.com/awslabs/aws-lambda-powertools-python/issues/590)) +* **feature_flags:** optimize UX and maintenance ([#563](https://github.com/awslabs/aws-lambda-powertools-python/issues/563)) + +## Documentation + +* **event-handler:** new custom serializer option +* **feature-flags:** add guidance when to use vs env vars vs parameters +* **feature-flags:** fix sample feature name in evaluate +* **feature-flags:** create concrete documentation ([#594](https://github.com/awslabs/aws-lambda-powertools-python/issues/594)) +* **feature-toggles:** correct docs and typing ([#588](https://github.com/awslabs/aws-lambda-powertools-python/issues/588)) +* **feature_flags:** fix SAM infra, convert CDK to Python +* **parameters:** auto-transforming values based on suffix ([#573](https://github.com/awslabs/aws-lambda-powertools-python/issues/573)) +* **readme:** add code coverage badge ([#577](https://github.com/awslabs/aws-lambda-powertools-python/issues/577)) +* **tracer:** update wording that it auto-disables on non-Lambda env + +## Features + +* **api-gateway:** add support for custom serializer ([#568](https://github.com/awslabs/aws-lambda-powertools-python/issues/568)) +* **data-classes:** decode json_body if based64 encoded ([#560](https://github.com/awslabs/aws-lambda-powertools-python/issues/560)) +* **feature flags:** Add not_in action and rename contains to in ([#589](https://github.com/awslabs/aws-lambda-powertools-python/issues/589)) +* **params:** expose high level max_age, raise_on_transform_error ([#567](https://github.com/awslabs/aws-lambda-powertools-python/issues/567)) +* **tracer:** disable tracer when for non-Lambda envs ([#598](https://github.com/awslabs/aws-lambda-powertools-python/issues/598)) + +## Maintenance + +* only build docs on docs path +* update pypi description, keywords +* bump to 1.19.0 +* enable autolabel based on PR title +* include feature-flags docs hotfix +* **deps:** bump boto3 from 1.18.15 to 1.18.17 ([#597](https://github.com/awslabs/aws-lambda-powertools-python/issues/597)) +* **deps:** bump boto3 from 1.18.1 to 1.18.15 ([#591](https://github.com/awslabs/aws-lambda-powertools-python/issues/591)) +* **deps:** bump codecov/codecov-action from 2.0.1 to 2.0.2 ([#558](https://github.com/awslabs/aws-lambda-powertools-python/issues/558)) +* **deps-dev:** bump mkdocs-material from 7.2.1 to 7.2.2 ([#582](https://github.com/awslabs/aws-lambda-powertools-python/issues/582)) +* **deps-dev:** bump mkdocs-material from 7.2.2 to 7.2.3 ([#596](https://github.com/awslabs/aws-lambda-powertools-python/issues/596)) +* **deps-dev:** bump pdoc3 from 0.9.2 to 0.10.0 ([#584](https://github.com/awslabs/aws-lambda-powertools-python/issues/584)) +* **deps-dev:** bump isort from 5.9.2 to 5.9.3 ([#574](https://github.com/awslabs/aws-lambda-powertools-python/issues/574)) +* **deps-dev:** bump mkdocs-material from 7.2.0 to 7.2.1 ([#566](https://github.com/awslabs/aws-lambda-powertools-python/issues/566)) +* **deps-dev:** bump mkdocs-material from 7.1.11 to 7.2.0 ([#551](https://github.com/awslabs/aws-lambda-powertools-python/issues/551)) +* **deps-dev:** bump flake8-black from 0.2.1 to 0.2.3 ([#541](https://github.com/awslabs/aws-lambda-powertools-python/issues/541)) + + + +## [v1.18.1] - 2021-07-23 +## Bug Fixes + +* **api-gateway:** route regression non-word and unsafe URI chars ([#556](https://github.com/awslabs/aws-lambda-powertools-python/issues/556)) + +## Maintenance + +* bump 1.18.1 + + + +## [v1.18.0] - 2021-07-20 +## Bug Fixes + +* **api-gateway:** non-greedy route pattern regex ([#533](https://github.com/awslabs/aws-lambda-powertools-python/issues/533)) +* **api-gateway:** incorrect plain text mimetype [#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506) +* **data-classes:** include milliseconds in scalar types ([#504](https://github.com/awslabs/aws-lambda-powertools-python/issues/504)) +* **mypy:** fixes to resolve no implicit optional errors ([#521](https://github.com/awslabs/aws-lambda-powertools-python/issues/521)) +* **parser:** Make ApiGateway version, authorizer fields optional ([#532](https://github.com/awslabs/aws-lambda-powertools-python/issues/532)) +* **tracer:** mypy generic to preserve decorated method signature ([#529](https://github.com/awslabs/aws-lambda-powertools-python/issues/529)) + +## Code Refactoring + +* **feature-toggles:** Code coverage and housekeeping ([#530](https://github.com/awslabs/aws-lambda-powertools-python/issues/530)) + +## Documentation + +* **api-gateway:** document new HTTP service error exceptions ([#546](https://github.com/awslabs/aws-lambda-powertools-python/issues/546)) +* **logger:** document new get_correlation_id method ([#545](https://github.com/awslabs/aws-lambda-powertools-python/issues/545)) + +## Features + +* **api-gateway:** add debug mode ([#507](https://github.com/awslabs/aws-lambda-powertools-python/issues/507)) +* **api-gateway:** add common service errors ([#506](https://github.com/awslabs/aws-lambda-powertools-python/issues/506)) +* **event-handler:** Support AppSyncResolverEvent subclassing ([#526](https://github.com/awslabs/aws-lambda-powertools-python/issues/526)) +* **feat-toggle:** New simple feature toggles rule engine (WIP) ([#494](https://github.com/awslabs/aws-lambda-powertools-python/issues/494)) +* **logger:** add get_correlation_id method ([#516](https://github.com/awslabs/aws-lambda-powertools-python/issues/516)) +* **mypy:** add mypy support to makefile ([#508](https://github.com/awslabs/aws-lambda-powertools-python/issues/508)) + +## Maintenance + +* bump 1.18.0 ([#547](https://github.com/awslabs/aws-lambda-powertools-python/issues/547)) +* **deps:** bump codecov/codecov-action from 1 to 2.0.1 ([#539](https://github.com/awslabs/aws-lambda-powertools-python/issues/539)) +* **deps:** bump boto3 from 1.18.0 to 1.18.1 ([#528](https://github.com/awslabs/aws-lambda-powertools-python/issues/528)) +* **deps:** bump boto3 from 1.17.110 to 1.18.0 ([#527](https://github.com/awslabs/aws-lambda-powertools-python/issues/527)) +* **deps:** bump boto3 from 1.17.102 to 1.17.110 ([#523](https://github.com/awslabs/aws-lambda-powertools-python/issues/523)) +* **deps-dev:** bump mkdocs-material from 7.1.10 to 7.1.11 ([#542](https://github.com/awslabs/aws-lambda-powertools-python/issues/542)) +* **deps-dev:** bump mkdocs-material from 7.1.9 to 7.1.10 ([#522](https://github.com/awslabs/aws-lambda-powertools-python/issues/522)) +* **deps-dev:** bump isort from 5.9.1 to 5.9.2 ([#514](https://github.com/awslabs/aws-lambda-powertools-python/issues/514)) +* **event-handler:** adjusts exception docstrings to not confuse AppSync customers + + + +## [v1.17.1] - 2021-07-02 +## Bug Fixes + +* **validator:** handle built-in custom formats correctly ([#498](https://github.com/awslabs/aws-lambda-powertools-python/issues/498)) + +## Documentation + +* add Layers example for Serverless framework & CDK ([#500](https://github.com/awslabs/aws-lambda-powertools-python/issues/500)) +* enable dark mode switch ([#471](https://github.com/awslabs/aws-lambda-powertools-python/issues/471)) +* **logger:** add FAQ for cross-account searches ([#501](https://github.com/awslabs/aws-lambda-powertools-python/issues/501)) +* **tracer:** additional scenario when to disable auto-capture ([#499](https://github.com/awslabs/aws-lambda-powertools-python/issues/499)) + +## Maintenance + +* bump 1.17.1 ([#502](https://github.com/awslabs/aws-lambda-powertools-python/issues/502)) +* **deps:** bump boto3 from 1.17.101 to 1.17.102 ([#493](https://github.com/awslabs/aws-lambda-powertools-python/issues/493)) +* **deps:** bump boto3 from 1.17.91 to 1.17.101 ([#490](https://github.com/awslabs/aws-lambda-powertools-python/issues/490)) +* **deps:** bump email-validator from 1.1.2 to 1.1.3 ([#478](https://github.com/awslabs/aws-lambda-powertools-python/issues/478)) +* **deps:** bump boto3 from 1.17.89 to 1.17.91 ([#473](https://github.com/awslabs/aws-lambda-powertools-python/issues/473)) +* **deps-dev:** bump flake8-eradicate from 1.0.0 to 1.1.0 ([#492](https://github.com/awslabs/aws-lambda-powertools-python/issues/492)) +* **deps-dev:** bump isort from 5.8.0 to 5.9.1 ([#487](https://github.com/awslabs/aws-lambda-powertools-python/issues/487)) +* **deps-dev:** bump mkdocs-material from 7.1.7 to 7.1.9 ([#491](https://github.com/awslabs/aws-lambda-powertools-python/issues/491)) + + + +## [v1.17.0] - 2021-06-08 +## Documentation + +* include new public roadmap ([#452](https://github.com/awslabs/aws-lambda-powertools-python/issues/452)) +* **data_classes:** fix missing dynamodb stream get_type/value +* **idempotency:** remove old todo + +## Features + +* **data-classes:** add AttributeValueType to DynamoDBStreamEvent ([#462](https://github.com/awslabs/aws-lambda-powertools-python/issues/462)) +* **data-classes:** decorator to instantiate data_classes and docs updates ([#442](https://github.com/awslabs/aws-lambda-powertools-python/issues/442)) +* **logger:** add option to clear state per invocation ([#467](https://github.com/awslabs/aws-lambda-powertools-python/issues/467)) +* **parser:** add support for API Gateway HTTP API [#434](https://github.com/awslabs/aws-lambda-powertools-python/issues/434) ([#441](https://github.com/awslabs/aws-lambda-powertools-python/issues/441)) + +## Maintenance + +* bump xenon from 0.7.1 to 0.7.3 ([#446](https://github.com/awslabs/aws-lambda-powertools-python/issues/446)) +* fix changelog file redirection +* include dependencies label under maintenance +* ignore codecov upload +* reintroduce codecov token +* fix path for PR auto-labelling +* assited changelog pre-generation, auto-label PR ([#443](https://github.com/awslabs/aws-lambda-powertools-python/issues/443)) +* enable dependabot for dep upgrades ([#444](https://github.com/awslabs/aws-lambda-powertools-python/issues/444)) +* enable mergify ([#450](https://github.com/awslabs/aws-lambda-powertools-python/issues/450)) +* dependabot/mergify guardrail for major versions +* fix dependabot commit messages prefix +* fix dependabot unique set config +* bump mkdocs-material from 7.1.5 to 7.1.6 ([#451](https://github.com/awslabs/aws-lambda-powertools-python/issues/451)) +* bump version to 1.17.0 +* bump boto3 from 1.17.78 to 1.17.84 ([#449](https://github.com/awslabs/aws-lambda-powertools-python/issues/449)) +* update mergify to require approval on dependabot ([#456](https://github.com/awslabs/aws-lambda-powertools-python/issues/456)) +* bump actions/setup-python from 1 to 2.2.2 ([#445](https://github.com/awslabs/aws-lambda-powertools-python/issues/445)) +* trial boring cyborg automation +* **deps:** bump boto3 from 1.17.87 to 1.17.88 ([#463](https://github.com/awslabs/aws-lambda-powertools-python/issues/463)) +* **deps:** bump boto3 from 1.17.88 to 1.17.89 ([#466](https://github.com/awslabs/aws-lambda-powertools-python/issues/466)) +* **deps:** bump boto3 from 1.17.84 to 1.17.85 ([#455](https://github.com/awslabs/aws-lambda-powertools-python/issues/455)) +* **deps:** bump boto3 from 1.17.85 to 1.17.86 ([#458](https://github.com/awslabs/aws-lambda-powertools-python/issues/458)) +* **deps:** bump boto3 from 1.17.86 to 1.17.87 ([#459](https://github.com/awslabs/aws-lambda-powertools-python/issues/459)) +* **deps-dev:** bump mkdocs-material from 7.1.6 to 7.1.7 ([#464](https://github.com/awslabs/aws-lambda-powertools-python/issues/464)) +* **deps-dev:** bump pytest-cov from 2.12.0 to 2.12.1 ([#454](https://github.com/awslabs/aws-lambda-powertools-python/issues/454)) +* **mergify:** use job name to match GH Actions +* **mergify:** disable check for matrix jobs + + + +## [v1.16.1] - 2021-05-23 +## Features + +* **parser:** security issue in Pydantic [#436](https://github.com/awslabs/aws-lambda-powertools-python/issues/436) ([#437](https://github.com/awslabs/aws-lambda-powertools-python/issues/437)) + +## Maintenance + +* bump to 1.16.1 + + + +## [v1.16.0] - 2021-05-17 +## Features + +* **data-classes:** decode base64 encoded body ([#425](https://github.com/awslabs/aws-lambda-powertools-python/issues/425)) +* **data-classes:** support for code pipeline job event ([#416](https://github.com/awslabs/aws-lambda-powertools-python/issues/416)) + +## Maintenance + +* bump to 1.16.0 + + + +## [v1.15.1] - 2021-05-13 +## Bug Fixes + +* **docs:** Use updated names for ProxyEventType ([#424](https://github.com/awslabs/aws-lambda-powertools-python/issues/424)) + +## Documentation + +* update list of features +* **event_handler:** add missing note on trimmed responses + +## Maintenance + +* bump to 1.15.1 + + + +## [v1.15.0] - 2021-05-06 +## Bug Fixes + +* **deps:** Bump aws-xray-sdk from 2.6.0 to 2.8.0 ([#413](https://github.com/awslabs/aws-lambda-powertools-python/issues/413)) +* **docs:** workflow to include api ref in latest alias ([#408](https://github.com/awslabs/aws-lambda-powertools-python/issues/408)) +* **parser:** Improve types for parser.py ([#419](https://github.com/awslabs/aws-lambda-powertools-python/issues/419)) +* **validator:** event type annotation as any in validate fn ([#405](https://github.com/awslabs/aws-lambda-powertools-python/issues/405)) + +## Code Refactoring + +* simplify custom formatter for minor changes ([#417](https://github.com/awslabs/aws-lambda-powertools-python/issues/417)) +* **event-handler:** api gateway handler review changes ([#420](https://github.com/awslabs/aws-lambda-powertools-python/issues/420)) +* **event-handler:** Add ResponseBuilder and more docs ([#412](https://github.com/awslabs/aws-lambda-powertools-python/issues/412)) +* **logger:** BYOFormatter and Handler, UTC support, and more ([#404](https://github.com/awslabs/aws-lambda-powertools-python/issues/404)) + +## Documentation + +* **api_gateway:** new event handler for API Gateway and ALB ([#418](https://github.com/awslabs/aws-lambda-powertools-python/issues/418)) +* **event_handler:** fix closing brackets in CORS sample +* **event_handler:** remove beta flag from new HTTP utility +* **idempotency:** remove beta flag +* **logger:** improvements extensibility & new features ([#415](https://github.com/awslabs/aws-lambda-powertools-python/issues/415)) +* **parser:** fix table and heading syntax +* **tracer:** Fix line highlighting ([#395](https://github.com/awslabs/aws-lambda-powertools-python/issues/395)) + +## Features + +* add support to persist default dimensions ([#410](https://github.com/awslabs/aws-lambda-powertools-python/issues/410)) +* **event-handle:** allow for cors=None setting ([#421](https://github.com/awslabs/aws-lambda-powertools-python/issues/421)) +* **event-handler:** add http ProxyEvent handler ([#369](https://github.com/awslabs/aws-lambda-powertools-python/issues/369)) +* **parser:** Support for API GW v1 proxy schema & envelope ([#403](https://github.com/awslabs/aws-lambda-powertools-python/issues/403)) + +## Maintenance + +* bump to 1.15.0 ([#422](https://github.com/awslabs/aws-lambda-powertools-python/issues/422)) @@ -1776,7 +2317,47 @@ * Merge pull request [#5](https://github.com/awslabs/aws-lambda-powertools-python/issues/5) from jfuss/feat/python38 -[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.14.0...HEAD +[Unreleased]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.28.0...HEAD +[v1.28.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.27.0...v1.28.0 +[v1.27.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.7...v1.27.0 +[v1.26.7]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.6...v1.26.7 +[v1.26.6]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.5...v1.26.6 +[v1.26.5]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.4...v1.26.5 +[v1.26.4]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.3...v1.26.4 +[v1.26.3]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.2...v1.26.3 +[v1.26.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.1...v1.26.2 +[v1.26.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.26.0...v1.26.1 +[v1.26.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.10...v1.26.0 +[v1.25.10]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.9...v1.25.10 +[v1.25.9]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.8...v1.25.9 +[v1.25.8]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.7...v1.25.8 +[v1.25.7]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.6...v1.25.7 +[v1.25.6]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.5...v1.25.6 +[v1.25.5]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.4...v1.25.5 +[v1.25.4]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.3...v1.25.4 +[v1.25.3]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.2...v1.25.3 +[v1.25.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.1...v1.25.2 +[v1.25.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.25.0...v1.25.1 +[v1.25.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.24.2...v1.25.0 +[v1.24.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.24.1...v1.24.2 +[v1.24.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.24.0...v1.24.1 +[v1.24.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.23.0...v1.24.0 +[v1.23.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.22.0...v1.23.0 +[v1.22.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.21.1...v1.22.0 +[v1.21.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.21.0...v1.21.1 +[v1.21.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.20.2...v1.21.0 +[v1.20.2]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.20.1...v1.20.2 +[v1.20.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.20.0...v1.20.1 +[v1.20.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.19.0...v1.20.0 +[v1.19.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.18.1...v1.19.0 +[v1.18.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.18.0...v1.18.1 +[v1.18.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.17.1...v1.18.0 +[v1.17.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.17.0...v1.17.1 +[v1.17.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.16.1...v1.17.0 +[v1.16.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.16.0...v1.16.1 +[v1.16.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.15.1...v1.16.0 +[v1.15.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.15.0...v1.15.1 +[v1.15.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.14.0...v1.15.0 [v1.14.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.13.0...v1.14.0 [v1.13.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.12.0...v1.13.0 [v1.12.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.11.0...v1.12.0 @@ -1806,4 +2387,4 @@ [v1.0.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v1.0.0...v1.0.1 [v1.0.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v0.11.0...v1.0.0 [v0.11.0]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v0.10.1...v0.11.0 -[v0.10.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v0.10.0...v0.10.1 +[v0.10.1]: https://github.com/awslabs/aws-lambda-powertools-python/compare/v0.10.0...v0.10.1 \ No newline at end of file diff --git a/aws_lambda_powertools/utilities/parser/envelopes/__init__.py b/aws_lambda_powertools/utilities/parser/envelopes/__init__.py index 7d42fd81ad6..4b0e4c943a2 100644 --- a/aws_lambda_powertools/utilities/parser/envelopes/__init__.py +++ b/aws_lambda_powertools/utilities/parser/envelopes/__init__.py @@ -4,6 +4,7 @@ from .cloudwatch import CloudWatchLogsEnvelope from .dynamodb import DynamoDBStreamEnvelope from .event_bridge import EventBridgeEnvelope +from .kafka import KafkaEnvelope from .kinesis import KinesisDataStreamEnvelope from .lambda_function_url import LambdaFunctionUrlEnvelope from .sns import SnsEnvelope, SnsSqsEnvelope @@ -20,5 +21,6 @@ "SnsEnvelope", "SnsSqsEnvelope", "SqsEnvelope", + "KafkaEnvelope", "BaseEnvelope", ] diff --git a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py new file mode 100644 index 00000000000..443b3d49ad5 --- /dev/null +++ b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py @@ -0,0 +1,41 @@ +import logging +from typing import Any, Dict, List, Optional, Type, Union + +from ..models import KafkaEventModel +from ..types import Model +from .base import BaseEnvelope + +logger = logging.getLogger(__name__) + + +class KafkaEnvelope(BaseEnvelope): + """Kafka event envelope to extract data within body key + The record's body parameter is a string, though it can also be a JSON encoded string. + Regardless of its type it'll be parsed into a BaseModel object. + + Note: Records will be parsed the same way so if model is str, + all items in the list will be parsed as str and npt as JSON (and vice versa) + """ + + def parse(self, data: Optional[Union[Dict[str, Any], Any]], model: Type[Model]) -> List[Optional[Model]]: + """Parses data found with model provided + + Parameters + ---------- + data : Dict + Lambda event to be parsed + model : Type[Model] + Data model provided to parse after extracting data using envelope + + Returns + ------- + Any + Parsed detail payload with model provided + """ + logger.debug(f"Parsing incoming data with Kafka event model {KafkaEventModel}") + parsed_envelope: KafkaEventModel = KafkaEventModel.parse_obj(data) + logger.debug(f"Parsing Kafka event records in `value` with {model}") + ret_list = [] + for records in parsed_envelope.records.values(): + ret_list += [self._parse(data=record.value, model=model) for record in records] + return ret_list diff --git a/aws_lambda_powertools/utilities/parser/models/__init__.py b/aws_lambda_powertools/utilities/parser/models/__init__.py index 11ab6501fa9..57a1c5d8ad4 100644 --- a/aws_lambda_powertools/utilities/parser/models/__init__.py +++ b/aws_lambda_powertools/utilities/parser/models/__init__.py @@ -17,6 +17,7 @@ from .cloudwatch import CloudWatchLogsData, CloudWatchLogsDecode, CloudWatchLogsLogEvent, CloudWatchLogsModel from .dynamodb import DynamoDBStreamChangedRecordModel, DynamoDBStreamModel, DynamoDBStreamRecordModel from .event_bridge import EventBridgeModel +from .kafka import KafkaEventModel, KafkaRecordModel from .kinesis import KinesisDataStreamModel, KinesisDataStreamRecord, KinesisDataStreamRecordPayload from .lambda_function_url import LambdaFunctionUrlModel from .s3 import S3Model, S3RecordModel @@ -98,4 +99,6 @@ "APIGatewayEventRequestContext", "APIGatewayEventAuthorizer", "APIGatewayEventIdentity", + "KafkaEventModel", + "KafkaRecordModel", ] diff --git a/aws_lambda_powertools/utilities/parser/models/kafka.py b/aws_lambda_powertools/utilities/parser/models/kafka.py new file mode 100644 index 00000000000..870e238eed0 --- /dev/null +++ b/aws_lambda_powertools/utilities/parser/models/kafka.py @@ -0,0 +1,70 @@ +import base64 +import logging +from binascii import Error as BinAsciiError +from datetime import datetime +from typing import Dict, List, Optional, Type, Union + +from pydantic import BaseModel, validator + +from aws_lambda_powertools.utilities.parser.types import Literal + +SERVERS_DELIMITER = "," + +logger = logging.getLogger(__name__) + + +def _base64_decode(value: str) -> bytes: + try: + logger.debug("Decoding base64 Kafka record item before parsing") + return base64.b64decode(value) + except (BinAsciiError, TypeError): + raise ValueError("base64 decode failed") + + +def _bytes_to_string(value: bytes) -> str: + try: + return value.decode("utf-8") + except (BinAsciiError, TypeError): + raise ValueError("base64 UTF-8 decode failed") + + +class KafkaRecordModel(BaseModel): + topic: str + partition: int + offset: int + timestamp: datetime + timestampType: str + key: bytes + value: Union[str, Type[BaseModel]] + headers: List[Dict[str, bytes]] + + # validators + _decode_key = validator("key", allow_reuse=True)(_base64_decode) + + @validator("value", pre=True, allow_reuse=True) + def data_base64_decode(cls, value): + as_bytes = _base64_decode(value) + return _bytes_to_string(as_bytes) + + @validator("headers", pre=True, allow_reuse=True) + def decode_headers_list(cls, value): + for header in value: + for key, values in header.items(): + header[key] = bytes(values) + return value + + +class KafkaEventModel(BaseModel): + """Self-managed Apache Kafka event trigger + Documentation: + -------------- + - https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html + """ + + eventSource: Literal["aws:SelfManagedKafka"] + bootstrapServers: Optional[List[str]] + records: Dict[str, List[KafkaRecordModel]] + + @validator("bootstrapServers", pre=True, allow_reuse=True) + def split_servers(cls, value): + return None if not value else value.split(SERVERS_DELIMITER) diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md index 97b005a9fb5..28a5755b547 100644 --- a/docs/utilities/parser.md +++ b/docs/utilities/parser.md @@ -168,6 +168,7 @@ Parser comes with the following built-in models: | **APIGatewayProxyEventModel** | Lambda Event Source payload for Amazon API Gateway | | **APIGatewayProxyEventV2Model** | Lambda Event Source payload for Amazon API Gateway v2 payload | | **LambdaFunctionUrlModel** | Lambda Event Source payload for Lambda Function URL payload | +| **KafkaModel** | Lambda Event Source payload for self managed Kafka payload | ### extending built-in models @@ -308,6 +309,7 @@ Parser comes with the following built-in envelopes, where `Model` in the return | **ApiGatewayEnvelope** | 1. Parses data using `APIGatewayProxyEventModel`.
2. Parses `body` key using your model and returns it. | `Model` | | **ApiGatewayV2Envelope** | 1. Parses data using `APIGatewayProxyEventV2Model`.
2. Parses `body` key using your model and returns it. | `Model` | | **LambdaFunctionUrlEnvelope** | 1. Parses data using `LambdaFunctionUrlModel`.
2. Parses `body` key using your model and returns it. | `Model` | +| **KafkaEnvelope** | 1. Parses data using `KafkaRecordModel`.
2. Parses `value` key using your model and returns it. | `Model` | ### Bringing your own envelope diff --git a/tests/events/kafkaEvent.json b/tests/events/kafkaEvent.json new file mode 100644 index 00000000000..18f7590ba76 --- /dev/null +++ b/tests/events/kafkaEvent.json @@ -0,0 +1,34 @@ +{ + "eventSource": "aws:SelfManagedKafka", + "bootstrapServers": "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + "records": { + "mytopic-0": [ + { + "topic": "mytopic", + "partition": 0, + "offset": 15, + "timestamp": 1545084650987, + "timestampType": "CREATE_TIME", + "key": "cmVjb3JkS2V5", + "value": "eyJrZXkiOiJ2YWx1ZSJ9", + "headers": [ + { + "headerKey": [ + 104, + 101, + 97, + 100, + 101, + 114, + 86, + 97, + 108, + 117, + 101 + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/tests/functional/parser/schemas.py b/tests/functional/parser/schemas.py index 79a74f8eb53..51c74903ef9 100644 --- a/tests/functional/parser/schemas.py +++ b/tests/functional/parser/schemas.py @@ -91,3 +91,7 @@ class MyApiGatewayBusiness(BaseModel): class MyALambdaFuncUrlBusiness(BaseModel): message: str username: str + + +class MyALambdaKafkaBusiness(BaseModel): + key: str diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py new file mode 100644 index 00000000000..e3f47a84846 --- /dev/null +++ b/tests/functional/parser/test_kafka.py @@ -0,0 +1,49 @@ +from typing import List + +from aws_lambda_powertools.utilities.parser import envelopes, event_parser +from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel +from aws_lambda_powertools.utilities.typing import LambdaContext +from tests.functional.parser.schemas import MyALambdaKafkaBusiness +from tests.functional.utils import load_event + + +@event_parser(model=MyALambdaKafkaBusiness, envelope=envelopes.KafkaEnvelope) +def handle_lambda_kafka_with_envelope(event: List[MyALambdaKafkaBusiness], _: LambdaContext): + assert event[0].key == "value" + assert len(event) == 1 + + +@event_parser(model=KafkaEventModel) +def handle_kafka_event(event: KafkaEventModel, _: LambdaContext): + return event + + +def test_kafka_event_with_envelope(): + event = load_event("kafkaEvent.json") + handle_lambda_kafka_with_envelope(event, LambdaContext()) + + +def test_kafka_event(): + json_event = load_event("kafkaEvent.json") + event: KafkaEventModel = handle_kafka_event(json_event, LambdaContext()) + assert event.eventSource == "aws:SelfManagedKafka" + bootstrap_servers = [ + "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + "b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + ] + assert event.bootstrapServers == bootstrap_servers + + records = list(event.records["mytopic-0"]) + assert len(records) == 1 + record: KafkaRecordModel = records[0] + assert record.topic == "mytopic" + assert record.partition == 0 + assert record.offset == 15 + assert record.timestamp is not None + convert_time = int(round(record.timestamp.timestamp() * 1000)) + assert convert_time == 1545084650987 + assert record.timestampType == "CREATE_TIME" + assert record.key == b"recordKey" + assert record.value == '{"key":"value"}' + assert len(record.headers) == 1 + assert record.headers[0]["headerKey"] == b"headerValue" From 574a389ea97b04306e800a7561de1cd6d46ac1c8 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Sun, 4 Sep 2022 17:34:46 +0300 Subject: [PATCH 11/24] feature: Kafka Parser support --- aws_lambda_powertools/utilities/parser/envelopes/kafka.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py index 443b3d49ad5..1711f86f6b6 100644 --- a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py +++ b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py @@ -29,8 +29,8 @@ def parse(self, data: Optional[Union[Dict[str, Any], Any]], model: Type[Model]) Returns ------- - Any - Parsed detail payload with model provided + List + List of records parsed with model provided """ logger.debug(f"Parsing incoming data with Kafka event model {KafkaEventModel}") parsed_envelope: KafkaEventModel = KafkaEventModel.parse_obj(data) From c0df7976f33027bd24d262e70bf57fa27fb2ab6b Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Mon, 5 Sep 2022 22:56:15 +0300 Subject: [PATCH 12/24] cr fixes --- .../utilities/parser/models/__init__.py | 4 +- .../utilities/parser/models/kafka.py | 26 ++++++++++--- docs/utilities/parser.md | 1 + tests/functional/parser/test_kafka.py | 39 ++++++++++++++++++- 4 files changed, 61 insertions(+), 9 deletions(-) diff --git a/aws_lambda_powertools/utilities/parser/models/__init__.py b/aws_lambda_powertools/utilities/parser/models/__init__.py index 57a1c5d8ad4..d733182b429 100644 --- a/aws_lambda_powertools/utilities/parser/models/__init__.py +++ b/aws_lambda_powertools/utilities/parser/models/__init__.py @@ -17,7 +17,7 @@ from .cloudwatch import CloudWatchLogsData, CloudWatchLogsDecode, CloudWatchLogsLogEvent, CloudWatchLogsModel from .dynamodb import DynamoDBStreamChangedRecordModel, DynamoDBStreamModel, DynamoDBStreamRecordModel from .event_bridge import EventBridgeModel -from .kafka import KafkaEventModel, KafkaRecordModel +from .kafka import KafkaBaseEventModel, KafkaEventModel, KafkaRecordModel, MSKEventModel from .kinesis import KinesisDataStreamModel, KinesisDataStreamRecord, KinesisDataStreamRecordPayload from .lambda_function_url import LambdaFunctionUrlModel from .s3 import S3Model, S3RecordModel @@ -101,4 +101,6 @@ "APIGatewayEventIdentity", "KafkaEventModel", "KafkaRecordModel", + "MSKEventModel", + "KafkaBaseEventModel", ] diff --git a/aws_lambda_powertools/utilities/parser/models/kafka.py b/aws_lambda_powertools/utilities/parser/models/kafka.py index 870e238eed0..dedb65c64bf 100644 --- a/aws_lambda_powertools/utilities/parser/models/kafka.py +++ b/aws_lambda_powertools/utilities/parser/models/kafka.py @@ -54,7 +54,16 @@ def decode_headers_list(cls, value): return value -class KafkaEventModel(BaseModel): +class KafkaBaseEventModel(BaseModel): + bootstrapServers: Optional[List[str]] + records: Dict[str, List[KafkaRecordModel]] + + @validator("bootstrapServers", pre=True, allow_reuse=True) + def split_servers(cls, value): + return None if not value else value.split(SERVERS_DELIMITER) + + +class KafkaEventModel(KafkaBaseEventModel): """Self-managed Apache Kafka event trigger Documentation: -------------- @@ -62,9 +71,14 @@ class KafkaEventModel(BaseModel): """ eventSource: Literal["aws:SelfManagedKafka"] - bootstrapServers: Optional[List[str]] - records: Dict[str, List[KafkaRecordModel]] - @validator("bootstrapServers", pre=True, allow_reuse=True) - def split_servers(cls, value): - return None if not value else value.split(SERVERS_DELIMITER) + +class MSKEventModel(KafkaBaseEventModel): + """Fully-managed AWS Apache Kafka event trigger + Documentation: + -------------- + - https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html + """ + + eventSource: Literal["aws:kafka"] + eventSourceArn: str diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md index 28a5755b547..e66937288f2 100644 --- a/docs/utilities/parser.md +++ b/docs/utilities/parser.md @@ -169,6 +169,7 @@ Parser comes with the following built-in models: | **APIGatewayProxyEventV2Model** | Lambda Event Source payload for Amazon API Gateway v2 payload | | **LambdaFunctionUrlModel** | Lambda Event Source payload for Lambda Function URL payload | | **KafkaModel** | Lambda Event Source payload for self managed Kafka payload | +| **MSKEventModel** | Lambda Event Source payload for AWS MSK payload | ### extending built-in models diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index e3f47a84846..3f2a1eb6122 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -1,7 +1,7 @@ from typing import List from aws_lambda_powertools.utilities.parser import envelopes, event_parser -from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel +from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel, MSKEventModel from aws_lambda_powertools.utilities.typing import LambdaContext from tests.functional.parser.schemas import MyALambdaKafkaBusiness from tests.functional.utils import load_event @@ -23,7 +23,7 @@ def test_kafka_event_with_envelope(): handle_lambda_kafka_with_envelope(event, LambdaContext()) -def test_kafka_event(): +def test_self_managed_kafka_event(): json_event = load_event("kafkaEvent.json") event: KafkaEventModel = handle_kafka_event(json_event, LambdaContext()) assert event.eventSource == "aws:SelfManagedKafka" @@ -47,3 +47,38 @@ def test_kafka_event(): assert record.value == '{"key":"value"}' assert len(record.headers) == 1 assert record.headers[0]["headerKey"] == b"headerValue" + + +@event_parser(model=MSKEventModel) +def handle_msk_event(event: MSKEventModel, _: LambdaContext): + return event + + +def test_msk_event(): + json_event = load_event("kafkaEventMsk.json") + event: MSKEventModel = handle_msk_event(json_event, LambdaContext()) + assert event.eventSource == "aws:kafka" + bootstrap_servers = [ + "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + "b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + ] + assert event.bootstrapServers == bootstrap_servers + assert ( + event.eventSourceArn + == "arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4" + ) + + records = list(event.records["mytopic-0"]) + assert len(records) == 1 + record: KafkaRecordModel = records[0] + assert record.topic == "mytopic" + assert record.partition == 0 + assert record.offset == 15 + assert record.timestamp is not None + convert_time = int(round(record.timestamp.timestamp() * 1000)) + assert convert_time == 1545084650987 + assert record.timestampType == "CREATE_TIME" + assert record.key == b"recordKey" + assert record.value == '{"key":"value"}' + assert len(record.headers) == 1 + assert record.headers[0]["headerKey"] == b"headerValue" From a918a94d7231306e201ae8ff1d2ab188b45722a4 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Mon, 5 Sep 2022 22:58:04 +0300 Subject: [PATCH 13/24] cr fixes --- aws_lambda_powertools/utilities/parser/models/__init__.py | 4 ++-- aws_lambda_powertools/utilities/parser/models/kafka.py | 2 +- docs/utilities/parser.md | 2 +- tests/functional/parser/test_kafka.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aws_lambda_powertools/utilities/parser/models/__init__.py b/aws_lambda_powertools/utilities/parser/models/__init__.py index d733182b429..b00b5a1dc57 100644 --- a/aws_lambda_powertools/utilities/parser/models/__init__.py +++ b/aws_lambda_powertools/utilities/parser/models/__init__.py @@ -17,7 +17,7 @@ from .cloudwatch import CloudWatchLogsData, CloudWatchLogsDecode, CloudWatchLogsLogEvent, CloudWatchLogsModel from .dynamodb import DynamoDBStreamChangedRecordModel, DynamoDBStreamModel, DynamoDBStreamRecordModel from .event_bridge import EventBridgeModel -from .kafka import KafkaBaseEventModel, KafkaEventModel, KafkaRecordModel, MSKEventModel +from .kafka import KafkaBaseEventModel, KafkaEventModel, KafkaRecordModel, MskEventModel from .kinesis import KinesisDataStreamModel, KinesisDataStreamRecord, KinesisDataStreamRecordPayload from .lambda_function_url import LambdaFunctionUrlModel from .s3 import S3Model, S3RecordModel @@ -101,6 +101,6 @@ "APIGatewayEventIdentity", "KafkaEventModel", "KafkaRecordModel", - "MSKEventModel", + "MskEventModel", "KafkaBaseEventModel", ] diff --git a/aws_lambda_powertools/utilities/parser/models/kafka.py b/aws_lambda_powertools/utilities/parser/models/kafka.py index dedb65c64bf..7977d341ad7 100644 --- a/aws_lambda_powertools/utilities/parser/models/kafka.py +++ b/aws_lambda_powertools/utilities/parser/models/kafka.py @@ -73,7 +73,7 @@ class KafkaEventModel(KafkaBaseEventModel): eventSource: Literal["aws:SelfManagedKafka"] -class MSKEventModel(KafkaBaseEventModel): +class MskEventModel(KafkaBaseEventModel): """Fully-managed AWS Apache Kafka event trigger Documentation: -------------- diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md index e66937288f2..789c158d8b8 100644 --- a/docs/utilities/parser.md +++ b/docs/utilities/parser.md @@ -169,7 +169,7 @@ Parser comes with the following built-in models: | **APIGatewayProxyEventV2Model** | Lambda Event Source payload for Amazon API Gateway v2 payload | | **LambdaFunctionUrlModel** | Lambda Event Source payload for Lambda Function URL payload | | **KafkaModel** | Lambda Event Source payload for self managed Kafka payload | -| **MSKEventModel** | Lambda Event Source payload for AWS MSK payload | +| **MskEventModel** | Lambda Event Source payload for AWS MSK payload | ### extending built-in models diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index 3f2a1eb6122..64faac5fc1c 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -1,7 +1,7 @@ from typing import List from aws_lambda_powertools.utilities.parser import envelopes, event_parser -from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel, MSKEventModel +from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel, MskEventModel from aws_lambda_powertools.utilities.typing import LambdaContext from tests.functional.parser.schemas import MyALambdaKafkaBusiness from tests.functional.utils import load_event @@ -49,14 +49,14 @@ def test_self_managed_kafka_event(): assert record.headers[0]["headerKey"] == b"headerValue" -@event_parser(model=MSKEventModel) -def handle_msk_event(event: MSKEventModel, _: LambdaContext): +@event_parser(model=MskEventModel) +def handle_msk_event(event: MskEventModel, _: LambdaContext): return event def test_msk_event(): json_event = load_event("kafkaEventMsk.json") - event: MSKEventModel = handle_msk_event(json_event, LambdaContext()) + event: MskEventModel = handle_msk_event(json_event, LambdaContext()) assert event.eventSource == "aws:kafka" bootstrap_servers = [ "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", From 06c94c9a1978a17d6074e7e5e85682717d8eac48 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Tue, 6 Sep 2022 10:08:19 +0300 Subject: [PATCH 14/24] docs fix --- docs/core/event_handler/api_gateway.md | 52 +++++++++++++++++++------- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/docs/core/event_handler/api_gateway.md b/docs/core/event_handler/api_gateway.md index e9a3358e257..934465d6b96 100644 --- a/docs/core/event_handler/api_gateway.md +++ b/docs/core/event_handler/api_gateway.md @@ -3,11 +3,11 @@ title: REST API description: Core utility --- -Event handler for Amazon API Gateway REST and HTTP APIs, and Application Loader Balancer (ALB). +Event handler for Amazon API Gateway REST and HTTP APIs, Application Loader Balancer (ALB), and Lambda Function URLs. ## Key Features -* Lightweight routing to reduce boilerplate for API Gateway REST/HTTP API and ALB +* Lightweight routing to reduce boilerplate for API Gateway REST/HTTP API, ALB and Lambda Function URLs. * Support for CORS, binary and Gzip compression, Decimals JSON encoding and bring your own JSON serializer * Built-in integration with [Event Source Data Classes utilities](../../utilities/data_classes.md){target="_blank"} for self-documented event schema @@ -18,15 +18,23 @@ Event handler for Amazon API Gateway REST and HTTP APIs, and Application Loader ### Required resources -You must have an existing [API Gateway Proxy integration](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html){target="_blank"} or [ALB](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html){target="_blank"} configured to invoke your Lambda function. +If you're using any API Gateway integration, you must have an existing [API Gateway Proxy integration](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html){target="_blank"} or [ALB](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html){target="_blank"} configured to invoke your Lambda function. -This is the sample infrastructure for API Gateway we are using for the examples in this documentation. +This is the sample infrastructure for API Gateway and Lambda Function URLs we are using for the examples in this documentation. ???+ info "There is no additional permissions or dependencies required to use this utility." -```yaml title="AWS Serverless Application Model (SAM) example" ---8<-- "examples/event_handler_rest/sam/template.yaml" -``` +=== "API Gateway SAM Template" + + ```yaml title="AWS Serverless Application Model (SAM) example" + --8<-- "examples/event_handler_rest/sam/template.yaml" + ``` + +=== "Lambda Function URL SAM Template" + + ```yaml title="AWS Serverless Application Model (SAM) example" + --8<-- "examples/event_handler_lambda_function_url/sam/template.yaml" + ``` ### Event Resolvers @@ -34,7 +42,7 @@ Before you decorate your functions to handle a given path and HTTP method(s), yo A resolver will handle request resolution, including [one or more routers](#split-routes-with-router), and give you access to the current event via typed properties. -For resolvers, we provide: `APIGatewayRestResolver`, `APIGatewayHttpResolver`, and `ALBResolver`. +For resolvers, we provide: `APIGatewayRestResolver`, `APIGatewayHttpResolver`, `ALBResolver`, and `LambdaFunctionUrlResolver` . ???+ info We will use `APIGatewayRestResolver` as the default across examples. @@ -87,6 +95,22 @@ When using Amazon Application Load Balancer (ALB) to front your Lambda functions --8<-- "examples/event_handler_rest/src/getting_started_alb_api_resolver.py" ``` +#### Lambda Function URL + +When using [AWS Lambda Function URL](https://docs.aws.amazon.com/lambda/latest/dg/urls-configuration.html), you can use `LambdaFunctionUrlResolver`. + +=== "getting_started_lambda_function_url_resolver.py" + + ```python hl_lines="5 11" title="Using Lambda Function URL resolver" + --8<-- "examples/event_handler_lambda_function_url/src/getting_started_lambda_function_url_resolver.py" + ``` + +=== "getting_started_lambda_function_url_resolver.json" + + ```json hl_lines="4-5" title="Example payload delivered to the handler" + --8<-- "examples/event_handler_lambda_function_url/src/getting_started_lambda_function_url_resolver.json" + ``` + ### Dynamic routes You can use `/todos/` to configure dynamic URL paths, where `` will be resolved at runtime. @@ -198,7 +222,7 @@ You can use **`not_found`** decorator to override this behavior, and return a cu You can use **`exception_handler`** decorator with any Python exception. This allows you to handle a common exception outside your route, for example validation errors. -```python hl_lines="14 15" title="Exception handling" +```python hl_lines="13-14" title="Exception handling" --8<-- "examples/event_handler_rest/src/exception_handling.py" ``` @@ -267,7 +291,7 @@ This will ensure that CORS headers are always returned as part of the response w #### Pre-flight -Pre-flight (OPTIONS) calls are typically handled at the API Gateway level as per [our sample infrastructure](#required-resources), no Lambda integration necessary. However, ALB expects you to handle pre-flight requests. +Pre-flight (OPTIONS) calls are typically handled at the API Gateway or Lambda Function URL level as per [our sample infrastructure](#required-resources), no Lambda integration is necessary. However, ALB expects you to handle pre-flight requests. For convenience, we automatically handle that for you as long as you [setup CORS in the constructor level](#cors). @@ -343,6 +367,8 @@ Like `compress` feature, the client must send the `Accept` header with the corre ???+ warning This feature requires API Gateway to configure binary media types, see [our sample infrastructure](#required-resources) for reference. +???+ note + Lambda Function URLs handle binary media types automatically. === "binary_responses.py" ```python hl_lines="14 20" @@ -384,7 +410,7 @@ This will enable full tracebacks errors in the response, print request and respo ### Custom serializer -You can instruct API Gateway handler to use a custom serializer to best suit your needs, for example take into account Enums when serializing. +You can instruct event handler to use a custom serializer to best suit your needs, for example take into account Enums when serializing. ```python hl_lines="35 40" title="Using a custom JSON serializer for responses" --8<-- "examples/event_handler_rest/src/custom_serializer.py" @@ -394,7 +420,7 @@ You can instruct API Gateway handler to use a custom serializer to best suit you As you grow the number of routes a given Lambda function should handle, it is natural to split routes into separate files to ease maintenance - That's where the `Router` feature is useful. -Let's assume you have `app.py` as your Lambda function entrypoint and routes in `split_route_module.py`, this is how you'd use the `Router` feature. +Let's assume you have `split_route.py` as your Lambda function entrypoint and routes in `split_route_module.py`. This is how you'd use the `Router` feature. === "split_route_module.py" @@ -505,7 +531,7 @@ A micro function means that your final code artifact will be different to each f **Downsides** -* **Upfront investment**. You need custom build tooling to bundle assets, including [C bindings for runtime compatibility](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html){target="_blank"}. `Operations become more elaborate — you need to standardize tracing labels/annotations, structured logging, and metrics to pinpoint root causes. +* **Upfront investment**. You need custom build tooling to bundle assets, including [C bindings for runtime compatibility](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html){target="_blank"}. Operations become more elaborate — you need to standardize tracing labels/annotations, structured logging, and metrics to pinpoint root causes. * Engineering discipline is necessary for both approaches. Micro-function approach however requires further attention in consistency as the number of functions grow, just like any distributed system. * **Harder to share code**. Shared code must be carefully evaluated to avoid unnecessary deployments when that changes. Equally, if shared code isn't a library, your development, building, deployment tooling need to accommodate the distinct layout. From 61d833c15779c3a10d69a4c47741d9b747942043 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Tue, 6 Sep 2022 20:26:55 +0300 Subject: [PATCH 15/24] fixes --- tests/events/kafkaEvent.json | 34 ------------------------- tests/events/kafkaEventSelfManaged.json | 2 +- tests/functional/parser/test_kafka.py | 4 +-- tests/functional/test_data_classes.py | 2 +- 4 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 tests/events/kafkaEvent.json diff --git a/tests/events/kafkaEvent.json b/tests/events/kafkaEvent.json deleted file mode 100644 index 18f7590ba76..00000000000 --- a/tests/events/kafkaEvent.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "eventSource": "aws:SelfManagedKafka", - "bootstrapServers": "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", - "records": { - "mytopic-0": [ - { - "topic": "mytopic", - "partition": 0, - "offset": 15, - "timestamp": 1545084650987, - "timestampType": "CREATE_TIME", - "key": "cmVjb3JkS2V5", - "value": "eyJrZXkiOiJ2YWx1ZSJ9", - "headers": [ - { - "headerKey": [ - 104, - 101, - 97, - 100, - 101, - 114, - 86, - 97, - 108, - 117, - 101 - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/tests/events/kafkaEventSelfManaged.json b/tests/events/kafkaEventSelfManaged.json index 17372b7c243..22985dd11dd 100644 --- a/tests/events/kafkaEventSelfManaged.json +++ b/tests/events/kafkaEventSelfManaged.json @@ -1,5 +1,5 @@ { - "eventSource":"aws:aws:SelfManagedKafka", + "eventSource":"aws:SelfManagedKafka", "bootstrapServers":"b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", "records":{ "mytopic-0":[ diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index 64faac5fc1c..9785ff44ffd 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -19,12 +19,12 @@ def handle_kafka_event(event: KafkaEventModel, _: LambdaContext): def test_kafka_event_with_envelope(): - event = load_event("kafkaEvent.json") + event = load_event("kafkaEventSelfManaged.json") handle_lambda_kafka_with_envelope(event, LambdaContext()) def test_self_managed_kafka_event(): - json_event = load_event("kafkaEvent.json") + json_event = load_event("kafkaEventSelfManaged.json") event: KafkaEventModel = handle_kafka_event(json_event, LambdaContext()) assert event.eventSource == "aws:SelfManagedKafka" bootstrap_servers = [ diff --git a/tests/functional/test_data_classes.py b/tests/functional/test_data_classes.py index 00dd5100f67..dbef57162e2 100644 --- a/tests/functional/test_data_classes.py +++ b/tests/functional/test_data_classes.py @@ -1174,7 +1174,7 @@ def test_kafka_msk_event(): def test_kafka_self_managed_event(): event = KafkaEvent(load_event("kafkaEventSelfManaged.json")) - assert event.event_source == "aws:aws:SelfManagedKafka" + assert event.event_source == "aws:SelfManagedKafka" bootstrap_servers_raw = "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092" # noqa E501 From 4e4282cdb1ac7af4c55510fca635c226f8e519d1 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Tue, 6 Sep 2022 20:29:07 +0300 Subject: [PATCH 16/24] fixes --- aws_lambda_powertools/utilities/data_classes/kafka_event.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws_lambda_powertools/utilities/data_classes/kafka_event.py b/aws_lambda_powertools/utilities/data_classes/kafka_event.py index 5e9201dae9f..e52cc5d8dc1 100644 --- a/aws_lambda_powertools/utilities/data_classes/kafka_event.py +++ b/aws_lambda_powertools/utilities/data_classes/kafka_event.py @@ -85,10 +85,11 @@ def get_header_value( class KafkaEvent(DictWrapper): - """Self-managed Apache Kafka event trigger + """Self-managed or MSK Apache Kafka event trigger Documentation: -------------- - https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html + - https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html """ @property @@ -98,7 +99,7 @@ def event_source(self) -> str: @property def event_source_arn(self) -> Optional[str]: - """The AWS service ARN from which the Kafka event record originated.""" + """The AWS service ARN from which the Kafka event record originated, mandatory for AWS MSK.""" return self.get("eventSourceArn") @property From 9ee356a3026d0865e12549716c2727976b165208 Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Tue, 6 Sep 2022 21:07:43 +0300 Subject: [PATCH 17/24] a --- .github/scripts/label_related_issue.js | 70 +++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/scripts/label_related_issue.js b/.github/scripts/label_related_issue.js index 24b38aa748c..32bd642b02b 100644 --- a/.github/scripts/label_related_issue.js +++ b/.github/scripts/label_related_issue.js @@ -8,46 +8,46 @@ const { PR_IS_MERGED, } = require("./constants") -module.exports = async ({ github, context, core }) => { - if (IGNORE_AUTHORS.includes(PR_AUTHOR)) { - return core.notice("Author in IGNORE_AUTHORS list; skipping...") - } +module.exports = async ({github, context, core}) => { + if (IGNORE_AUTHORS.includes(PR_AUTHOR)) { + return core.notice("Author in IGNORE_AUTHORS list; skipping...") + } - if (PR_IS_MERGED == "false") { - return core.notice("Only merged PRs to avoid spam; skipping") - } + if (PR_IS_MERGED == "false") { + return core.notice("Only merged PRs to avoid spam; skipping") + } - const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?\d+)/; + const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?\d+)/; - const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY); + const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY); - try { - if (!isMatch) { - core.setFailed(`Unable to find related issue for PR number ${PR_NUMBER}.\n\n Body details: ${PR_BODY}`); - return await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - body: `${HANDLE_MAINTAINERS_TEAM} No related issues found. Please ensure '${LABEL_PENDING_RELEASE}' label is applied before releasing.`, - issue_number: PR_NUMBER, - }); + try { + if (!isMatch) { + core.setFailed(`Unable to find related issue for PR number ${PR_NUMBER}.\n\n Body details: ${PR_BODY}`); + return await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + body: `${HANDLE_MAINTAINERS_TEAM} No related issues found. Please ensure '${LABEL_PENDING_RELEASE}' label is applied before releasing.`, + issue_number: PR_NUMBER, + }); + } + } catch (error) { + core.setFailed(`Unable to create comment on PR number ${PR_NUMBER}.\n\n Error details: ${error}`); + throw new Error(error); } - } catch (error) { - core.setFailed(`Unable to create comment on PR number ${PR_NUMBER}.\n\n Error details: ${error}`); - throw new Error(error); - } - const { groups: { issue } } = isMatch + const { groups: {issue} } = isMatch - try { - core.info(`Auto-labeling related issue ${issue} for release`) - return await github.rest.issues.addLabels({ - issue_number: issue, - owner: context.repo.owner, - repo: context.repo.repo, - labels: [LABEL_PENDING_RELEASE] - }) - } catch (error) { - core.setFailed(`Is this issue number (${issue}) valid? Perhaps a discussion?`); - throw new Error(error); - } + try { + core.info(`Auto-labeling related issue ${issue} for release`) + return await github.rest.issues.addLabels({ + issue_number: issue, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [LABEL_PENDING_RELEASE] + }) + } catch (error) { + core.setFailed(`Is this issue number (${issue}) valid? Perhaps a discussion?`); + throw new Error(error); + } } \ No newline at end of file From afbd3948b8bd0c78ec28cce1a8b345e9c96a61ba Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Tue, 6 Sep 2022 21:09:47 +0300 Subject: [PATCH 18/24] fixes --- .github/scripts/label_related_issue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/label_related_issue.js b/.github/scripts/label_related_issue.js index 32bd642b02b..790aac1ced5 100644 --- a/.github/scripts/label_related_issue.js +++ b/.github/scripts/label_related_issue.js @@ -50,4 +50,4 @@ module.exports = async ({github, context, core}) => { core.setFailed(`Is this issue number (${issue}) valid? Perhaps a discussion?`); throw new Error(error); } -} \ No newline at end of file +} From 139ffd7bc3f297f9671f43c6062d6e068bd2482f Mon Sep 17 00:00:00 2001 From: Ran Isenberg <60175085+ran-isenberg@users.noreply.github.com> Date: Wed, 7 Sep 2022 13:08:16 +0300 Subject: [PATCH 19/24] Update tests/functional/parser/test_kafka.py Co-authored-by: Leandro Damascena --- tests/functional/parser/test_kafka.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index 9785ff44ffd..bc1420ecc30 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -7,7 +7,7 @@ from tests.functional.utils import load_event -@event_parser(model=MyALambdaKafkaBusiness, envelope=envelopes.KafkaEnvelope) +@event_parser(model=MyLambdaKafkaBusiness, envelope=envelopes.KafkaEnvelope) def handle_lambda_kafka_with_envelope(event: List[MyALambdaKafkaBusiness], _: LambdaContext): assert event[0].key == "value" assert len(event) == 1 From bfe0803c7286907c278e2a5da101a24a515f101a Mon Sep 17 00:00:00 2001 From: Ran Isenberg <60175085+ran-isenberg@users.noreply.github.com> Date: Wed, 7 Sep 2022 13:08:27 +0300 Subject: [PATCH 20/24] Update tests/functional/parser/test_kafka.py Co-authored-by: Leandro Damascena --- tests/functional/parser/test_kafka.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index bc1420ecc30..b1baf59bd72 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -54,7 +54,7 @@ def handle_msk_event(event: MskEventModel, _: LambdaContext): return event -def test_msk_event(): +def test_kafka_msk_event(): json_event = load_event("kafkaEventMsk.json") event: MskEventModel = handle_msk_event(json_event, LambdaContext()) assert event.eventSource == "aws:kafka" From 50571b796e4e76de4284fe32601f07686d9d7e67 Mon Sep 17 00:00:00 2001 From: Ran Isenberg <60175085+ran-isenberg@users.noreply.github.com> Date: Wed, 7 Sep 2022 13:09:21 +0300 Subject: [PATCH 21/24] Update tests/functional/parser/test_kafka.py Co-authored-by: Leandro Damascena --- tests/functional/parser/test_kafka.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index b1baf59bd72..fdb0e036668 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -3,7 +3,7 @@ from aws_lambda_powertools.utilities.parser import envelopes, event_parser from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel, MskEventModel from aws_lambda_powertools.utilities.typing import LambdaContext -from tests.functional.parser.schemas import MyALambdaKafkaBusiness +from tests.functional.parser.schemas import MyLambdaKafkaBusiness from tests.functional.utils import load_event From 75e84bd9e7b3be26750114f9698a7c50a0869a0a Mon Sep 17 00:00:00 2001 From: Ran Isenberg Date: Wed, 7 Sep 2022 13:21:07 +0300 Subject: [PATCH 22/24] cr fixes --- aws_lambda_powertools/shared/functions.py | 20 ++++++++++++ .../utilities/parser/models/kafka.py | 31 ++++--------------- tests/functional/parser/schemas.py | 2 +- tests/functional/parser/test_kafka.py | 2 +- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/aws_lambda_powertools/shared/functions.py b/aws_lambda_powertools/shared/functions.py index 37621f8274a..e9bc3521125 100644 --- a/aws_lambda_powertools/shared/functions.py +++ b/aws_lambda_powertools/shared/functions.py @@ -1,5 +1,10 @@ +import base64 +import logging +from binascii import Error as BinAsciiError from typing import Optional, Union +logger = logging.getLogger(__name__) + def strtobool(value: str) -> bool: """Convert a string representation of truth to True or False. @@ -58,3 +63,18 @@ def resolve_env_var_choice( resolved choice as either bool or environment value """ return choice if choice is not None else env + + +def base64_decode(value: str) -> bytes: + try: + logger.debug("Decoding base64 Kafka record item before parsing") + return base64.b64decode(value) + except (BinAsciiError, TypeError): + raise ValueError("base64 decode failed") + + +def bytes_to_string(value: bytes) -> str: + try: + return value.decode("utf-8") + except (BinAsciiError, TypeError): + raise ValueError("base64 UTF-8 decode failed") diff --git a/aws_lambda_powertools/utilities/parser/models/kafka.py b/aws_lambda_powertools/utilities/parser/models/kafka.py index 7977d341ad7..8dbf45103b6 100644 --- a/aws_lambda_powertools/utilities/parser/models/kafka.py +++ b/aws_lambda_powertools/utilities/parser/models/kafka.py @@ -1,32 +1,13 @@ -import base64 -import logging -from binascii import Error as BinAsciiError from datetime import datetime -from typing import Dict, List, Optional, Type, Union +from typing import Dict, List, Type, Union from pydantic import BaseModel, validator +from aws_lambda_powertools.shared.functions import base64_decode, bytes_to_string from aws_lambda_powertools.utilities.parser.types import Literal SERVERS_DELIMITER = "," -logger = logging.getLogger(__name__) - - -def _base64_decode(value: str) -> bytes: - try: - logger.debug("Decoding base64 Kafka record item before parsing") - return base64.b64decode(value) - except (BinAsciiError, TypeError): - raise ValueError("base64 decode failed") - - -def _bytes_to_string(value: bytes) -> str: - try: - return value.decode("utf-8") - except (BinAsciiError, TypeError): - raise ValueError("base64 UTF-8 decode failed") - class KafkaRecordModel(BaseModel): topic: str @@ -39,12 +20,12 @@ class KafkaRecordModel(BaseModel): headers: List[Dict[str, bytes]] # validators - _decode_key = validator("key", allow_reuse=True)(_base64_decode) + _decode_key = validator("key", allow_reuse=True)(base64_decode) @validator("value", pre=True, allow_reuse=True) def data_base64_decode(cls, value): - as_bytes = _base64_decode(value) - return _bytes_to_string(as_bytes) + as_bytes = base64_decode(value) + return bytes_to_string(as_bytes) @validator("headers", pre=True, allow_reuse=True) def decode_headers_list(cls, value): @@ -55,7 +36,7 @@ def decode_headers_list(cls, value): class KafkaBaseEventModel(BaseModel): - bootstrapServers: Optional[List[str]] + bootstrapServers: List[str] records: Dict[str, List[KafkaRecordModel]] @validator("bootstrapServers", pre=True, allow_reuse=True) diff --git a/tests/functional/parser/schemas.py b/tests/functional/parser/schemas.py index 51c74903ef9..b1b66c63379 100644 --- a/tests/functional/parser/schemas.py +++ b/tests/functional/parser/schemas.py @@ -93,5 +93,5 @@ class MyALambdaFuncUrlBusiness(BaseModel): username: str -class MyALambdaKafkaBusiness(BaseModel): +class MyLambdaKafkaBusiness(BaseModel): key: str diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index fdb0e036668..d1515924d0d 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -8,7 +8,7 @@ @event_parser(model=MyLambdaKafkaBusiness, envelope=envelopes.KafkaEnvelope) -def handle_lambda_kafka_with_envelope(event: List[MyALambdaKafkaBusiness], _: LambdaContext): +def handle_lambda_kafka_with_envelope(event: List[MyLambdaKafkaBusiness], _: LambdaContext): assert event[0].key == "value" assert len(event) == 1 From 86ef6de16af69b97fe45ead28038e20b88b0cbec Mon Sep 17 00:00:00 2001 From: Leandro Damascena Date: Wed, 7 Sep 2022 19:15:16 +0100 Subject: [PATCH 23/24] feat(parser): small changes --- .../utilities/parser/envelopes/kafka.py | 6 +++--- .../utilities/parser/models/__init__.py | 6 +++--- .../utilities/parser/models/kafka.py | 4 ++-- docs/utilities/parser.md | 4 ++-- tests/functional/parser/test_kafka.py | 20 +++++++++++-------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py index 1711f86f6b6..8be1fd62467 100644 --- a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py +++ b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py @@ -1,7 +1,7 @@ import logging from typing import Any, Dict, List, Optional, Type, Union -from ..models import KafkaEventModel +from ..models import KafkaMskEventModel from ..types import Model from .base import BaseEnvelope @@ -32,8 +32,8 @@ def parse(self, data: Optional[Union[Dict[str, Any], Any]], model: Type[Model]) List List of records parsed with model provided """ - logger.debug(f"Parsing incoming data with Kafka event model {KafkaEventModel}") - parsed_envelope: KafkaEventModel = KafkaEventModel.parse_obj(data) + logger.debug(f"Parsing incoming data with Kafka event model {KafkaMskEventModel}") + parsed_envelope: KafkaMskEventModel = KafkaMskEventModel.parse_obj(data) logger.debug(f"Parsing Kafka event records in `value` with {model}") ret_list = [] for records in parsed_envelope.records.values(): diff --git a/aws_lambda_powertools/utilities/parser/models/__init__.py b/aws_lambda_powertools/utilities/parser/models/__init__.py index b00b5a1dc57..6d403019181 100644 --- a/aws_lambda_powertools/utilities/parser/models/__init__.py +++ b/aws_lambda_powertools/utilities/parser/models/__init__.py @@ -17,7 +17,7 @@ from .cloudwatch import CloudWatchLogsData, CloudWatchLogsDecode, CloudWatchLogsLogEvent, CloudWatchLogsModel from .dynamodb import DynamoDBStreamChangedRecordModel, DynamoDBStreamModel, DynamoDBStreamRecordModel from .event_bridge import EventBridgeModel -from .kafka import KafkaBaseEventModel, KafkaEventModel, KafkaRecordModel, MskEventModel +from .kafka import KafkaBaseEventModel, KafkaMskEventModel, KafkaRecordModel, KafkaSelfManagedEventModel from .kinesis import KinesisDataStreamModel, KinesisDataStreamRecord, KinesisDataStreamRecordPayload from .lambda_function_url import LambdaFunctionUrlModel from .s3 import S3Model, S3RecordModel @@ -99,8 +99,8 @@ "APIGatewayEventRequestContext", "APIGatewayEventAuthorizer", "APIGatewayEventIdentity", - "KafkaEventModel", + "KafkaSelfManagedEventModel", "KafkaRecordModel", - "MskEventModel", + "KafkaMskEventModel", "KafkaBaseEventModel", ] diff --git a/aws_lambda_powertools/utilities/parser/models/kafka.py b/aws_lambda_powertools/utilities/parser/models/kafka.py index 8dbf45103b6..d4c36bf70f1 100644 --- a/aws_lambda_powertools/utilities/parser/models/kafka.py +++ b/aws_lambda_powertools/utilities/parser/models/kafka.py @@ -44,7 +44,7 @@ def split_servers(cls, value): return None if not value else value.split(SERVERS_DELIMITER) -class KafkaEventModel(KafkaBaseEventModel): +class KafkaSelfManagedEventModel(KafkaBaseEventModel): """Self-managed Apache Kafka event trigger Documentation: -------------- @@ -54,7 +54,7 @@ class KafkaEventModel(KafkaBaseEventModel): eventSource: Literal["aws:SelfManagedKafka"] -class MskEventModel(KafkaBaseEventModel): +class KafkaMskEventModel(KafkaBaseEventModel): """Fully-managed AWS Apache Kafka event trigger Documentation: -------------- diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md index 789c158d8b8..e97395ae56c 100644 --- a/docs/utilities/parser.md +++ b/docs/utilities/parser.md @@ -168,8 +168,8 @@ Parser comes with the following built-in models: | **APIGatewayProxyEventModel** | Lambda Event Source payload for Amazon API Gateway | | **APIGatewayProxyEventV2Model** | Lambda Event Source payload for Amazon API Gateway v2 payload | | **LambdaFunctionUrlModel** | Lambda Event Source payload for Lambda Function URL payload | -| **KafkaModel** | Lambda Event Source payload for self managed Kafka payload | -| **MskEventModel** | Lambda Event Source payload for AWS MSK payload | +| **KafkaSelfManagedEventModel** | Lambda Event Source payload for self managed Kafka payload | +| **KafkaMskEventModel** | Lambda Event Source payload for AWS MSK payload | ### extending built-in models diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index d1515924d0d..24350030126 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -1,7 +1,11 @@ from typing import List from aws_lambda_powertools.utilities.parser import envelopes, event_parser -from aws_lambda_powertools.utilities.parser.models import KafkaEventModel, KafkaRecordModel, MskEventModel +from aws_lambda_powertools.utilities.parser.models import ( + KafkaMskEventModel, + KafkaRecordModel, + KafkaSelfManagedEventModel, +) from aws_lambda_powertools.utilities.typing import LambdaContext from tests.functional.parser.schemas import MyLambdaKafkaBusiness from tests.functional.utils import load_event @@ -13,19 +17,19 @@ def handle_lambda_kafka_with_envelope(event: List[MyLambdaKafkaBusiness], _: Lam assert len(event) == 1 -@event_parser(model=KafkaEventModel) -def handle_kafka_event(event: KafkaEventModel, _: LambdaContext): +@event_parser(model=KafkaSelfManagedEventModel) +def handle_kafka_event(event: KafkaSelfManagedEventModel, _: LambdaContext): return event def test_kafka_event_with_envelope(): - event = load_event("kafkaEventSelfManaged.json") + event = load_event("kafkaEventMsk.json") handle_lambda_kafka_with_envelope(event, LambdaContext()) def test_self_managed_kafka_event(): json_event = load_event("kafkaEventSelfManaged.json") - event: KafkaEventModel = handle_kafka_event(json_event, LambdaContext()) + event: KafkaSelfManagedEventModel = handle_kafka_event(json_event, LambdaContext()) assert event.eventSource == "aws:SelfManagedKafka" bootstrap_servers = [ "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", @@ -49,14 +53,14 @@ def test_self_managed_kafka_event(): assert record.headers[0]["headerKey"] == b"headerValue" -@event_parser(model=MskEventModel) -def handle_msk_event(event: MskEventModel, _: LambdaContext): +@event_parser(model=KafkaMskEventModel) +def handle_msk_event(event: KafkaMskEventModel, _: LambdaContext): return event def test_kafka_msk_event(): json_event = load_event("kafkaEventMsk.json") - event: MskEventModel = handle_msk_event(json_event, LambdaContext()) + event: KafkaMskEventModel = handle_msk_event(json_event, LambdaContext()) assert event.eventSource == "aws:kafka" bootstrap_servers = [ "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", From f41c82c4072f1c6e43c684a8288fef6349ca6945 Mon Sep 17 00:00:00 2001 From: Leandro Damascena Date: Fri, 9 Sep 2022 16:33:20 +0100 Subject: [PATCH 24/24] feat(parser): changes in envelope --- .../utilities/parser/envelopes/kafka.py | 11 +++++++---- tests/functional/parser/test_kafka.py | 7 ++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py index 8be1fd62467..4e6564c3ec0 100644 --- a/aws_lambda_powertools/utilities/parser/envelopes/kafka.py +++ b/aws_lambda_powertools/utilities/parser/envelopes/kafka.py @@ -1,7 +1,7 @@ import logging -from typing import Any, Dict, List, Optional, Type, Union +from typing import Any, Dict, List, Optional, Type, Union, cast -from ..models import KafkaMskEventModel +from ..models import KafkaMskEventModel, KafkaSelfManagedEventModel from ..types import Model from .base import BaseEnvelope @@ -32,8 +32,11 @@ def parse(self, data: Optional[Union[Dict[str, Any], Any]], model: Type[Model]) List List of records parsed with model provided """ - logger.debug(f"Parsing incoming data with Kafka event model {KafkaMskEventModel}") - parsed_envelope: KafkaMskEventModel = KafkaMskEventModel.parse_obj(data) + event_source = cast(dict, data).get("eventSource") + model_parse_event = KafkaMskEventModel if event_source == "aws:kafka" else KafkaSelfManagedEventModel + + logger.debug(f"Parsing incoming data with Kafka event model {model_parse_event}") + parsed_envelope = model_parse_event.parse_obj(data) logger.debug(f"Parsing Kafka event records in `value` with {model}") ret_list = [] for records in parsed_envelope.records.values(): diff --git a/tests/functional/parser/test_kafka.py b/tests/functional/parser/test_kafka.py index 24350030126..f764106add4 100644 --- a/tests/functional/parser/test_kafka.py +++ b/tests/functional/parser/test_kafka.py @@ -22,11 +22,16 @@ def handle_kafka_event(event: KafkaSelfManagedEventModel, _: LambdaContext): return event -def test_kafka_event_with_envelope(): +def test_kafka_msk_event_with_envelope(): event = load_event("kafkaEventMsk.json") handle_lambda_kafka_with_envelope(event, LambdaContext()) +def test_kafka_self_managed_event_with_envelope(): + event = load_event("kafkaEventSelfManaged.json") + handle_lambda_kafka_with_envelope(event, LambdaContext()) + + def test_self_managed_kafka_event(): json_event = load_event("kafkaEventSelfManaged.json") event: KafkaSelfManagedEventModel = handle_kafka_event(json_event, LambdaContext())