Skip to content

fix(amplify-category-storage): make IAM policy names environment-specific - #14962

Open
w3lld1 wants to merge 1 commit into
aws-amplify:devfrom
w3lld1:category-storage/unique-policy-names-14961
Open

fix(amplify-category-storage): make IAM policy names environment-specific#14962
w3lld1 wants to merge 1 commit into
aws-amplify:devfrom
w3lld1:category-storage/unique-policy-names-14961

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 15, 2026

Copy link
Copy Markdown

Description of changes

I made generated S3 IAM policy names environment-specific by appending the current Amplify environment name to the existing policy UUID. This prevents two environments that share imported auth roles from trying to manage identically named inline policies.

I also added a focused regression test for the generated policy names and updated the existing stack-transform expectations.

Issue #, if available

Fixes #14961

Description of how you validated changes

  • yarn lerna run build --scope @aws-amplify/amplify-category-storage --include-dependencies --concurrency 4
  • node ../../node_modules/jest/bin/jest.js --runInBand --coverage=false from packages/amplify-category-storage (15 suites, 48 tests)
  • Prettier and ESLint checks for all changed TypeScript files

I did not run cloud E2E tests or the macOS CI job locally.

Checklist

  • PR description included
  • yarn test passes for the changed package
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@w3lld1
w3lld1 requested a review from a team as a code owner July 15, 2026 19:18
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.

Storage deploy fails with 'Policy resource was already managed by another stack' after CFN enforcement change (Jan 2026)

1 participant