Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ed2b624
add teardown option to remove created amplify and cfn resources
iankhou Apr 17, 2026
8b5c74b
gen2-migration e2e automation
iankhou Apr 17, 2026
6217b47
remove backend-data dep from amplify-cli, no longer used
iankhou Apr 17, 2026
1e1f8fd
comment updates
iankhou Apr 17, 2026
e36e6d0
fix: credentials expire after tests but before cleanup
iankhou Apr 20, 2026
f48199f
fix: s3 buckets are not empty on deletion attempts during cleanup
iankhou Apr 20, 2026
9d62b18
fix: custom resources referring to moved gen1 resources fail to delete
iankhou Apr 20, 2026
0b59de9
fix: deleting gen2 app before gen1 app can cause custom resource dele…
iankhou Apr 20, 2026
2a37f16
feat: --roleArn option to run the gen2-migration E2E tests, to allow …
iankhou Apr 20, 2026
bd944ce
fix: cleanup was using wrong credentials
iankhou Apr 20, 2026
0ec87e3
fix: test credential role-chaining failure
iankhou Apr 20, 2026
f46c91c
fix: custom auth trigger lambda was not deleted in teardown
iankhou Apr 20, 2026
7aff5f6
review changes
iankhou Apr 21, 2026
99be067
teardown logic should rediscover stacks in every deletion loop
iankhou Apr 21, 2026
a928d92
fix: snapshot takes credentials from execution environment rather tha…
iankhou Apr 22, 2026
56b8885
fix: profile not always passed through
iankhou Apr 22, 2026
b7edc1e
review changes
iankhou Apr 22, 2026
a50ed15
be extra safe we are using the profile in CodeBuild for cleanup
iankhou Apr 22, 2026
82ddd0f
Merge branch 'gen2-migration' into iankhou-gen2-migration-codebuild-e…
iankhou Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amplify-migration-apps/backend-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:gen1": "true",
"test:gen2": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app backend-only --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:shared": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app backend-only --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app backend-only --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "true",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
3 changes: 1 addition & 2 deletions amplify-migration-apps/discussions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:shared": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts tests/shared-auth.test.ts",
"test:shared-data": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app discussions --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:shared-auth": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app discussions --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app discussions --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "true",
"post-generate": "npx tsx migration/post-generate.ts",
"post-refactor": "npx tsx migration/post-refactor.ts",
Expand Down
2 changes: 1 addition & 1 deletion amplify-migration-apps/fitness-tracker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"sanitize": "tsx ../sanitize.ts",
"normalize": "tsx ../normalize.ts",
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app fitness-tracker --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:shared": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts tests/shared-auth.test.ts",
"test:shared-data": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts",
"test:shared-auth": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app fitness-tracker --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app fitness-tracker --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "npx tsx migration/pre-push.ts",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
3 changes: 2 additions & 1 deletion amplify-migration-apps/imported-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose",
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose",
"test:shared-data": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app imported-resources --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:shared": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app imported-resources --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app imported-resources --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "true",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
3 changes: 2 additions & 1 deletion amplify-migration-apps/media-vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose",
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose",
"test:shared-data": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app media-vault --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:shared": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app media-vault --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app media-vault --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "npx tsx migration/pre-push.ts",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
2 changes: 1 addition & 1 deletion amplify-migration-apps/mood-board/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"sanitize": "tsx ../sanitize.ts",
"normalize": "tsx ../normalize.ts",
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app mood-board --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:shared-data": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts",
"test:shared-auth": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:shared": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts tests/shared-auth.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app mood-board --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app mood-board --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "true",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
2 changes: 1 addition & 1 deletion amplify-migration-apps/product-catalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"sanitize": "tsx ../sanitize.ts",
"normalize": "tsx ../normalize.ts",
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app product-catalog --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:shared": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts tests/shared-auth.test.ts",
"test:shared-data": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts",
"test:shared-auth": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app product-catalog --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app product-catalog --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "npx tsx migration/pre-push.ts",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
2 changes: 1 addition & 1 deletion amplify-migration-apps/project-boards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"sanitize": "tsx ../sanitize.ts",
"normalize": "tsx ../normalize.ts",
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app project-boards --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:shared": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts tests/shared-auth.test.ts",
"test:shared-data": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-data.test.ts",
"test:shared-auth": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app project-boards --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app project-boards --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "true",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
2 changes: 1 addition & 1 deletion amplify-migration-apps/store-locator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose --testPathIgnorePatterns='shared'",
"test:shared": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:shared-data": "true",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app store-locator --profile ${AWS_PROFILE:-default} ${TEARDOWN:+--teardown}",
"test:shared-auth": "NODE_OPTIONS='--experimental-vm-modules' jest --verbose tests/shared-auth.test.ts",
"test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app store-locator --profile ${AWS_PROFILE:-default}",
"deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app store-locator --step deploy --profile ${AWS_PROFILE:-default}",
"pre-push": "npx tsx migration/pre-push.ts",
"post-generate": "npx tsx migration/post-generate.ts",
Expand Down
128 changes: 128 additions & 0 deletions codebuild_specs/gen2_migration_e2e_pr_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Gen2 Migration PR Workflow
#
# This workflow executes the full migration E2E test for apps in amplify-migration-apps.
#
# Each migration test takes approximately 30 minutes and runs in parallel.
# The workflow first builds the CLI binaries, then runs migration tests concurrently.
#
# To trigger this workflow, configure a CodeBuild project with:
# - Buildspec: codebuild_specs/gen2_migration_e2e_pr_workflow.yml
# - Environment variables: TEST_ACCOUNT_ROLE (IAM role ARN for test account)
#
version: 0.2
env:
shell: bash
compute-type: BUILD_GENERAL1_MEDIUM
variables:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
CDK_DEFAULT_REGION: us-east-1
CLI_REGION: us-east-1
AMPLIFY_DIR: '$CODEBUILD_SRC_DIR/out'
AMPLIFY_PATH: '$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64'

batch:
fast-fail: false
build-graph:
# Build phase - required for all migration tests
- identifier: build_linux
buildspec: codebuild_specs/build_linux.yml
env:
compute-type: BUILD_GENERAL1_LARGE

- identifier: publish_to_local_registry
buildspec: codebuild_specs/publish_to_local_registry.yml
depend-on:
- build_linux
env:
compute-type: BUILD_GENERAL1_LARGE

- identifier: build_pkg_binaries_linux
buildspec: codebuild_specs/build_pkg_binaries_linux.yml
depend-on:
- publish_to_local_registry
env:
compute-type: BUILD_GENERAL1_LARGE

- identifier: upb
buildspec: codebuild_specs/upload_pkg_binaries_linux_only.yml
depend-on:
- build_pkg_binaries_linux
env:
compute-type: BUILD_GENERAL1_LARGE

# Migration E2E tests - run in parallel after binaries are ready
# Each test takes ~30 minutes and deploys real AWS resources
- identifier: migrate_backend_only
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: backend-only
depend-on:
- upb

- identifier: migrate_discussions
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: discussions
depend-on:
- upb

- identifier: migrate_fitness_tracker
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: fitness-tracker
depend-on:
- upb

# TODO: migrate_imported_resources is excluded - not ready for CI yet

- identifier: migrate_media_vault
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: media-vault
depend-on:
- upb

- identifier: migrate_mood_board
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: mood-board
depend-on:
- upb

- identifier: migrate_product_catalog
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: product-catalog
depend-on:
- upb

- identifier: migrate_project_boards
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: project-boards
depend-on:
- upb

- identifier: migrate_store_locator
buildspec: codebuild_specs/run_gen2_migration_e2e.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
MIGRATION_APP: store-locator
depend-on:
- upb
22 changes: 22 additions & 0 deletions codebuild_specs/run_gen2_migration_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 0.2
env:
shell: bash
variables:
CI: true
IS_AMPLIFY_CI: true
TEARDOWN: "1"

phases:
build:
commands:
- export NODE_OPTIONS=--max-old-space-size=4096
- export AMPLIFY_DIR=$CODEBUILD_SRC_DIR/out
- export AMPLIFY_PATH=$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64
- echo "AMPLIFY_DIR=$AMPLIFY_DIR"
- echo "AMPLIFY_PATH=$AMPLIFY_PATH"
- echo "MIGRATION_APP=$MIGRATION_APP"
- source ./shared-scripts.sh && _runGen2MigrationE2E

post_build:
commands:
- echo "Migration E2E test completed for $MIGRATION_APP"
11 changes: 11 additions & 0 deletions codebuild_specs/upload_pkg_binaries_linux_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 0.2
env:
shell: bash
phases:
build:
commands:
- source ./shared-scripts.sh && _uploadPkgBinariesLinuxOnly

artifacts:
files:
- 'shared-scripts.sh'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"cloud-e2e-beta": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2EBeta'",
"cloud-e2e-local": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2ELocal'",
"cloud-e2e": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2E'",
"cloud-gen2-migration": "bash -c 'source ./scripts/cloud-gen2-migration.sh && cloudGen2Migration'",
"cloud-pr": "./scripts/cloud-pr.sh",
"commit": "git-cz",
"coverage:collect": "ts-node ./scripts/collect-test-coverage.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/amplify-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"@aws-amplify/amplify-util-import": "2.8.6",
"@aws-amplify/amplify-util-mock": "5.10.26",
"@aws-amplify/amplify-util-uibuilder": "1.14.25",
"@aws-amplify/backend-data": "^1.6.2",
"@aws-amplify/plugin-types": "^1.11.1",
"@aws-cdk/cloudformation-diff": "~2.68.0",
"@aws-sdk/client-amplify": "^3.919.0",
Expand Down
17 changes: 11 additions & 6 deletions packages/amplify-gen2-migration-e2e-system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Automation system for end-to-end testing of the Amplify Gen1-to-Gen2 migration w
# Set AMPLIFY_PATH to your development Amplify CLI (optional - falls back to monorepo build, then global install)
export AMPLIFY_PATH=$(pwd)/.bin/amplify-dev

# Migrate an app using a named AWS profile
# Local dev: migrate an app using a named AWS profile
npx tsx src/cli.ts --app project-boards --profile default

# Verbose logging
Expand All @@ -17,11 +17,16 @@ npx tsx src/cli.ts --app project-boards --profile default --verbose

### CLI Options

| Option | Alias | Description |
| ----------- | ----- | ---------------------------------------------------------------------------------- |
| `--app` | `-a` | App to migrate (required). Must match a directory under `amplify-migration-apps/`. |
| `--profile` | | AWS profile to use (required). |
| `--verbose` | `-v` | Enable debug-level logging. |
| Option | Alias | Description |
| ------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--app` | `-a` | App to migrate (required). Must match a directory under `amplify-migration-apps/`. |
| `--verbose` | `-v` | Enable debug-level logging. |
| `--step` | | Stop at a specific step (`deploy` or `migrate`). Defaults to `migrate`. |
| `--teardown` | | Delete all deployed resources after execution. |

### Credential Refresh

Full migration runs take 30+ minutes, which exceeds typical STS session TTLs. When `TEST_ACCOUNT_ROLE` is used, the CLI re-assumes the role and rewrites `~/.aws/credentials` before every long-running step (`init`, `push`, `assess`, `lock`, `generate`, `refactor`, `deployGen2Sandbox`, `teardown`) so sessions don't expire mid-operation. Spawned subprocesses (Amplify CLI, `ampx sandbox`) pick up the refreshed profile via `AWS_PROFILE`. In `--profile` mode, no refresh happens — the caller-supplied profile is assumed to be long-lived.

## Migration Workflow

Expand Down
3 changes: 3 additions & 0 deletions packages/amplify-gen2-migration-e2e-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"@aws-amplify/amplify-e2e-core": "workspace:^",
"@aws-sdk/client-amplify": "^3.919.0",
"@aws-sdk/client-cloudformation": "^3.919.0",
"@aws-sdk/client-s3": "^3.919.0",
"@aws-sdk/client-sts": "^3.919.0",
"@aws-sdk/credential-providers": "3.721.0",
"@paralleldrive/cuid2": "^3.0.6",
"chalk": "^4.1.2",
"execa": "^5.1.1",
Expand Down
Loading
Loading