Skip to content

fix(gen2-migration): add awsRegion to userPoolConfig in additional auth providers#14710

Merged
iliapolo merged 3 commits intogen2-migrationfrom
additional-auth-bug
Mar 26, 2026
Merged

fix(gen2-migration): add awsRegion to userPoolConfig in additional auth providers#14710
iliapolo merged 3 commits intogen2-migrationfrom
additional-auth-bug

Conversation

@dgandhi62
Copy link
Copy Markdown
Contributor

When DataGenerator emits additionalAuthenticationProviders with a AMAZON_COGNITO_USER_POOLS auth type, the generated userPoolConfig was missing the awsRegion property. Without it, AppSync can't resolve the user pool region and falls back to defaults, which breaks cross-region setups.

This adds awsRegion: backend.auth.stack.region alongside the existing userPoolId in the generated output, and updates all four migration app snapshots that include a user pool additional auth provider.

… providers

The DataGenerator's contributeAdditionalAuthProviders method was
generating userPoolConfig with only userPoolId for
AMAZON_COGNITO_USER_POOLS auth providers. This adds the missing
awsRegion property (backend.auth.stack.region) so the generated
backend.ts matches the expected output.

Verified with existing data.generator.test.ts — all 14 tests pass.
---
Prompt: I've added this line in the mood-board snapshot. This
needs to be added whenever there is a userPool additional auth
provider - awsRegion: backend.auth.stack.region,
@dgandhi62 dgandhi62 requested a review from a team as a code owner March 26, 2026 20:45
@iliapolo iliapolo merged commit fda8dd2 into gen2-migration Mar 26, 2026
4 checks passed
@iliapolo iliapolo deleted the additional-auth-bug branch March 26, 2026 22:16
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.

2 participants