Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ce7394f
feat(amplify-gen2-migration-e2e-system): add snapshot normalization
iliapolo Apr 12, 2026
1fca882
chore: reset project-boards snapshots
iliapolo Apr 12, 2026
c77ca03
chore: regen project-boards snapshots with e2e
iliapolo Apr 12, 2026
89d422b
chore: normalization script to project-boards
iliapolo Apr 12, 2026
28a20f4
chore: mid work
iliapolo Apr 12, 2026
2b67eb8
chore: new snapshots take 1
iliapolo Apr 12, 2026
0d16f63
chore: normalize snapshots after e2e run
iliapolo Apr 12, 2026
cb326a9
chore: snapshots again
iliapolo Apr 12, 2026
a0f78a7
chore: normalize skip replaced hashes
iliapolo Apr 12, 2026
23493fd
chore: more snapshots
iliapolo Apr 12, 2026
740d4df
chore: fixed length replacement
iliapolo Apr 13, 2026
4a9e541
chore: new snapshots
iliapolo Apr 13, 2026
ec15227
chore: new snapshots
iliapolo Apr 13, 2026
579c06e
chore: new snapshots
iliapolo Apr 13, 2026
da25872
chore: sanitize all outputs
iliapolo Apr 13, 2026
50225ad
chore: sanitize all outputs
iliapolo Apr 13, 2026
4e0e36d
chore: sanitize based on outputs
iliapolo Apr 13, 2026
cd50e51
chore: restore snapshots
iliapolo Apr 13, 2026
254d15b
chore: restore snapshots
iliapolo Apr 13, 2026
c035e9a
chore: restore snapshots
iliapolo Apr 13, 2026
0e5cc91
chore: restore snapshots
iliapolo Apr 13, 2026
5b0a5d3
snapshots
iliapolo Apr 13, 2026
46caa47
snapshots
iliapolo Apr 13, 2026
ec937e9
snapshots
iliapolo Apr 13, 2026
63a7129
snapshots
iliapolo Apr 13, 2026
610e730
chore: mid work
iliapolo Apr 13, 2026
726b734
chore: more snapshots
iliapolo Apr 13, 2026
3eae020
chore: regen project-boards pre.generate
iliapolo Apr 13, 2026
a3a9a5f
chore: fix scripts
iliapolo Apr 13, 2026
89751bc
chore: restore gen2-migration snapshots
iliapolo Apr 13, 2026
7058d0b
chore: regen project-boards snapshots
iliapolo Apr 13, 2026
5932aa8
chore: regen project-boards snapshots
iliapolo Apr 14, 2026
7b2907e
chore: regen discussions snapshots
iliapolo Apr 14, 2026
7098878
chore: regen project-boards snapshots
iliapolo Apr 14, 2026
2801485
chore: restore gen2-migration fitness-tracker snapshots
iliapolo Apr 14, 2026
02ef018
chore: restore gen2-migration product-catalog snapshots
iliapolo Apr 14, 2026
2cb6455
chore: regen discussions snapshots
iliapolo Apr 14, 2026
52e97ae
chore: restore gen2-migration store-locator snapshots
iliapolo Apr 14, 2026
843254c
chore: restore gen2-migration media-vault snapshots
iliapolo Apr 14, 2026
12ee9a3
chore: restore gen2-migration backend-only snapshots
iliapolo Apr 14, 2026
851b3bb
chore: restore gen2-migration mood-board snapshots
iliapolo Apr 14, 2026
8f8ee54
chore: regen snapshots
iliapolo Apr 14, 2026
ff17d9b
chore: regen snapshots
iliapolo Apr 14, 2026
b63120c
chore: regen snapshots
iliapolo Apr 14, 2026
6837ae6
chore: regen snapshots
iliapolo Apr 14, 2026
8efdc47
chore: regen snapshots
iliapolo Apr 14, 2026
2904e0b
chore: regen snapshots
iliapolo Apr 14, 2026
64aeefd
chore: regen snapshots
iliapolo Apr 14, 2026
8daaadd
chore: regen snapshots
iliapolo Apr 14, 2026
de6816a
chore: regen snapshots
iliapolo Apr 14, 2026
899cc63
chore: regen snapshots
iliapolo Apr 14, 2026
5520e0b
refactor(amplify-gen2-migration-e2e-system): clean up sanitize and
iliapolo Apr 14, 2026
e1d7f85
chore: update yarn.lock
iliapolo Apr 14, 2026
b020150
chore: restore gen2-migration snapshot
iliapolo Apr 14, 2026
d8f79c2
chore: restore gen2-migration snapshot
iliapolo Apr 14, 2026
2ff77ce
refactor(amplify-gen2-migration-e2e-system): remove output value
iliapolo Apr 14, 2026
97c6358
fix(amplify-gen2-migration-e2e-system): remove da2- prefix guard
iliapolo Apr 14, 2026
e0e5778
chore: regen snapshots
iliapolo Apr 14, 2026
89655f3
feat: add normalize script to all apps
iliapolo Apr 14, 2026
048f815
chore: regen snapshots
iliapolo Apr 14, 2026
0085f4e
chore: regen snapshots
iliapolo Apr 14, 2026
e16ad65
chore: regen snapshots
iliapolo Apr 14, 2026
84f184f
chore: regen snapshots
iliapolo Apr 14, 2026
7068962
chore: regen snapshots
iliapolo Apr 14, 2026
444a655
chore: regen snapshots
iliapolo Apr 14, 2026
2142310
chore: regen snapshots
iliapolo Apr 15, 2026
3ce6c17
chore: regen snapshots
iliapolo Apr 15, 2026
8595a8a
chore: regen snapshots
iliapolo Apr 15, 2026
0d30b4d
chore: regen snapshots
iliapolo Apr 15, 2026
08bde27
chore: lock file
iliapolo Apr 15, 2026
295fa88
chore: regen snapshots
iliapolo Apr 15, 2026
2a74d38
chore: examples of hash structures
iliapolo Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
22 changes: 9 additions & 13 deletions amplify-migration-apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,25 +221,21 @@ Some refactors target a `-holding` stack (visible in the target stack name). Res
moved from the Gen2 stack to the holding stack (to make room), then from the Gen1 stack to the
Gen2 stack. The holding stack persists as the final destination for the Gen2 stateful resources.

## Sanitization
## Normalization and Sanitization

Sensitive values must be replaced with safe placeholder values before they are committed.
Each app's `package.json` includes a `sanitize` script that invokes the shared `sanitize.ts`
at the root of this directory. This runs automatically on commit via the Husky pre-commit hook,
so you don't need to run it manually. If you do want to run it yourself:
After snapshots are captured, they must be normalized and sanitized before committing.
See the [E2E system README](../packages/amplify-gen2-migration-e2e-system/README.md#snapshot-post-processing)
for details on what each step does.

To run them manually on a single app:

```console
cd amplify-migration-apps/<app-name>
npm run sanitize
npx tsx ../normalize.ts
npx tsx ../sanitize.ts
```

The script extracts values from `amplify-meta.json` and replaces them across all snapshot files:

| Value | Placeholder |
| ---------------- | ---------------------------------- |
| AWS Account ID | `123456789012` |
| Amplify App ID | `<app-name-no-dashes>` |
| AppSync API Key | `da2-fakeapikey00000000000000` |
Order matters — normalize first, then sanitize.

## Typechecking

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cfnGraphqlApi.additionalAuthenticationProviders = [
];
const s3Bucket = backend.storage.resources.cfnResources.cfnBucket;
// Use this bucket name post refactor
// s3Bucket.bucketName = 'backendonlycb1a13ab81664ecaa7d015068ab2d0165e0fa-main';
// s3Bucket.bucketName = 'backendonlycb1a13ab81664ecaa7d015068ab2d016x-x';
s3Bucket.bucketEncryption = {
serverSideEncryptionConfiguration: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export const data = defineData({
migratedAmplifyGen1DynamoDbTableMappings: [
{
//The "branchname" variable needs to be the same as your deployment branch if you want to reuse your Gen1 app tables
branchName: 'main',
branchName: 'x',
modelNameToTableNameMapping: {
Project: 'Project-sgumi4ggubb4jdo6i54km7skka-main',
Todo: 'Todo-sgumi4ggubb4jdo6i54km7skka-main',
Project: 'Project-q2d7oghxlbgxxj3fr2t6f2bpm4-x',
Todo: 'Todo-q2d7oghxlbgxxj3fr2t6f2bpm4-x',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineStorage } from '@aws-amplify/backend';
const branchName = process.env.AWS_BRANCH ?? 'sandbox';

export const storage = defineStorage({
name: `backendonlycb1a13ab81664ecaa7d015068ab2d0165e0fa-${branchName}`,
name: `backendonlycb1a13ab81664ecaa7d015068ab2d016x-${branchName}`,
access: (allow) => ({
'public/*': [
allow.guest.to(['read']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,27 @@
"hoistingLimits": "workspaces"
},
"scripts": {
"configure": "./backend/configure.sh",
"sanitize": "tsx ../sanitize.ts",
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit"
},
"dependencies": {
"cli-table3": "0.6.5"
"normalize": "tsx ../normalize.ts",
"typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit",
"test:gen1": "true",
"test:gen2": "true",
"test:shared-data": "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",
"post-refactor": "npx tsx migration/post-refactor.ts",
"post-sandbox": "true",
"pre-sandbox": "true",
"post-push": "true"
},
"devDependencies": {
"@aws-amplify/backend": "^1.18.0",
"@aws-amplify/backend-cli": "^1.8.0",
"@aws-amplify/backend-data": "^1.6.2",
"@aws-sdk/client-cognito-identity-provider": "^3.936.0",
"@types/aws-lambda": "^8.10.92",
"@types/node": "*",
"aws-cdk": "^2",
Expand All @@ -25,5 +36,8 @@
"constructs": "^10.0.0",
"esbuild": "^0.27.0",
"tsx": "^4.20.6"
},
"dependencies": {
"cli-table3": "0.6.5"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{
"Source": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x",
"LogicalResourceId": "amplifyAuthUserPool4BA7F805"
},
"Destination": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x-holding",
"LogicalResourceId": "amplifyAuthUserPool4BA7F805"
}
},
{
"Source": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x",
"LogicalResourceId": "amplifyAuthUserPoolNativeAppClient79534448"
},
"Destination": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x-holding",
"LogicalResourceId": "amplifyAuthUserPoolNativeAppClient79534448"
}
},
{
"Source": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x",
"LogicalResourceId": "amplifyAuthUserPoolAppClient2626C6F8"
},
"Destination": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x-holding",
"LogicalResourceId": "amplifyAuthUserPoolAppClient2626C6F8"
}
},
{
"Source": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x",
"LogicalResourceId": "amplifyAuthIdentityPool3FDE84CC"
},
"Destination": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x-holding",
"LogicalResourceId": "amplifyAuthIdentityPool3FDE84CC"
}
},
{
"Source": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x",
"LogicalResourceId": "amplifyAuthIdentityPoolRoleAttachment045F17C8"
},
"Destination": {
"StackName": "amplify-backendonly-e2e-sandbox-x-auth179371D7-x-holding",
"LogicalResourceId": "amplifyAuthIdentityPoolRoleAttachment045F17C8"
}
}
]
Loading
Loading