Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 24, 2025

Bumps @aws-lambda-powertools/logger from 2.25.2 to 2.27.0.

Release notes

Sourced from @​aws-lambda-powertools/logger's releases.

v2.27.0

Summary

We're excited to announce an update to our Event Handler utility, featuring new middleware for CORS (Cross-Origin Resource Sharing) configuration and automatic response compression. We have also added support for Route Prefixes which allows you to avoid repeating a shared prefix in each route definition.

We've listened to your feedback and also made some slight changes to the type signature in the handlers to improve developer experience.

We have also made the Error handlers more versatile by allowing a Response object or a JavaScript object to be returned from the error handler.

⭐ Congratulations @​guillemcomerma for their first PR merged in the project 🎉

CORS Middleware

Docs

The CORS middleware ensures CORS headers are returned as part of the response when your functions match the path invoked and the Origin matches one of the allowed values.

import { Router } from '@aws-lambda-powertools/event-handler/experimental-rest';
import { cors } from '@aws-lambda-powertools/event-handler/experimental-rest/middleware';
import type { Context } from 'aws-lambda';
const app = new Router();
app.use(
cors({
origin: 'https://example.com',
maxAge: 300,
})
);
app.get('/todos/:todoId', async ({ params: { todoId } }) => {
const todo = await getTodoById(todoId);
return { todo };
});
export const handler = async (event: unknown, context: Context) =>
app.resolve(event, context);
/**
When invoked from a valid origin, this returns:
{
"statusCode": 200,
"headers": {
"access-control-allow-credentials": "false",
"access-control-allow-origin": "https://example.com",
"content-type": "application/json"
},
"multiValueHeaders": {
</tr></table>

... (truncated)

Changelog

Sourced from @​aws-lambda-powertools/logger's changelog.

2.27.0 (2025-09-24)

Bug Fixes

  • batch fixed the build issue with Batch processor due to missing dependencies (#4498) (ef67b43)
  • event-handler fixed CORS behaviour not aligned with CORS spec (#4512) (dd368fa)
  • event-handler run global middleware on all requests for REST API (#4507) (49d5f8a)

Improvements

  • event-handler rename HttpErrorCodes to HttpStatusCodes (#4543) (e53aa88)
  • event-handler made error handler responses versatile (#4536) (f08b366)
  • event-handler changed path parameter in middleware and routehandler signature (#4532) (278fca0)
  • event-handler change the Middleware and RequestContext signatures (#4530) (a05c074)

Features

  • event-handler implemented route prefixes in HTTP event handler (#4523) (8913854)
  • event-handler throw error when middleware does not await next() (#4511) (b0b43e8)
  • event-handler add CORS middleware support (#4477) (972cd1f)
  • event-handler added compress middleware for the REST API event handler (#4495) (320e0dc)

2.26.1 (2025-09-15)

Bug Fixes

  • batch declare the @​aws-lambda-powertools/commons dependency (#4484) (8cfcccd)

2.26.0 (2025-09-11)

Improvements

  • logger update getCodeLocation regex to improve performance (#4389) (801333d)
  • batch simplified the parser integration api with batch processor (#4465) (96977ff)

Bug Fixes

  • parser updated the binaryValue and stringValue in the SqsMsgAttributeSchema to nullable (#4450) (cefcbdb)
  • event-handler handle nullable fields in APIGatewayProxyEvent (#4455) (200f47b)

Features

  • parser integrate parser with Batch Processing (#4408) (0b6bbbb)
  • parser implemented a helper function Base64Encoded to decode base64 encoded payloads (#4413) (1554360)
  • parser add IPv6 support for sourceIp in API Gateway schemas (#4398) (2a94c37)
  • event-handler remove undefined from Router's resolve type signature (#4463) (d36ef55)
  • event-handler implement mechanism to manipulate response in middleware (#4439) (35a510d)
  • event-handler add route specific middleware registration and execution (#4437) (e6ea674)

... (truncated)

Commits
  • f38af1d chore(ci): bump version to 2.27.0 (#4544)
  • 72cf1cd docs(event-handler): update to new APIs before release (#4542)
  • e53aa88 improv(event-handler): rename HttpErrorCodes to HttpStatusCodes (#4543)
  • 3d1255c docs(idempotency): fix dataKeywordArgument reference and remove unused test c...
  • f08b366 improv(event-handler): made error handler responses versatile (#4536)
  • fd156aa chore(ci): add registry-url to setup-node steps to fix Scorecard packagin...
  • d281d46 chore(deps): bump the aws-cdk group across 1 directory with 3 updates (#4527)
  • 278fca0 improv(event-handler): changed path parameter in middleware and routehandler ...
  • 7ea49c7 chore(deps): bump the aws-sdk-v3 group across 1 directory with 62 updates (#4...
  • a05c074 improv(event-handler): change the Middleware and RequestContext signatures (#...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@aws-lambda-powertools/logger](https://github.com/aws-powertools/powertools-lambda-typescript) from 2.25.2 to 2.27.0.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CHANGELOG.md)
- [Commits](aws-powertools/powertools-lambda-typescript@v2.25.2...v2.27.0)

---
updated-dependencies:
- dependency-name: "@aws-lambda-powertools/logger"
  dependency-version: 2.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Sep 24, 2025
@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code size/XS PR between 0-9 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants