Skip to content

Conversation

@guerra-eb
Copy link

@guerra-eb guerra-eb commented Dec 4, 2025

When deploying a NextJS application using OpenNext in AWS Api Gateway v1 (REST), the image optimizer function breaks.

APIGWv1 event payload always includes the incoming query strings in both the multiValueQueryStringParameter and queryStringParameters attributes, even if they are single valued.

The converter was parsing all the incoming query parameters as arrays, even if they were single valued. This makes functions like the Image Optimizer to fail as it does not support array parameters. Also, it breaks functions that expect single valued query parameters that were working just fine with OpenNext v2.

This PR fixes the converter, parsing single valued query parameters as strings, and multi valued ones as arrays.

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

🦋 Changeset detected

Latest commit: 15e773f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@guerra-eb guerra-eb marked this pull request as ready for review December 4, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant