From 73b08dc424db2fb60399c5343c314e02e849d4a1 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Tue, 9 Jan 2024 15:11:49 -0800 Subject: [PATCH 1/6] fix: set policy effect deny when removing auth (#13523) --- .../resources/update-idp-roles-cfn.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json b/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json index a17c761bc52..ebe7d192dbf 100644 --- a/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json +++ b/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json @@ -47,6 +47,8 @@ " try {", " delete authParamsJson.Statement[0].Condition;", " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", " const iam = new IAMClient({region: event.ResourceProperties.region});", From e4f21b81d7d0046bf3a794676c267217d91e0193 Mon Sep 17 00:00:00 2001 From: aws-amplify-bot Date: Wed, 10 Jan 2024 03:50:59 +0000 Subject: [PATCH 2/6] chore(release): Publish latest - @aws-amplify/amplify-category-notifications@2.26.12 - @aws-amplify/cli@12.10.1 - @aws-amplify/cli-internal@12.10.1 - @aws-amplify/amplify-provider-awscloudformation@8.10.2 - @aws-amplify/amplify-util-mock@5.9.2 --- .../CHANGELOG.md | 8 ++++++++ .../package.json | 4 ++-- packages/amplify-cli-npm/CHANGELOG.md | 8 ++++++++ packages/amplify-cli-npm/package.json | 4 ++-- packages/amplify-cli/CHANGELOG.md | 8 ++++++++ packages/amplify-cli/package.json | 8 ++++---- .../CHANGELOG.md | 11 ++++++++++ .../package.json | 2 +- packages/amplify-util-mock/CHANGELOG.md | 8 ++++++++ packages/amplify-util-mock/package.json | 4 ++-- yarn.lock | 20 +++++++++---------- 11 files changed, 64 insertions(+), 21 deletions(-) diff --git a/packages/amplify-category-notifications/CHANGELOG.md b/packages/amplify-category-notifications/CHANGELOG.md index 7be87d858b6..2c532480cf2 100644 --- a/packages/amplify-category-notifications/CHANGELOG.md +++ b/packages/amplify-category-notifications/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.26.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.11...@aws-amplify/amplify-category-notifications@2.26.12) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + ## [2.26.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.10...@aws-amplify/amplify-category-notifications@2.26.11) (2023-12-16) **Note:** Version bump only for package @aws-amplify/amplify-category-notifications diff --git a/packages/amplify-category-notifications/package.json b/packages/amplify-category-notifications/package.json index 44657b6ccbe..cb07413a4da 100644 --- a/packages/amplify-category-notifications/package.json +++ b/packages/amplify-category-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-notifications", - "version": "2.26.11", + "version": "2.26.12", "description": "amplify-cli notifications plugin", "repository": { "type": "git", @@ -29,7 +29,7 @@ "@aws-amplify/amplify-cli-core": "4.3.0", "@aws-amplify/amplify-environment-parameters": "1.9.5", "@aws-amplify/amplify-prompts": "2.8.6", - "@aws-amplify/amplify-provider-awscloudformation": "8.10.1", + "@aws-amplify/amplify-provider-awscloudformation": "8.10.2", "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "fs-extra": "^8.1.0", diff --git a/packages/amplify-cli-npm/CHANGELOG.md b/packages/amplify-cli-npm/CHANGELOG.md index f745d8e74fd..af58efd3950 100644 --- a/packages/amplify-cli-npm/CHANGELOG.md +++ b/packages/amplify-cli-npm/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [12.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.10.0...@aws-amplify/cli@12.10.1) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + # [12.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.9.0...@aws-amplify/cli@12.10.0) (2023-12-16) diff --git a/packages/amplify-cli-npm/package.json b/packages/amplify-cli-npm/package.json index 12068c189ef..e850472fd22 100644 --- a/packages/amplify-cli-npm/package.json +++ b/packages/amplify-cli-npm/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/cli", - "version": "12.10.0", + "version": "12.10.1", "description": "Amplify CLI", "repository": { "type": "git", @@ -36,7 +36,7 @@ "tar-stream": "^2.2.0" }, "devDependencies": { - "@aws-amplify/cli-internal": "12.10.0", + "@aws-amplify/cli-internal": "12.10.1", "@types/tar": "^6.1.1", "rimraf": "^3.0.2" }, diff --git a/packages/amplify-cli/CHANGELOG.md b/packages/amplify-cli/CHANGELOG.md index ccd964ffeba..c711b31ab62 100644 --- a/packages/amplify-cli/CHANGELOG.md +++ b/packages/amplify-cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [12.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.10.0...@aws-amplify/cli-internal@12.10.1) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + # [12.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.9.0...@aws-amplify/cli-internal@12.10.0) (2023-12-16) diff --git a/packages/amplify-cli/package.json b/packages/amplify-cli/package.json index 02a3a462fd2..e77e1929dec 100644 --- a/packages/amplify-cli/package.json +++ b/packages/amplify-cli/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/cli-internal", - "version": "12.10.0", + "version": "12.10.1", "description": "Amplify CLI", "repository": { "type": "git", @@ -43,7 +43,7 @@ "@aws-amplify/amplify-category-geo": "3.5.5", "@aws-amplify/amplify-category-hosting": "3.5.27", "@aws-amplify/amplify-category-interactions": "5.1.19", - "@aws-amplify/amplify-category-notifications": "2.26.11", + "@aws-amplify/amplify-category-notifications": "2.26.12", "@aws-amplify/amplify-category-predictions": "5.5.5", "@aws-amplify/amplify-category-storage": "5.5.5", "@aws-amplify/amplify-cli-core": "4.3.0", @@ -60,10 +60,10 @@ "@aws-amplify/amplify-go-function-template-provider": "1.4.7", "@aws-amplify/amplify-nodejs-function-template-provider": "2.10.0", "@aws-amplify/amplify-prompts": "2.8.6", - "@aws-amplify/amplify-provider-awscloudformation": "8.10.1", + "@aws-amplify/amplify-provider-awscloudformation": "8.10.2", "@aws-amplify/amplify-python-function-template-provider": "1.4.7", "@aws-amplify/amplify-util-import": "2.8.3", - "@aws-amplify/amplify-util-mock": "5.9.1", + "@aws-amplify/amplify-util-mock": "5.9.2", "@aws-amplify/amplify-util-uibuilder": "1.14.1", "@aws-cdk/cloudformation-diff": "~2.68.0", "amplify-codegen": "^4.7.3", diff --git a/packages/amplify-provider-awscloudformation/CHANGELOG.md b/packages/amplify-provider-awscloudformation/CHANGELOG.md index 19b7f73873a..ef2a4b8806c 100644 --- a/packages/amplify-provider-awscloudformation/CHANGELOG.md +++ b/packages/amplify-provider-awscloudformation/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.1...@aws-amplify/amplify-provider-awscloudformation@8.10.2) (2024-01-10) + + +### Bug Fixes + +* set policy effect deny when removing auth ([#13523](https://github.com/aws-amplify/amplify-cli/issues/13523)) ([73b08dc](https://github.com/aws-amplify/amplify-cli/commit/73b08dc424db2fb60399c5343c314e02e849d4a1)) + + + + + ## [8.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.0...@aws-amplify/amplify-provider-awscloudformation@8.10.1) (2023-12-16) **Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation diff --git a/packages/amplify-provider-awscloudformation/package.json b/packages/amplify-provider-awscloudformation/package.json index f72d99e8534..f0c60b8befe 100644 --- a/packages/amplify-provider-awscloudformation/package.json +++ b/packages/amplify-provider-awscloudformation/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-provider-awscloudformation", - "version": "8.10.1", + "version": "8.10.2", "description": "AWS CloudFormation Provider", "repository": { "type": "git", diff --git a/packages/amplify-util-mock/CHANGELOG.md b/packages/amplify-util-mock/CHANGELOG.md index 75fab0596da..115acf65283 100644 --- a/packages/amplify-util-mock/CHANGELOG.md +++ b/packages/amplify-util-mock/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.1...@aws-amplify/amplify-util-mock@5.9.2) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + ## [5.9.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.0...@aws-amplify/amplify-util-mock@5.9.1) (2023-12-16) **Note:** Version bump only for package @aws-amplify/amplify-util-mock diff --git a/packages/amplify-util-mock/package.json b/packages/amplify-util-mock/package.json index 717de27cd3a..86d2e5c3f84 100644 --- a/packages/amplify-util-mock/package.json +++ b/packages/amplify-util-mock/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-util-mock", - "version": "5.9.1", + "version": "5.9.2", "description": "amplify cli plugin providing local testing", "repository": { "type": "git", @@ -37,7 +37,7 @@ "@aws-amplify/amplify-environment-parameters": "1.9.5", "@aws-amplify/amplify-opensearch-simulator": "1.7.5", "@aws-amplify/amplify-prompts": "2.8.6", - "@aws-amplify/amplify-provider-awscloudformation": "8.10.1", + "@aws-amplify/amplify-provider-awscloudformation": "8.10.2", "@hapi/topo": "^5.0.0", "amplify-codegen": "^4.7.3", "amplify-dynamodb-simulator": "2.9.9", diff --git a/yarn.lock b/yarn.lock index da0b4b9a52c..80628bf443c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -335,14 +335,14 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-notifications@2.26.11, @aws-amplify/amplify-category-notifications@workspace:packages/amplify-category-notifications": +"@aws-amplify/amplify-category-notifications@2.26.12, @aws-amplify/amplify-category-notifications@workspace:packages/amplify-category-notifications": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-notifications@workspace:packages/amplify-category-notifications" dependencies: "@aws-amplify/amplify-cli-core": 4.3.0 "@aws-amplify/amplify-environment-parameters": 1.9.5 "@aws-amplify/amplify-prompts": 2.8.6 - "@aws-amplify/amplify-provider-awscloudformation": 8.10.1 + "@aws-amplify/amplify-provider-awscloudformation": 8.10.2 aws-sdk: ^2.1464.0 chalk: ^4.1.1 fs-extra: ^8.1.0 @@ -793,7 +793,7 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-provider-awscloudformation@8.10.1, @aws-amplify/amplify-provider-awscloudformation@workspace:packages/amplify-provider-awscloudformation": +"@aws-amplify/amplify-provider-awscloudformation@8.10.2, @aws-amplify/amplify-provider-awscloudformation@workspace:packages/amplify-provider-awscloudformation": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-provider-awscloudformation@workspace:packages/amplify-provider-awscloudformation" dependencies: @@ -868,7 +868,7 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-util-mock@5.9.1, @aws-amplify/amplify-util-mock@workspace:packages/amplify-util-mock": +"@aws-amplify/amplify-util-mock@5.9.2, @aws-amplify/amplify-util-mock@workspace:packages/amplify-util-mock": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-util-mock@workspace:packages/amplify-util-mock" dependencies: @@ -879,7 +879,7 @@ __metadata: "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@aws-amplify/amplify-opensearch-simulator": 1.7.5 "@aws-amplify/amplify-prompts": 2.8.6 - "@aws-amplify/amplify-provider-awscloudformation": 8.10.1 + "@aws-amplify/amplify-provider-awscloudformation": 8.10.2 "@aws-amplify/graphql-auth-transformer": ^3.3.1 "@aws-amplify/graphql-default-value-transformer": ^2.2.1 "@aws-amplify/graphql-function-transformer": ^2.1.13 @@ -1067,7 +1067,7 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/cli-internal@12.10.0, @aws-amplify/cli-internal@workspace:packages/amplify-cli": +"@aws-amplify/cli-internal@12.10.1, @aws-amplify/cli-internal@workspace:packages/amplify-cli": version: 0.0.0-use.local resolution: "@aws-amplify/cli-internal@workspace:packages/amplify-cli" dependencies: @@ -1080,7 +1080,7 @@ __metadata: "@aws-amplify/amplify-category-geo": 3.5.5 "@aws-amplify/amplify-category-hosting": 3.5.27 "@aws-amplify/amplify-category-interactions": 5.1.19 - "@aws-amplify/amplify-category-notifications": 2.26.11 + "@aws-amplify/amplify-category-notifications": 2.26.12 "@aws-amplify/amplify-category-predictions": 5.5.5 "@aws-amplify/amplify-category-storage": 5.5.5 "@aws-amplify/amplify-cli-core": 4.3.0 @@ -1098,10 +1098,10 @@ __metadata: "@aws-amplify/amplify-go-function-template-provider": 1.4.7 "@aws-amplify/amplify-nodejs-function-template-provider": 2.10.0 "@aws-amplify/amplify-prompts": 2.8.6 - "@aws-amplify/amplify-provider-awscloudformation": 8.10.1 + "@aws-amplify/amplify-provider-awscloudformation": 8.10.2 "@aws-amplify/amplify-python-function-template-provider": 1.4.7 "@aws-amplify/amplify-util-import": 2.8.3 - "@aws-amplify/amplify-util-mock": 5.9.1 + "@aws-amplify/amplify-util-mock": 5.9.2 "@aws-amplify/amplify-util-uibuilder": 1.14.1 "@aws-cdk/cloudformation-diff": ~2.68.0 "@types/archiver": ^5.3.1 @@ -1167,7 +1167,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/cli@workspace:packages/amplify-cli-npm" dependencies: - "@aws-amplify/cli-internal": 12.10.0 + "@aws-amplify/cli-internal": 12.10.1 "@types/tar": ^6.1.1 axios: ^1.6.2 rimraf: ^3.0.2 From abe24b7c0d2656989b993b5ce27e7ded8d6112d5 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 20 Feb 2024 12:44:43 -0800 Subject: [PATCH 3/6] chore: remove v10 migration tests --- codebuild_specs/e2e_workflow_generated.yml | 468 ++++++---------- codebuild_specs/migration_tests_v10.yml | 46 -- codebuild_specs/wait_for_ids.json | 12 - .../custom-resources/custom-cdk-stack-v10.ts | 47 -- .../overrides/override-api-gql.v10.ts | 3 - .../api-graphql-v2.migration.test.ts.snap | 5 - .../api-rest-basic.migration.test.ts.snap | 10 - .../api-rest-lambda.migration.test.ts.snap | 75 --- ...api-rest-serverless.migration.test.ts.snap | 10 - .../auth-add-all.migration.test.ts.snap | 511 ------------------ .../auth-override.migration.test.ts.snap | 69 --- .../custom-stack.migration.test.ts.snap | 5 - .../__snapshots__/geo.migration.test.ts.snap | 123 ----- .../storage.migration.test.ts.snap | 72 --- .../api-graphql-v2.migration.test.ts | 75 --- .../api-rest-basic.migration.test.ts | 61 --- .../api-rest-lambda.migration.test.ts | 112 ---- .../api-rest-serverless.migration.test.ts | 56 -- .../auth-add-all.migration.test.ts | 68 --- .../auth-override.migration.test.ts | 81 --- .../custom-stack.migration.test.ts | 144 ----- .../migration_tests_v10/geo.migration.test.ts | 44 -- .../git-clone-migration-tests.test.ts | 84 --- .../pinpoint-region.migration.test.ts | 41 -- .../migration_tests_v10/scaffold.test.ts | 27 - .../storage.migration.test.ts | 45 -- .../cfn-diff-exclusions.ts | 37 -- .../src/migration-helpers-v10/init.ts | 97 ---- scripts/split-e2e-test-filters.ts | 14 - scripts/split-e2e-tests-codebuild.ts | 18 +- 30 files changed, 182 insertions(+), 2278 deletions(-) delete mode 100644 codebuild_specs/migration_tests_v10.yml delete mode 100644 packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts delete mode 100644 packages/amplify-migration-tests/overrides/override-api-gql.v10.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts delete mode 100644 packages/amplify-migration-tests/src/migration-helpers-v10/init.ts diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index 15a6bbe20a0..e588b3099a6 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -145,7 +145,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/diagnose.test.ts|src/__tests__/hooks-a.test.ts|src/__tests__/mock-api.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js @@ -153,7 +153,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts|src/__tests__/analytics-pinpoint-js.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_auth_2a_auth_2b_auth_2d @@ -161,7 +161,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_2f_notifications_lifecycle_notifications_analytics_compatibility_in_app_1 @@ -169,7 +169,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c @@ -177,7 +177,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-analytics-compatibility-sms-2.test.ts|src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_hooks_b_notifications_analytics_compatibility_sms_1_plugin @@ -185,7 +185,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts|src/__tests__/plugin.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1 @@ -193,7 +193,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_notifications_sms_pull_pull_auth_10 @@ -201,7 +201,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/pull.test.ts|src/__tests__/auth_10.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_container_hosting_init_b_notifications_apns @@ -209,7 +209,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/container-hosting.test.ts|src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_notifications_fcm_notifications_in_app_messaging_env_2_with_babel_config @@ -217,7 +217,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-fcm.test.ts|src/__tests__/notifications-in-app-messaging-env-2.test.ts|src/__tests__/with-babel-config.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_amplify_configure_env_2_init_d @@ -225,7 +225,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/amplify-configure.test.ts|src/__tests__/env-2.test.ts|src/__tests__/init_d.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_init_f_auth_5d_configure_project @@ -233,7 +233,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts|src/__tests__/configure-project.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_git_clone_attach_init_c_layer_4 @@ -241,7 +241,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/git-clone-attach.test.ts|src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_function_2c_function_3b_function_4 @@ -265,7 +265,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts|src/__tests__/custom_policies_function.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_function_6_storage_2_export @@ -273,7 +273,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_6.test.ts|src/__tests__/storage-2.test.ts|src/__tests__/export.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_iam_permissions_boundary_node_function_notifications_sms @@ -281,7 +281,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/iam-permissions-boundary.test.ts|src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_schema_auth_4b_schema_model_e_schema_versioned @@ -289,7 +289,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_1c_auth_5e_auth_8b @@ -297,7 +297,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_1c.test.ts|src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_geo_add_b_s3_sse_schema_auth_4a @@ -305,7 +305,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-add-b.test.ts|src/__tests__/s3-sse.test.ts|src/__tests__/schema-auth-4a.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_schema_model_b_schema_model_d_auth_5f @@ -321,7 +321,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts|src/__tests__/schema-auth-4d.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_6a_schema_data_access_patterns_schema_model_c @@ -329,7 +329,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-6a.test.ts|src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_schema_predictions_model_migration_auth_3c @@ -337,7 +337,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-predictions.test.ts|src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_4c_auth_5a_auth_5c @@ -353,7 +353,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_4c_schema_auth_5c_auth_5b @@ -361,7 +361,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-4c.test.ts|src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_9_custom_resources_env_5 @@ -369,7 +369,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_9.test.ts|src/__tests__/custom_resources.test.ts|src/__tests__/env-5.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_function_10_function_9c_function_permissions @@ -377,7 +377,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts|src/__tests__/function-permissions.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_geo_import_1a_geo_import_2_global_sandbox_b @@ -385,7 +385,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts|src/__tests__/global_sandbox-b.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_5d_schema_auth_6b_schema_auth_8c @@ -393,7 +393,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts|src/__tests__/schema-auth-8c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_auth_3a_auth_3b_auth_4a @@ -409,7 +409,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts|src/__tests__/feature-flags.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_geo_import_1b_global_sandbox_a_init_e @@ -417,7 +417,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_notifications_analytics_compatibility_in_app_2_schema_auth_11_c_schema_auth_2b @@ -425,7 +425,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts|src/__tests__/schema-auth-2b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_schema_auth_6c_schema_auth_6d_schema_auth_7c @@ -433,7 +433,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-6c.test.ts|src/__tests__/schema-auth-6d.test.ts|src/__tests__/schema-auth-7c.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_schema_auth_8a_function_migration_api_10 @@ -449,7 +449,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_geo_headless_api_key_migration5_schema_auth_1a @@ -465,7 +465,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts|src/__tests__/schema-auth-9-a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_9_c_storage_3_auth_11 @@ -473,7 +473,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts|src/__tests__/auth_11.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_1b_delete_geo_add_c @@ -481,7 +481,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts|src/__tests__/geo-add-c.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_geo_add_d_geo_import_3_hosting @@ -489,7 +489,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts|src/__tests__/hosting.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_layer_3_api_connection_migration_api_key_migration3 @@ -505,7 +505,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts|src/__tests__/schema-auth-1b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_schema_auth_2a_schema_auth_7a_schema_auth_7b @@ -513,7 +513,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_9_b_schema_iterative_rollback_1_predictions_migration @@ -521,7 +521,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-9-b.test.ts|src/__tests__/schema-iterative-rollback-1.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_api_6a_auth_7b_export_pull_b @@ -529,7 +529,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_function_3a_init_special_case_http_migration @@ -537,7 +537,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_3a.test.ts|src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_schema_auth_12_schema_auth_3_schema_function_2 @@ -545,7 +545,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-12.test.ts|src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_4b_auth_8a_export_pull_d @@ -553,7 +553,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_schema_auth_5a_schema_iterative_rollback_2_schema_iterative_update_3 @@ -561,7 +561,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-5a.test.ts|src/__tests__/schema-iterative-rollback-2.test.ts|src/__tests__/schema-iterative-update-3.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_auth_migration_amplify_remove_api_2a @@ -577,7 +577,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_12_auth_2g_auth_2h @@ -585,7 +585,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_12.test.ts|src/__tests__/auth_2g.test.ts|src/__tests__/auth_2h.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_auth_5g_hosted_ui_user_groups_s3_access @@ -593,7 +593,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_5g.test.ts|src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups-s3-access.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_user_groups_js_frontend_config_build_function @@ -601,7 +601,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth/user-groups.test.ts|src/__tests__/aws-exports/js-frontend-config.test.ts|src/__tests__/build-function.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_custom_resource_with_storage_dynamodb_simulator_export_pull_c @@ -625,7 +625,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_15.test.ts|src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_help_hooks_c_init_force_push @@ -633,7 +633,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/help.test.ts|src/__tests__/hooks-c.test.ts|src/__tests__/init-force-push.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_interactions_1_interactions_2_minify_cloudformation @@ -649,7 +649,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-multi-env.test.ts|src/__tests__/notifications-sms-update.test.ts|src/__tests__/opensearch-simulator/opensearch-simulator.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_parameter_store_1_parameter_store_2_android_analytics_pinpoint_config @@ -657,7 +657,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/parameter-store-1.test.ts|src/__tests__/parameter-store-2.test.ts|src/__tests__/pinpoint/android-analytics-pinpoint-config.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_android_notifications_pinpoint_config_flutter_analytics_pinpoint_config_flutter_notifications_pinpoint_config @@ -665,7 +665,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/pinpoint/android-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/flutter-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/flutter-notifications-pinpoint-config.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_ios_analytics_pinpoint_config_ios_notifications_pinpoint_config_javascript_analytics_pinpoint_config @@ -673,7 +673,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/pinpoint/ios-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/ios-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/javascript-analytics-pinpoint-config.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_javascript_notifications_pinpoint_config_pr_previews_multi_env_1_pull_2 @@ -681,7 +681,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/pinpoint/javascript-notifications-pinpoint-config.test.ts|src/__tests__/pr-previews-multi-env-1.test.ts|src/__tests__/pull-2.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_push_smoketest_ios_smoketest @@ -697,7 +697,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/storage-simulator/S3server.test.ts|src/__tests__/api_8.test.ts|src/__tests__/function_8.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_iterative_update_locking_api_lambda_auth_2_layer_2 @@ -705,7 +705,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts|src/__tests__/layer-2.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_schema_auth_13_function_5_schema_iterative_update_1 @@ -713,7 +713,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_6_function_2a_schema_connection_2 @@ -721,7 +721,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_schema_function_1_api_9b_custom_policies_container @@ -729,7 +729,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_function_9b_schema_iterative_update_2_storage_1a @@ -737,7 +737,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_storage_1b_function_11_function_2b @@ -745,7 +745,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_function_7_api_connection_migration2_api_4 @@ -753,7 +753,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_7.test.ts|src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_containers_api_secrets_storage_4_schema_auth_10 @@ -761,7 +761,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_multi_env_searchable_datastore_resolvers @@ -777,7 +777,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts|src/__tests__/apigw.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_api_lambda_auth_1_api_key_migration2_schema_searchable @@ -801,7 +801,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts|src/__tests__/layer-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_api_key_migration4_schema_iterative_update_4_function_1 @@ -809,7 +809,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/migration/api.key.migration4.test.ts|src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_storage_5 @@ -818,7 +818,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/storage-5.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_datastore_modelgen @@ -827,7 +827,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/datastore-modelgen.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-2 DISABLE_COVERAGE: 1 depend-on: - upb @@ -856,7 +856,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_uibuilder @@ -865,7 +865,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/uibuilder.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_remove_3 @@ -883,7 +883,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-f.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_geo_add_e @@ -892,7 +892,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-e.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_dynamodb_2c @@ -901,7 +901,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_env_3 @@ -919,7 +919,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-2.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_notifications_in_app_messaging @@ -928,7 +928,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_auth_2a @@ -937,7 +937,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_auth_1a @@ -946,7 +946,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_auth_2b @@ -955,7 +955,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_s3_2a @@ -964,7 +964,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_s3_2c @@ -973,7 +973,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_auth_1b @@ -982,7 +982,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_schema_auth_11_a @@ -991,7 +991,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_geo_update_1 @@ -1009,7 +1009,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-2.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_s3_3 @@ -1018,7 +1018,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_dynamodb_2b @@ -1027,7 +1027,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2b.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_smoketest_amplify_app @@ -1036,7 +1036,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/smoke-tests/smoketest-amplify-app.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 DISABLE_COVERAGE: 1 depend-on: - upb @@ -1046,7 +1046,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_s3_2b @@ -1055,7 +1055,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2b.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_containers_api_1 @@ -1073,7 +1073,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_schema_connection_1 @@ -1082,7 +1082,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-connection-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_auth_3 @@ -1091,7 +1091,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_3.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_import_dynamodb_2a @@ -1100,7 +1100,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2a.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_containers_api_2 @@ -1118,7 +1118,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1128,7 +1128,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1138,7 +1138,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_import_dynamodb_1 @@ -1147,7 +1147,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1158,7 +1158,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts|src/__tests__/analytics-pinpoint-js.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1180,7 +1180,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1191,7 +1191,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-analytics-compatibility-sms-2.test.ts|src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1202,7 +1202,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts|src/__tests__/plugin.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1213,7 +1213,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1224,7 +1224,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/auth_10.test.ts|src/__tests__/container-hosting.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1235,7 +1235,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts|src/__tests__/notifications-fcm.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1257,7 +1257,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init_d.test.ts|src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1268,7 +1268,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/configure-project.test.ts|src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1290,7 +1290,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/tags.test.ts|src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1301,7 +1301,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/custom_policies_function.test.ts|src/__tests__/storage-2.test.ts|src/__tests__/iam-permissions-boundary.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1312,7 +1312,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts|src/__tests__/schema-auth-4b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1334,7 +1334,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts|src/__tests__/geo-add-b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1356,7 +1356,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts|src/__tests__/env-4.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1378,7 +1378,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts|src/__tests__/schema-predictions.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1389,7 +1389,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts|src/__tests__/auth_4c.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1400,7 +1400,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts|src/__tests__/env-1.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1411,7 +1411,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts|src/__tests__/schema-auth-4c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1422,7 +1422,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts|src/__tests__/auth_9.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1433,7 +1433,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1444,7 +1444,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function-permissions.test.ts|src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1455,7 +1455,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/global_sandbox-b.test.ts|src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1477,7 +1477,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_4a.test.ts|src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1488,7 +1488,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1499,7 +1499,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init_e.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1510,7 +1510,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-2b.test.ts|src/__tests__/schema-auth-6c.test.ts|src/__tests__/schema-auth-6d.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1543,7 +1543,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function_9a.test.ts|src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1554,7 +1554,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1565,7 +1565,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-9-a.test.ts|src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1576,7 +1576,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1587,7 +1587,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-add-c.test.ts|src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1598,7 +1598,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1609,7 +1609,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/api.key.migration3.test.ts|src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1620,7 +1620,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-1b.test.ts|src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1631,7 +1631,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-7b.test.ts|src/__tests__/schema-auth-9-b.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1642,7 +1642,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1653,7 +1653,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts|src/__tests__/schema-auth-12.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1664,7 +1664,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts|src/__tests__/auth_4b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1675,7 +1675,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts|src/__tests__/schema-auth-5a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1686,7 +1686,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/amplify-remove.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1697,7 +1697,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_2a.test.ts|src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1719,7 +1719,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups-s3-access.test.ts|src/__tests__/auth/user-groups.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1730,7 +1730,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/aws-exports/js-frontend-config.test.ts|src/__tests__/build-function.test.ts|src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1741,7 +1741,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts|src/__tests__/function_13.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1752,7 +1752,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function_14.test.ts|src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1796,7 +1796,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/push.test.ts|src/__tests__/smoke-tests/smoketest-ios.test.ts|src/__tests__/smoke-tests/smoketest.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1807,7 +1807,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_8.test.ts|src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1818,7 +1818,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1829,7 +1829,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1840,7 +1840,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1851,7 +1851,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1862,7 +1862,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1873,7 +1873,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1884,7 +1884,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts|src/__tests__/geo-multi-env.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1895,7 +1895,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/graphql-v2/searchable-datastore.test.ts|src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1906,7 +1906,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_5.test.ts|src/__tests__/apigw.test.ts|src/__tests__/graphql-v2/api_lambda_auth_1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1917,7 +1917,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/api.key.migration2.test.ts|src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1928,7 +1928,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1939,7 +1939,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_1.test.ts|src/__tests__/layer-1.test.ts|src/__tests__/migration/api.key.migration4.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1950,7 +1950,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1961,7 +1961,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2c.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1972,7 +1972,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -2027,7 +2027,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -2038,7 +2038,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -2049,7 +2049,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -2060,7 +2060,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-connection-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -2071,7 +2071,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -2082,7 +2082,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2094,7 +2094,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-1 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2106,7 +2106,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -2117,7 +2117,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2128,7 +2128,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_api_key_migration_v8 @@ -2137,7 +2137,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_notifications_migration_v8 @@ -2146,7 +2146,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_api_key_migration_2_v8 @@ -2155,7 +2155,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_notifications_migration_2_v8 @@ -2164,7 +2164,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_function_migration_update_v8 @@ -2173,7 +2173,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/update_tests/function_migration_update.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_notifications_migration_3_v8 @@ -2182,124 +2182,16 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts - CLI_REGION: ap-southeast-2 - depend-on: - - upb - - identifier: l_scaffold_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/scaffold.test.ts - CLI_REGION: ap-southeast-1 - depend-on: - - upb - - identifier: l_api_graphql_v2_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts - CLI_REGION: eu-west-2 - depend-on: - - upb - - identifier: l_api_rest_basic_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts - CLI_REGION: ap-southeast-1 - depend-on: - - upb - - identifier: l_api_rest_lambda_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts - CLI_REGION: ap-southeast-1 - depend-on: - - upb - - identifier: l_api_rest_serverless_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts - CLI_REGION: eu-west-2 - depend-on: - - upb - - identifier: l_auth_add_all_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts CLI_REGION: ap-northeast-1 depend-on: - upb - - identifier: l_auth_override_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/auth-override.migration.test.ts - CLI_REGION: us-east-2 - depend-on: - - upb - - identifier: l_custom_stack_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/custom-stack.migration.test.ts - CLI_REGION: ap-southeast-1 - depend-on: - - upb - - identifier: l_geo_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/geo.migration.test.ts - CLI_REGION: eu-west-2 - depend-on: - - upb - - identifier: l_git_clone_migration_tests_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts - CLI_REGION: eu-central-1 - depend-on: - - upb - - identifier: l_pinpoint_region_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts - CLI_REGION: us-east-2 - depend-on: - - upb - - identifier: l_storage_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/storage.migration.test.ts - CLI_REGION: us-east-1 - depend-on: - - upb - identifier: l_auth_app_client_secret_migration_v12 buildspec: codebuild_specs/migration_tests_v12.yml env: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-app-client-secret-migration.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_hosted_ui_lambda_migration_v12 @@ -2308,7 +2200,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-hosted-ui-lambda-migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_lambda_callout_migration_rollback_v12 @@ -2317,7 +2209,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-lambda-callout-migration-rollback.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_auth_lambda_callout_migration_v12 @@ -2335,7 +2227,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-oauth-lambda-migration.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_migration_v12 @@ -2344,7 +2236,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth.migration.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: aggregate_e2e_reports diff --git a/codebuild_specs/migration_tests_v10.yml b/codebuild_specs/migration_tests_v10.yml deleted file mode 100644 index 692d8de64e2..00000000000 --- a/codebuild_specs/migration_tests_v10.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: 0.2 -env: - shell: bash - compute-type: BUILD_GENERAL1_SMALL - variables: - CI: true - CIRCLECI: true - IS_AMPLIFY_CI: true - # mock values to test artifact scanning - ENV_VAR_WITH_SECRETS: 'MOCK_ENV_VAR_FOR_SCANNING_SECRETS' - MOCK_ENV_VAR_FOR_SCANNING_SECRETS: 'abc123xyz' - - # mock values for credentials below - FACEBOOK_APP_ID: 'fbAppId' - FACEBOOK_APP_SECRET: 'fbAppSecret' - GOOGLE_APP_ID: 'gglAppID' - GOOGLE_APP_SECRET: 'gglAppSecret' - AMAZON_APP_ID: 'amaznAppID' - AMAZON_APP_SECRET: 'amaznAppID' - APPLE_APP_ID: 'com.fake.app' - APPLE_TEAM_ID: '2QLEWNDK6K' - APPLE_KEY_ID: '2QLZXKYJ8J' - # mock value, Cognito validates the private key, this is an invalidated key. - APPLE_PRIVATE_KEY_2: '----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY----' -phases: - build: - commands: - # you can provide a codebuild source version to use old cache and skip all other jobs :) - - export AMPLIFY_DIR=$CODEBUILD_SRC_DIR/out - - export AMPLIFY_PATH=$HOME/.amplify/bin/amplify - - echo $AMPLIFY_DIR - - echo $AMPLIFY_PATH - - source ./shared-scripts.sh && _runMigrationV10Test - post_build: - commands: - - source ./shared-scripts.sh && _scanArtifacts - - source ./shared-scripts.sh && _uploadReportsToS3 $CODEBUILD_SOURCE_VERSION $CODEBUILD_BATCH_BUILD_IDENTIFIER amplify-migration-tests -reports: - e2e-reports: - files: - - '*.xml' - file-format: 'JUNITXML' - base-directory: '$CODEBUILD_SRC_DIR/packages/amplify-migration-tests/reports/junit' -artifacts: - files: - - $CODEBUILD_SRC_DIR/packages/amplify-migration-tests/amplify-migration-reports/* diff --git a/codebuild_specs/wait_for_ids.json b/codebuild_specs/wait_for_ids.json index 49b114bd163..29e21d44b97 100644 --- a/codebuild_specs/wait_for_ids.json +++ b/codebuild_specs/wait_for_ids.json @@ -8,15 +8,11 @@ "l_api_6a_auth_7b_export_pull_b", "l_api_6b_api_1_layer_1", "l_api_7_export_pull_a_function_9a", - "l_api_graphql_v2_migration_v10", "l_api_key_migration1_schema_auth_14_api_3", "l_api_key_migration4_schema_iterative_update_4_function_1", "l_api_key_migration_2_v8", "l_api_key_migration_v8", "l_api_lambda_auth_1_api_key_migration2_schema_searchable", - "l_api_rest_basic_migration_v10", - "l_api_rest_lambda_migration_v10", - "l_api_rest_serverless_migration_v10", "l_auth_12_auth_2g_auth_2h", "l_auth_1a_auth_trigger_custom_policies_function", "l_auth_1b_delete_geo_add_c", @@ -32,7 +28,6 @@ "l_auth_6_function_2a_schema_connection_2", "l_auth_7a_auth_8c_feature_flags", "l_auth_9_custom_resources_env_5", - "l_auth_add_all_migration_v10", "l_auth_app_client_secret_migration_v12", "l_auth_hosted_ui_lambda_migration_v12", "l_auth_lambda_callout_migration_rollback_v12", @@ -40,13 +35,11 @@ "l_auth_migration_amplify_remove_api_2a", "l_auth_migration_v12", "l_auth_oauth_lambda_migration_v12", - "l_auth_override_migration_v10", "l_container_hosting_init_b_notifications_apns", "l_containers_api_1", "l_containers_api_2", "l_containers_api_secrets_storage_4_schema_auth_10", "l_custom_resource_with_storage_dynamodb_simulator_export_pull_c", - "l_custom_stack_migration_v10", "l_datastore_modelgen", "l_diagnose_hooks_a_mock_api", "l_env_1_geo_add_a_init_a", @@ -68,7 +61,6 @@ "l_geo_headless_api_key_migration5_schema_auth_1a", "l_geo_import_1a_geo_import_2_global_sandbox_b", "l_geo_import_1b_global_sandbox_a_init_e", - "l_geo_migration_v10", "l_geo_multi_env_searchable_datastore_resolvers", "l_geo_remove_1", "l_geo_remove_2", @@ -76,7 +68,6 @@ "l_geo_update_1", "l_geo_update_2", "l_git_clone_attach_init_c_layer_4", - "l_git_clone_migration_tests_v10", "l_help_hooks_c_init_force_push", "l_hooks_b_notifications_analytics_compatibility_sms_1_plugin", "l_hostingPROD", @@ -112,10 +103,8 @@ "l_notifications_multi_env_notifications_sms_update_opensearch_simulator", "l_notifications_sms_pull_pull_auth_10", "l_parameter_store_1_parameter_store_2_android_analytics_pinpoint_config", - "l_pinpoint_region_migration_v10", "l_predictions_schema_auth_11_b_schema_auth_1b", "l_push_smoketest_ios_smoketest", - "l_scaffold_v10", "l_schema_auth_11_a", "l_schema_auth_12_schema_auth_3_schema_function_2", "l_schema_auth_13_function_5_schema_iterative_update_1", @@ -141,7 +130,6 @@ "l_smoketest_amplify_app", "l_storage_1b_function_11_function_2b", "l_storage_5", - "l_storage_migration_v10", "l_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1", "l_uibuilder", "l_user_groups_js_frontend_config_build_function", diff --git a/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts b/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts deleted file mode 100644 index a50e993fbbe..00000000000 --- a/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as cdk from '@aws-cdk/core'; -import * as iam from '@aws-cdk/aws-iam'; -import * as sns from '@aws-cdk/aws-sns'; -import * as subs from '@aws-cdk/aws-sns-subscriptions'; -import * as sqs from '@aws-cdk/aws-sqs'; - -export class cdkStack extends cdk.Stack { - constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { - super(scope, id, props); - - /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ - new cdk.CfnParameter(this, 'env', { - type: 'String', - description: 'Current Amplify CLI env name', - }); - - /* AWS CDK Code goes here - Learn more: https://docs.aws.amazon.com/cdk/latest/guide/home.html */ - - /* Example 1: Set up an SQS queue with an SNS topic */ - - const queue = new sqs.Queue(this, 'sqs-queue'); - - // 👇 create sns topic - const topic = new sns.Topic(this, 'sns-topic'); - - // 👇 subscribe queue to topic - topic.addSubscription(new subs.SqsSubscription(queue)); - - new cdk.CfnOutput(this, 'snsTopicArn', { - value: topic.topicArn, - description: 'The arn of the SNS topic', - }); - - /* Example 2: Adding IAM role to the custom stack */ - const role = new iam.Role(this, 'CustomRole', { - assumedBy: new iam.AccountRootPrincipal(), - }); - - /*Example 3: Adding policy to the IAM role*/ - role.addToPolicy( - new iam.PolicyStatement({ - actions: ['*'], - resources: [topic.topicArn], - }), - ); - } -} diff --git a/packages/amplify-migration-tests/overrides/override-api-gql.v10.ts b/packages/amplify-migration-tests/overrides/override-api-gql.v10.ts deleted file mode 100644 index e0339976783..00000000000 --- a/packages/amplify-migration-tests/overrides/override-api-gql.v10.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function override(resource: Record): void { - resource.api['GraphQLAPI'].xrayEnabled = true; -} diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap deleted file mode 100644 index baac4d6c8bf..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api graphql v2 migration tests ...adds graphql with v2 transformer, adds overrides, and pulls in latest version 1`] = `""`; - -exports[`api graphql v2 migration tests ...adds graphql with v2 transformer, adds overrides, and pulls in latest version 2`] = `""`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap deleted file mode 100644 index 1477cf09a52..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap +++ /dev/null @@ -1,10 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api REST migration tests ...adds rest APIs & DDB with v10 and pulls without drift in latest version 1`] = `""`; - -exports[`api REST migration tests ...adds rest APIs & DDB with v10 and pulls without drift in latest version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap deleted file mode 100644 index 205a956d68f..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap +++ /dev/null @@ -1,75 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api lambda migration tests ...adds lambda with multiple rest APIs with v10 and pulls without drift in latest version 1`] = ` -"IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -" -`; - -exports[`api lambda migration tests ...adds lambda with multiple rest APIs with v10 and pulls without drift in latest version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {"Value":{"Fn::GetAtt":["LambdaExecutionRole","Arn"]}} - -Outputs -[+] Output LambdaExecutionRoleArn: {"Value":{"Fn::GetAtt":["LambdaExecutionRole","Arn"]}} - -IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap deleted file mode 100644 index 705b84ce000..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap +++ /dev/null @@ -1,10 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api serverless migration tests ...adds serverless REST api with v10 and pulls without drift in latest version 1`] = `""`; - -exports[`api serverless migration tests ...adds serverless REST api with v10 and pulls without drift in latest version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap deleted file mode 100644 index 22da7b827b5..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap +++ /dev/null @@ -1,511 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`amplify migration test auth ...should add auth with max options and work on the latest version 1`] = ` -"IAM Statement Changes -┌───┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬──────────────────────┬────────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼──────────────────────┼────────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${AWS::Region}:\${AWS::AccountId}:log-group:/aws/lambda/\${lambdaName}:log-stream:*",{"lambdaName":"\${RoleMapFunction}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${LambdaExecutionRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴──────────────────────┴────────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Resources -[-] AWS::IAM::Role LambdaExecutionRole destroy -[-] AWS::Lambda::Function RoleMapFunction destroy -[-] AWS::IAM::Policy LambdaCloudWatchPolicy destroy -[-] Custom::LambdaCallout RoleMapFunctionInput destroy - -IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:UpdateUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${OAuthCustomResource}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Parameters -[-] Parameter facebookAppId: {"Type":"String"} -[-] Parameter googleClientId: {"Type":"String"} -[-] Parameter amazonAppId: {"Type":"String"} -[-] Parameter appleAppId: {"Type":"String"} -[~] Parameter hostedUIProviderCreds: {"Type":"String"} to {"Type":"String","NoEcho":true} - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[-] AWS::Lambda::Function OAuthCustomResource destroy -[-] AWS::IAM::Policy OAuthCustomResourcePolicy destroy -[-] AWS::IAM::Policy OAuthCustomResourceLogPolicy destroy -[-] Custom::LambdaCallout OAuthCustomResourceInputs destroy -[~] AWS::Cognito::UserPoolClient UserPoolClientWeb - ├─ [+] AllowedOAuthFlows - │ └─ ["code"] - ├─ [+] AllowedOAuthFlowsUserPoolClient - │ └─ true - ├─ [+] AllowedOAuthScopes - │ └─ ["phone","email","openid","profile","aws.cognito.signin.user.admin"] - ├─ [+] CallbackURLs - │ └─ ["https://signin1/"] - ├─ [+] LogoutURLs - │ └─ ["https://signout1/"] - ├─ [+] SupportedIdentityProviders - │ └─ ["Facebook","Google","LoginWithAmazon","SignInWithApple","COGNITO"] - └─ [~] DependsOn - └─ @@ -1,3 +1,4 @@ - [ ] [ - [+] "HostedUIProvidersCustomResourceInputs", - [ ] "UserPool" - [ ] ] -[~] AWS::Cognito::UserPoolClient UserPoolClient - ├─ [+] AllowedOAuthFlows - │ └─ ["code"] - ├─ [+] AllowedOAuthFlowsUserPoolClient - │ └─ true - ├─ [+] AllowedOAuthScopes - │ └─ ["phone","email","openid","profile","aws.cognito.signin.user.admin"] - ├─ [+] CallbackURLs - │ └─ ["https://signin1/"] - ├─ [+] LogoutURLs - │ └─ ["https://signout1/"] - ├─ [+] SupportedIdentityProviders - │ └─ ["Facebook","Google","LoginWithAmazon","SignInWithApple","COGNITO"] - └─ [~] DependsOn - └─ @@ -1,3 +1,4 @@ - [ ] [ - [+] "HostedUIProvidersCustomResourceInputs", - [ ] "UserPool" - [ ] ] -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Lambda::Function HostedUICustomResource - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - const userPoolId = event.ResourceProperties.userPoolId; - const inputDomainName = event.ResourceProperties.hostedUIDomainName; - let deleteUserPoolDomain = domainName => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.deleteUserPoolDomain(params).promise(); - }; - if (event.RequestType == 'Delete') { - deleteUserPoolDomain(inputDomainName) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let checkDomainAvailability = domainName => { - let params = { Domain: domainName }; - return identity - .describeUserPoolDomain(params) - .promise() - .then(res => { - if (res.DomainDescription && res.DomainDescription.UserPool) { - return false; - } - return true; - }) - .catch(err => { - return false; - }); - }; - let createUserPoolDomain = domainName => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.createUserPoolDomain(params).promise(); - }; - identity - .describeUserPool({ UserPoolId: userPoolId }) - .promise() - .then(result => { - if (inputDomainName) { - if (result.UserPool.Domain === inputDomainName) { - return; - } else { - if (!result.UserPool.Domain) { - return checkDomainAvailability(inputDomainName).then(isDomainAvailable => { - if (isDomainAvailable) { - return createUserPoolDomain(inputDomainName); - } else { - throw new Error('Domain not available'); - } - }); - } else { - return checkDomainAvailability(inputDomainName).then(isDomainAvailable => { - if (isDomainAvailable) { - return deleteUserPoolDomain(result.UserPool.Domain).then(() => createUserPoolDomain(inputDomainName)); - } else { - throw new Error('Domain not available'); - } - }); - } - } - } else { - if (result.UserPool.Domain) { - return deleteUserPoolDomain(result.UserPool.Domain); - } - } - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const { - CognitoIdentityProviderClient, - CreateUserPoolDomainCommand, - DeleteUserPoolDomainCommand, - DescribeUserPoolCommand, - DescribeUserPoolDomainCommand, -} = require('@aws-sdk/client-cognito-identity-provider'); -const identity = new CognitoIdentityProviderClient({}); - -exports.handler = (event, context) => { - // Don't return promise, response.send() marks context as done internally - void tryHandleEvent(event, context); -}; - -async function tryHandleEvent(event, context) { - try { - await handleEvent(event); - response.send(event, context, response.SUCCESS, {}); - } catch (err) { - console.log(err); - response.send(event, context, response.FAILED, { err }); - } -} - -async function handleEvent(event) { - const userPoolId = event.ResourceProperties.userPoolId; - const inputDomainName = event.ResourceProperties.hostedUIDomainName; - if (event.RequestType === 'Delete') { - await deleteUserPoolDomain(inputDomainName, userPoolId); - } else if (event.RequestType === 'Update' || event.RequestType === 'Create') { - await createOrUpdateDomain(inputDomainName, userPoolId); - } -} - -async function checkDomainAvailability(domainName) { - const params = { Domain: domainName }; - try { - const res = await identity.send(new DescribeUserPoolDomainCommand(params)); - return !(res.DomainDescription && res.DomainDescription.UserPoolId); - } catch (err) { - return false; - } -} - -async function deleteUserPoolDomain(domainName, userPoolId) { - const params = { Domain: domainName, UserPoolId: userPoolId }; - await identity.send(new DeleteUserPoolDomainCommand(params)); -} - -async function createUserPoolDomain(domainName, userPoolId) { - const params = { - Domain: domainName, - UserPoolId: userPoolId, - }; - await identity.send(new CreateUserPoolDomainCommand(params)); -} - -async function createOrUpdateDomain(inputDomainName, userPoolId) { - const result = await identity.send(new DescribeUserPoolCommand({ UserPoolId: userPoolId })); - if (result.UserPool.Domain === inputDomainName) { - // if existing domain is same as input domain do nothing. - return; - } - if (inputDomainName) { - // create new or replace existing domain. - const isDomainAvailable = await checkDomainAvailability(inputDomainName); - if (isDomainAvailable) { - if (result.UserPool.Domain) { - await deleteUserPoolDomain(result.UserPool.Domain, userPoolId); - } - await createUserPoolDomain(inputDomainName, userPoolId); - } else { - throw new Error('Domain not available'); - } - } else if (result.UserPool.Domain) { - // if input domain is undefined delete existing domain if exists. - await deleteUserPoolDomain(result.UserPool.Domain, userPoolId); - } -} - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs18.x -[~] AWS::Lambda::Function HostedUIProvidersCustomResource - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); - if (hostedUIProviderCreds.length === 0) { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let getRequestParams = providerName => { - let providerMetaIndex = hostedUIProviderMeta.findIndex(provider => provider.ProviderName === providerName); - let providerMeta = hostedUIProviderMeta[providerMetaIndex]; - let providerCredsIndex = hostedUIProviderCreds.findIndex(provider => provider.ProviderName === providerName); - let providerCreds = hostedUIProviderCreds[providerCredsIndex]; - let requestParams = { - ProviderName: providerMeta.ProviderName, - UserPoolId: userPoolId, - AttributeMapping: providerMeta.AttributeMapping, - }; - if (providerMeta.ProviderName === 'SignInWithApple') { - if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - team_id: providerCreds.team_id, - key_id: providerCreds.key_id, - private_key: providerCreds.private_key, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } else { - if (providerCreds.client_id && providerCreds.client_secret) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - client_secret: providerCreds.client_secret, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } - return requestParams; - }; - let createIdentityProvider = providerName => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - requestParams.ProviderType = requestParams.ProviderName; - return identity.createIdentityProvider(requestParams).promise(); - }; - let updateIdentityProvider = providerName => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - return identity.updateIdentityProvider(requestParams).promise(); - }; - let deleteIdentityProvider = providerName => { - let params = { ProviderName: providerName, UserPoolId: userPoolId }; - return identity.deleteIdentityProvider(params).promise(); - }; - let providerPromises = []; - identity - .listIdentityProviders({ UserPoolId: userPoolId, MaxResults: 60 }) - .promise() - .then(result => { - console.log(result); - let providerList = result.Providers.map(provider => provider.ProviderName); - let providerListInParameters = hostedUIProviderMeta.map(provider => provider.ProviderName); - hostedUIProviderMeta.forEach(providerMetadata => { - if (providerList.indexOf(providerMetadata.ProviderName) > -1) { - providerPromises.push(updateIdentityProvider(providerMetadata.ProviderName)); - } else { - providerPromises.push(createIdentityProvider(providerMetadata.ProviderName)); - } - }); - providerList.forEach(provider => { - if (providerListInParameters.indexOf(provider) < 0) { - providerPromises.push(deleteIdentityProvider(provider)); - } - }); - return Promise.all(providerPromises); - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const { - CognitoIdentityProviderClient, - CreateIdentityProviderCommand, - DeleteIdentityProviderCommand, - ListIdentityProvidersCommand, - UpdateIdentityProviderCommand, -} = require('@aws-sdk/client-cognito-identity-provider'); -const identity = new CognitoIdentityProviderClient({}); - -exports.handler = (event, context) => { - // Don't return promise, response.send() marks context as done internally - void tryHandleEvent(event, context); -}; - -async function tryHandleEvent(event, context) { - try { - await handleEvent(event); - response.send(event, context, response.SUCCESS, {}); - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -} - -async function handleEvent(event) { - const userPoolId = event.ResourceProperties.userPoolId; - const hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - const hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); - const hasHostedUIProviderCreds = hostedUIProviderCreds.length && hostedUIProviderCreds.length > 0; - if (hasHostedUIProviderCreds && (event.RequestType === 'Update' || event.RequestType === 'Create')) { - const listIdentityProvidersResponse = await identity.send( - new ListIdentityProvidersCommand({ - UserPoolId: userPoolId, - MaxResults: 60, - }), - ); - console.log(listIdentityProvidersResponse); - const providerList = listIdentityProvidersResponse.Providers.map((provider) => provider.ProviderName); - const providerListInParameters = hostedUIProviderMeta.map((provider) => provider.ProviderName); - for (const providerMetadata of hostedUIProviderMeta) { - if (providerList.indexOf(providerMetadata.ProviderName) > -1) { - await updateIdentityProvider(providerMetadata.ProviderName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); - } else { - await createIdentityProvider(providerMetadata.ProviderName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); - } - } - for (const provider of providerList) { - if (providerListInParameters.indexOf(provider) < 0) { - await deleteIdentityProvider(provider, userPoolId); - } - } - } -} - -function getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { - const providerMeta = hostedUIProviderMeta.find((provider) => provider.ProviderName === providerName); - const providerCreds = hostedUIProviderCreds.find((provider) => provider.ProviderName === providerName); - let requestParams = { - ProviderName: providerMeta.ProviderName, - UserPoolId: userPoolId, - AttributeMapping: providerMeta.AttributeMapping, - }; - if (providerMeta.ProviderName === 'SignInWithApple') { - if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - team_id: providerCreds.team_id, - key_id: providerCreds.key_id, - private_key: providerCreds.private_key, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } else { - if (providerCreds.client_id && providerCreds.client_secret) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - client_secret: providerCreds.client_secret, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } - return requestParams; -} - -async function createIdentityProvider(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { - const requestParams = getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); - if (!requestParams) { - return; - } - requestParams.ProviderType = requestParams.ProviderName; - await identity.send(new CreateIdentityProviderCommand(requestParams)); -} - -async function updateIdentityProvider(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { - const requestParams = getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); - if (!requestParams) { - return; - } - await identity.send(new UpdateIdentityProviderCommand(requestParams)); -} - -async function deleteIdentityProvider(providerName, userPoolId) { - const params = { ProviderName: providerName, UserPoolId: userPoolId }; - await identity.send(new DeleteIdentityProviderCommand(params)); -} - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs18.x -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] -[~] AWS::Cognito::IdentityPoolRoleAttachment IdentityPoolRoleMap - ├─ [+] RoleMappings - │ └─ {"UserPoolClientRoleMapping":{"AmbiguousRoleResolution":"AuthenticatedRole","IdentityProvider":{"Fn::Sub":["cognito-idp.\${region}.amazonaws.com/\${userPool}:\${client}",{"region":{"Ref":"AWS::Region"},"userPool":{"Ref":"UserPool"},"client":{"Ref":"UserPoolClient"}}]},"Type":"Token"},"UserPoolWebClientRoleMapping":{"AmbiguousRoleResolution":"AuthenticatedRole","IdentityProvider":{"Fn::Sub":["cognito-idp.\${region}.amazonaws.com/\${userPool}:\${webClient}",{"region":{"Ref":"AWS::Region"},"userPool":{"Ref":"UserPool"},"webClient":{"Ref":"UserPoolClientWeb"}}]},"Type":"Token"}} - └─ [~] DependsOn - └─ @@ -1,3 +1,5 @@ - [ ] [ - [-] "IdentityPool" - [+] "IdentityPool", - [+] "UserPoolClient", - [+] "UserPoolClientWeb" - [ ] ] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} -[-] Output GoogleWebClient: {"Value":{"Ref":"googleClientId"}} -[-] Output FacebookWebClient: {"Value":{"Ref":"facebookAppId"}} -[-] Output AmazonWebClient: {"Value":{"Ref":"amazonAppId"}} -[-] Output AppleWebClient: {"Value":{"Ref":"appleAppId"}} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap deleted file mode 100644 index ec27d0c04bb..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap +++ /dev/null @@ -1,69 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`amplify migration test auth ...should add auth with overrides and work fine on latest version 1`] = ` -"IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -" -`; - -exports[`amplify migration test auth ...should add auth with overrides and work fine on latest version 2`] = ` -"IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap deleted file mode 100644 index 8ca6b1208de..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`adding custom resources migration test add/update CDK and CFN custom resources 1`] = `""`; - -exports[`adding custom resources migration test add/update CDK and CFN custom resources 2`] = `""`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap deleted file mode 100644 index e19308d9b0e..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap +++ /dev/null @@ -1,123 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`geo category migration from v10 to latest ...pull and push should not drift with new amplify version 1`] = ` -"IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] -[~] AWS::Cognito::IdentityPoolRoleAttachment IdentityPoolRoleMap - ├─ [+] RoleMappings - │ └─ {"UserPoolClientRoleMapping":{"AmbiguousRoleResolution":"AuthenticatedRole","IdentityProvider":{"Fn::Sub":["cognito-idp.\${region}.amazonaws.com/\${userPool}:\${client}",{"region":{"Ref":"AWS::Region"},"userPool":{"Ref":"UserPool"},"client":{"Ref":"UserPoolClient"}}]},"Type":"Token"},"UserPoolWebClientRoleMapping":{"AmbiguousRoleResolution":"AuthenticatedRole","IdentityProvider":{"Fn::Sub":["cognito-idp.\${region}.amazonaws.com/\${userPool}:\${webClient}",{"region":{"Ref":"AWS::Region"},"userPool":{"Ref":"UserPool"},"webClient":{"Ref":"UserPoolClientWeb"}}]},"Type":"Token"}} - └─ [~] DependsOn - └─ @@ -1,3 +1,5 @@ - [ ] [ - [-] "IdentityPool" - [+] "IdentityPool", - [+] "UserPoolClient", - [+] "UserPoolClientWeb" - [ ] ] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -IAM Statement Changes -┌───┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬──────────────────────┬────────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼──────────────────────┼────────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${AWS::Region}:\${AWS::AccountId}:log-group:/aws/lambda/\${lambdaName}:log-stream:*",{"lambdaName":"\${RoleMapFunction}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${LambdaExecutionRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴──────────────────────┴────────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Resources -[-] AWS::IAM::Role LambdaExecutionRole destroy -[-] AWS::Lambda::Function RoleMapFunction destroy -[-] AWS::IAM::Policy LambdaCloudWatchPolicy destroy -[-] Custom::LambdaCallout RoleMapFunctionInput destroy - -" -`; - -exports[`geo category migration from v10 to latest ...pull and push should not drift with new amplify version 2`] = ` -"IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] -[~] AWS::Cognito::IdentityPoolRoleAttachment IdentityPoolRoleMap - ├─ [+] RoleMappings - │ └─ {"UserPoolClientRoleMapping":{"AmbiguousRoleResolution":"AuthenticatedRole","IdentityProvider":{"Fn::Sub":["cognito-idp.\${region}.amazonaws.com/\${userPool}:\${client}",{"region":{"Ref":"AWS::Region"},"userPool":{"Ref":"UserPool"},"client":{"Ref":"UserPoolClient"}}]},"Type":"Token"},"UserPoolWebClientRoleMapping":{"AmbiguousRoleResolution":"AuthenticatedRole","IdentityProvider":{"Fn::Sub":["cognito-idp.\${region}.amazonaws.com/\${userPool}:\${webClient}",{"region":{"Ref":"AWS::Region"},"userPool":{"Ref":"UserPool"},"webClient":{"Ref":"UserPoolClientWeb"}}]},"Type":"Token"}} - └─ [~] DependsOn - └─ @@ -1,3 +1,5 @@ - [ ] [ - [-] "IdentityPool" - [+] "IdentityPool", - [+] "UserPoolClient", - [+] "UserPoolClientWeb" - [ ] ] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -IAM Statement Changes -┌───┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬──────────────────────┬────────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼──────────────────────┼────────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${AWS::Region}:\${AWS::AccountId}:log-group:/aws/lambda/\${lambdaName}:log-stream:*",{"lambdaName":"\${RoleMapFunction}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${LambdaExecutionRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴──────────────────────┴────────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Resources -[-] AWS::IAM::Role LambdaExecutionRole destroy -[-] AWS::Lambda::Function RoleMapFunction destroy -[-] AWS::IAM::Policy LambdaCloudWatchPolicy destroy -[-] Custom::LambdaCallout RoleMapFunctionInput destroy - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap deleted file mode 100644 index 4827afa879d..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap +++ /dev/null @@ -1,72 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`storage category migration from v10 to latest ...pull and push should not drift with new amplify version 1`] = ` -"IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -" -`; - -exports[`storage category migration from v10 to latest ...pull and push should not drift with new amplify version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {"Value":{"Fn::GetAtt":["LambdaExecutionRole","Arn"]}} - -IAM Statement Changes -┌───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────┬────────────────────────────────────┬───────────────────────────┬───────────┐ -│ │ Resource │ Effect │ Action │ Principal │ Condition │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ \${UserPool.Arn} │ Allow │ cognito-idp:DescribeUserPoolClient │ AWS:\${UserPoolClientRole} │ │ -├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┼────────────────────────────────────┼───────────────────────────┼───────────┤ -│ - │ {"Fn::Sub":["arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*",{"region":"\${AWS::Region}","account":"\${AWS::AccountId}","lambda":"\${UserPoolClientLambda}"}]} │ Allow │ logs:CreateLogGroup │ AWS:\${UserPoolClientRole} │ │ -│ │ │ │ logs:CreateLogStream │ │ │ -│ │ │ │ logs:PutLogEvents │ │ │ -└───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┴────────────────────────────────────┴───────────────────────────┴───────────┘ -(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299) - -Conditions -[-] Condition ShouldOutputAppClientSecrets: {"Fn::Equals":[{"Ref":"userpoolClientGenerateSecret"},true]} - -Resources -[-] AWS::Lambda::Function UserPoolClientLambda destroy -[-] AWS::IAM::Policy UserPoolClientLambdaPolicy destroy -[-] AWS::IAM::Policy UserPoolClientLogPolicy destroy -[-] Custom::LambdaCallout UserPoolClientInputs destroy -[~] AWS::IAM::Role UserPoolClientRole - └─ [-] DependsOn - └─ ["UserPoolClient"] -[~] AWS::Cognito::IdentityPool IdentityPool - └─ [-] DependsOn - └─ ["UserPoolClientInputs"] - -Outputs -[-] Output AppClientSecret: {"Value":{"Fn::GetAtt":["UserPoolClientInputs","appSecret"]},"Condition":"ShouldOutputAppClientSecrets"} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts deleted file mode 100644 index 27ad5d190c2..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - addApiWithoutSchema, - amplifyOverrideApi, - amplifyPull, - amplifyPushLegacy, - amplifyPushAuth, - amplifyPushOverride, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getAppSyncApi, - getProjectMeta, - updateApiSchema, -} from '@aws-amplify/amplify-e2e-core'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; -import * as fs from 'fs-extra'; -import path from 'path'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; - -describe('api graphql v2 migration tests', () => { - let projRoot: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - // inspired by api_7.test.ts - it('...adds graphql with v2 transformer, adds overrides, and pulls in latest version', async () => { - const projectName = 'gqmigration'; - projRoot = await createNewProjectDir(projectName); - - await initJSProjectWithProfileV10(projRoot, { name: projectName, disableAmplifyAppCreation: false }); - await addApiWithoutSchema(projRoot); - await updateApiSchema(projRoot, projectName, 'simple_model.graphql'); - await amplifyPushLegacy(projRoot); - - const meta = getProjectMeta(projRoot); - const region = meta.providers.awscloudformation.Region; - // eslint-disable-next-line spellcheck/spell-checker - const { output } = meta.api.gqmigration; - const { GraphQLAPIIdOutput } = output; - - // add overrides - await amplifyOverrideApi(projRoot); - const srcOverrideFilePath = path.join(__dirname, '..', '..', '..', 'overrides', 'override-api-gql.v10.ts'); - const destOverrideFilePath = path.join(projRoot, 'amplify', 'backend', 'api', `${projectName}`, 'override.ts'); - fs.copyFileSync(srcOverrideFilePath, destOverrideFilePath); - await amplifyPushOverride(projRoot); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // check overridden config in cloud after pushing with vLatest - const overriddenAppsyncApiOverride = await getAppSyncApi(GraphQLAPIIdOutput, region); - expect(overriddenAppsyncApiOverride.graphqlApi).toBeDefined(); - expect(overriddenAppsyncApiOverride.graphqlApi.apiId).toEqual(GraphQLAPIIdOutput); - // eslint-disable-next-line spellcheck/spell-checker - expect(overriddenAppsyncApiOverride.graphqlApi.xrayEnabled).toEqual(true); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts deleted file mode 100644 index 0a0627e6909..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - addSimpleDDB, - amplifyPull, - amplifyPushAuth, - amplifyPushUpdateLegacy, - createNewProjectDir, - deleteProject, - deleteProjectDir, - generateRandomShortId, - getAppId, - getProjectMeta, - validateRestApiMeta, -} from '@aws-amplify/amplify-e2e-core'; -import { addRestApiOldDx } from '../../migration-helpers'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('api REST migration tests', () => { - let projRoot: string; - let projectName: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('...adds rest APIs & DDB with v10 and pulls without drift in latest version', async () => { - projectName = 'restDDB'; - projRoot = await createNewProjectDir(projectName); - - const randomId = await generateRandomShortId(); - const DDB_NAME = `ddb${randomId}`; - await initJSProjectWithProfileV10(projRoot, { name: 'restApiTest', disableAmplifyAppCreation: false }); - await addSimpleDDB(projRoot, { name: DDB_NAME }); - await addRestApiOldDx(projRoot, { isCrud: true, projectContainsFunctions: false }); - await amplifyPushUpdateLegacy(projRoot); - - const meta = getProjectMeta(projRoot); - await validateRestApiMeta(projRoot, meta); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // validate metadata - const meta2 = getProjectMeta(projRoot2); - await validateRestApiMeta(projRoot2, meta2); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts deleted file mode 100644 index d8a182903c8..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { - addRestApi, - amplifyPull, - amplifyPushAuth, - amplifyPushUpdateLegacy, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, - listAttachedRolePolicies, - listRolePolicies, - updateAuthAddAdminQueries, - validateRestApiMeta, -} from '@aws-amplify/amplify-e2e-core'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; -import { addFunctionPreV12 } from '../../migration-helpers/lambda-function'; - -describe('api lambda migration tests', () => { - let projRoot: string; - let projectName: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('...adds lambda with multiple rest APIs with v10 and pulls without drift in latest version', async () => { - projectName = 'restAdvanced'; - projRoot = await createNewProjectDir(projectName); - - await initJSProjectWithProfileV10(projRoot, { name: 'restApiTest', disableAmplifyAppCreation: false }); - await addFunctionPreV12(projRoot, { functionTemplate: 'Hello World' }, 'nodejs'); - await addRestApi(projRoot, { - existingLambda: true, - restrictAccess: true, - allowGuestUsers: true, - }); - await addRestApi(projRoot, { - isFirstRestApi: false, - existingLambda: true, - restrictAccess: true, - allowGuestUsers: true, - }); - await addRestApi(projRoot, { - isFirstRestApi: false, - existingLambda: true, - restrictAccess: true, - allowGuestUsers: false, - }); - - // add more paths to and test policy slicing - for (let i = 0; i < 15; i++) { - await addRestApi(projRoot, { - path: `/items${i}`, - isFirstRestApi: false, - existingLambda: true, - restrictAccess: true, - allowGuestUsers: true, - }); - } - await addRestApi(projRoot, { isFirstRestApi: false, existingLambda: true }); - await updateAuthAddAdminQueries(projRoot, undefined, {}); - await amplifyPushUpdateLegacy(projRoot); - - // make sure current project meta is valid - const meta = getProjectMeta(projRoot); - await validateRestApiMeta(projRoot, meta); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // validate metadata for pulled down project - const meta2 = getProjectMeta(projRoot2); - await validateRestApiMeta(projRoot2, meta2); - - // validate role policies - const cfnMeta = meta2.providers.awscloudformation; - const { AuthRoleName, UnauthRoleName, Region } = cfnMeta; - - // there should be no inline policies attached to the roles - expect(await listRolePolicies(AuthRoleName, Region)).toEqual([]); - expect(await listRolePolicies(UnauthRoleName, Region)).toEqual([]); - - // there should be some managed policies attached to the roles - const authPolicies = await listAttachedRolePolicies(AuthRoleName, Region); - expect(authPolicies.length).toBeGreaterThan(0); - for (const { PolicyName } of authPolicies) { - expect(PolicyName).toMatch(/PolicyAPIGWAuth\d/); - } - const unauthPolicies = await listAttachedRolePolicies(UnauthRoleName, Region); - expect(unauthPolicies.length).toBeGreaterThan(0); - for (const { PolicyName } of unauthPolicies) { - expect(PolicyName).toMatch(/PolicyAPIGWUnauth\d/); - } - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts deleted file mode 100644 index a8c3ee23c43..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { - amplifyPull, - amplifyPushAuth, - amplifyPushUpdateLegacy, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, - validateRestApiMeta, -} from '@aws-amplify/amplify-e2e-core'; -import { addRestApiOldDx } from '../../migration-helpers'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('api serverless migration tests', () => { - let projRoot: string; - let projectName: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('...adds serverless REST api with v10 and pulls without drift in latest version', async () => { - projectName = 'restDDB'; - projRoot = await createNewProjectDir(projectName); - - await initJSProjectWithProfileV10(projRoot, { name: 'restApiTest', disableAmplifyAppCreation: false }); - await addRestApiOldDx(projRoot, { isCrud: false }); - await amplifyPushUpdateLegacy(projRoot); - - const meta = getProjectMeta(projRoot); - await validateRestApiMeta(projRoot, meta); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // validate metadata - const meta2 = getProjectMeta(projRoot2); - await validateRestApiMeta(projRoot2, meta2); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts deleted file mode 100644 index 2d2016d1ad6..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { - addAuthWithMaxOptions, - amplifyPull, - amplifyPushAuthV10, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('amplify migration test auth', () => { - let projRoot1: string; - - beforeAll(async () => { - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - console.log(`Test migration from: ${migrateFromVersion.v} to ${migrateToVersion.v}`); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - }); - - beforeEach(async () => { - projRoot1 = await createNewProjectDir('authMigration1'); - }); - - afterEach(async () => { - // note - this deletes the original project using the latest codebase - await deleteProject(projRoot1, null, true); - deleteProjectDir(projRoot1); - }); - - it('...should add auth with max options and work on the latest version', async () => { - await initJSProjectWithProfileV10(projRoot1, { name: 'authTest', disableAmplifyAppCreation: false }); - - await addAuthWithMaxOptions(projRoot1, {}); - await amplifyPushAuthV10(projRoot1); - - const appId = getAppId(projRoot1); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir('authMigration2'); - - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // The following checks can be re-enabled once we find a way to configure the social logic provider values - // on a newly pulled down project. Currently, those parameters don't get pulled down. - - // await amplifyPushWithoutCodegen(projRoot2, true); - // assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - // expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // // should be able to remove & add auth after pulling down an older project - // await removeAuthWithDefault(projRoot2, true); - // await addAuthWithDefault(projRoot2, {}, true); - // await amplifyPushAuth(projRoot2, true); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts deleted file mode 100644 index d14ee049af5..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { - addAuthWithDefault, - amplifyOverrideAuth, - amplifyPull, - amplifyPushOverride, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, - getUserPool, - replaceOverrideFileWithProjectInfo, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; -import * as path from 'path'; - -describe('amplify migration test auth', () => { - let projRoot1: string; - - beforeAll(async () => { - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - console.log(`Test migration from: ${migrateFromVersion.v} to ${migrateToVersion.v}`); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - }); - - beforeEach(async () => { - projRoot1 = await createNewProjectDir('authMigration1'); - }); - - afterEach(async () => { - // note - this deletes the original project using the latest codebase - await deleteProject(projRoot1, null, true); - deleteProjectDir(projRoot1); - }); - - it('...should add auth with overrides and work fine on latest version', async () => { - const projectName = 'authTest'; - await initJSProjectWithProfileV10(projRoot1, { name: projectName, disableAmplifyAppCreation: false }); - - await addAuthWithDefault(projRoot1); - await amplifyPushWithoutCodegen(projRoot1); - - const meta = getProjectMeta(projRoot1); - const authResourceName = Object.keys(meta.auth).filter((key) => meta.auth[key].service === 'Cognito'); - const userPoolId = Object.keys(meta.auth).map((key) => meta.auth[key])[0].output.UserPoolId; - - // override new env - await amplifyOverrideAuth(projRoot1); - // this is where we will write our override logic to - const destOverrideFilePath = path.join(projRoot1, 'amplify', 'backend', 'auth', `${authResourceName}`, 'override.ts'); - const srcOverrideFilePath = path.join(__dirname, '..', '..', '..', 'overrides', 'override-auth.ts'); - replaceOverrideFileWithProjectInfo(srcOverrideFilePath, destOverrideFilePath, 'integtest', projectName); - await amplifyPushOverride(projRoot1); - - const appId = getAppId(projRoot1); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir('authMigration2'); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2)).toMatchSnapshot(); - await amplifyPushWithoutCodegen(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2)).toMatchSnapshot(); - - // check overwritten config - const overwrittenUserPool = await getUserPool(userPoolId, meta.providers.awscloudformation.Region); - expect(overwrittenUserPool.UserPool).toBeDefined(); - expect(overwrittenUserPool.UserPool.DeviceConfiguration.ChallengeRequiredOnNewDevice).toBe(true); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts deleted file mode 100644 index 1bf3d3166c4..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; -import { - addCDKCustomResource, - addCFNCustomResource, - amplifyPull, - amplifyPushAuth, - amplifyPushAuthV10, - buildCustomResources, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, -} from '@aws-amplify/amplify-e2e-core'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { v4 as uuid } from 'uuid'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('adding custom resources migration test', () => { - let projRoot: string; - beforeEach(async () => { - projRoot = await createNewProjectDir('custom-resources'); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('add/update CDK and CFN custom resources', async () => { - const cdkResourceName = `custom${uuid().split('-')[0]}`; - const cfnResourceName = `custom${uuid().split('-')[0]}`; - const cfnResourceNameWithV10 = `custom${uuid().split('-')[0]}`; - - await initJSProjectWithProfileV10(projRoot, { name: 'customMigration', disableAmplifyAppCreation: false }); - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - - await addCDKCustomResource(projRoot, { name: cdkResourceName }); - await addCFNCustomResource(projRoot, { name: cfnResourceNameWithV10, promptForCategorySelection: true }); - const srcCFNCustomResourceFilePath = path.join(__dirname, '..', '..', '..', 'custom-resources', 'custom-cfn-stack.json'); - // adding a resource to custom cfn stack - const destCFNCustomResourceFilePath = path.join( - projRoot, - 'amplify', - 'backend', - 'custom', - cfnResourceNameWithV10, - `${cfnResourceNameWithV10}-cloudformation-template.json`, - ); - fs.copyFileSync(srcCFNCustomResourceFilePath, destCFNCustomResourceFilePath); - - // this is where we will write our custom cdk stack logic to - const destCustomResourceFilePath = path.join(projRoot, 'amplify', 'backend', 'custom', cdkResourceName, 'cdk-stack.ts'); - const cfnFilePath = path.join( - projRoot, - 'amplify', - 'backend', - 'custom', - cdkResourceName, - 'build', - `${cdkResourceName}-cloudformation-template.json`, - ); - const srcCustomResourceFilePath = path.join(__dirname, '..', '..', '..', 'custom-resources', 'custom-cdk-stack-v10.ts'); - fs.copyFileSync(srcCustomResourceFilePath, destCustomResourceFilePath); - await buildCustomResources(projRoot); - await amplifyPushAuthV10(projRoot); - - // check if cfn file is generated in the build dir - expect(fs.existsSync(cfnFilePath)).toEqual(true); - const buildCFNFileJSON: any = JSONUtilities.readJson(cfnFilePath); - // Basic sanity generated CFN file content check - expect(buildCFNFileJSON?.Parameters).toEqual({ - env: { Type: 'String', Description: 'Current Amplify CLI env name' }, - }); - expect(Object.keys(buildCFNFileJSON?.Outputs)).toEqual(['snsTopicArn']); - const meta = getProjectMeta(projRoot); - const { snsTopicArn: customResourceSNSArn } = Object.keys(meta.custom).map((key) => meta.custom[key])[0].output; - expect(customResourceSNSArn).toBeDefined(); - - // using latest code, pull down the project - const projRoot2 = await createNewProjectDir('customMigration2'); - const usingLatestCode = true; - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, usingLatestCode); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, usingLatestCode); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2)).toMatchSnapshot(); - - // building custom resources succeeds against a v10 cdk stack, even when using vLatest to build - await expect(buildCustomResources(projRoot2, usingLatestCode)).resolves.not.toThrow(); - - // migrate overrides to use vLatest - const srcVLatestCustomResourceFilePath = path.join(__dirname, '..', '..', '..', 'custom-resources', 'custom-cdk-stack-vLatest.ts'); - const destVLatestCustomResourceFilePath = path.join(projRoot2, 'amplify', 'backend', 'custom', cdkResourceName, 'cdk-stack.ts'); - fs.copyFileSync(srcVLatestCustomResourceFilePath, destVLatestCustomResourceFilePath); - - // this should fail because customer also needs to update package.json dependencies for cdkV2 - await expect(buildCustomResources(projRoot2, usingLatestCode)).rejects.toThrow(); - - // emulate updating the package.json dependencies - const srcVLatestCustomPackageJSONFilePath = path.join( - __dirname, - '..', - '..', - '..', - 'custom-resources', - 'custom-cdk-stack-vLatest.package.json', - ); - const destVLatestCustomPackageJSONFilePath = path.join(projRoot2, 'amplify', 'backend', 'custom', cdkResourceName, 'package.json'); - fs.copyFileSync(srcVLatestCustomPackageJSONFilePath, destVLatestCustomPackageJSONFilePath); - - // this should pass now - await buildCustomResources(projRoot2, usingLatestCode); - await amplifyPushAuth(projRoot2, usingLatestCode); - - // // Using latest code, add custom CFN and add dependency of custom CDK resource on the custom CFN - await addCFNCustomResource(projRoot2, { name: cfnResourceName, promptForCustomResourcesSelection: true }, usingLatestCode); - const customCFNFilePath = path.join( - projRoot2, - 'amplify', - 'backend', - 'custom', - cfnResourceName, - `${cfnResourceName}-cloudformation-template.json`, - ); - const customCFNFileJSON: any = JSONUtilities.readJson(customCFNFilePath); - // Make sure input params has params from the resource dependency - expect(customCFNFileJSON?.Parameters).toEqual({ - env: { Type: 'String' }, - [`custom${cdkResourceName}snsTopicArn`]: { - Type: 'String', - Description: `Input parameter describing snsTopicArn attribute for custom/${cdkResourceName} resource`, - }, - }); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts deleted file mode 100644 index 9a6f7cabc74..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - addAuthWithDefault, - addGeofenceCollectionWithDefault, - addMapWithDefault, - addPlaceIndexWithDefault, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, - updateAuthAddUserGroups, -} from '@aws-amplify/amplify-e2e-core'; -import { validateVersionsForMigrationTest } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { pullPushWithLatestCodebaseValidateParameterAndCfnDrift } from '../../migration-helpers/utils'; - -describe('geo category migration from v10 to latest', () => { - const projectName = 'geoMigration'; - let projRoot: string; - - beforeAll(async () => { - await validateVersionsForMigrationTest(); - }); - - beforeEach(async () => { - projRoot = await createNewProjectDir(projectName); - await initJSProjectWithProfileV10(projRoot, { name: 'geoMigration', disableAmplifyAppCreation: false }); - await addAuthWithDefault(projRoot); - await addMapWithDefault(projRoot); - await addPlaceIndexWithDefault(projRoot); - const cognitoGroups = ['admin', 'admin1']; - await updateAuthAddUserGroups(projRoot, cognitoGroups); - await addGeofenceCollectionWithDefault(projRoot, cognitoGroups); - await amplifyPushWithoutCodegen(projRoot); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('...pull and push should not drift with new amplify version', async () => { - await pullPushWithLatestCodebaseValidateParameterAndCfnDrift(projRoot, projectName); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts deleted file mode 100644 index cd5ab4dab59..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Tests for headless init/pull workflows on git-cloned projects - * These tests exercise workflows that hosting executes during backend builds - */ - -import { - addAuthUserPoolOnly, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAmplifyInitConfig, - getProjectConfig, - getProjectMeta, - getSocialProviders, - gitCleanFdx, - gitCommitAll, - gitInit, - nonInteractiveInitWithForcePushAttach, -} from '@aws-amplify/amplify-e2e-core'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; - -describe('attach amplify to git-cloned project', () => { - const envName = 'test'; - let projRoot: string; - beforeAll(async () => { - projRoot = await createNewProjectDir('clone-test'); - await initJSProjectWithProfileV10(projRoot, { envName, disableAmplifyAppCreation: false }); - await addAuthUserPoolOnly(projRoot); - await amplifyPushAuthV5V6(projRoot); - await gitInit(projRoot); - await gitCommitAll(projRoot); - }); - - afterAll(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - test('headless init and forcePush when triggers are added', async () => { - // checks amplify hosting forcePush on existing projects with v10.5.1 - const { projectName } = getProjectConfig(projRoot); - assertLambdaexecutionRoleArns(projRoot, false); - await gitCleanFdx(projRoot); - const socialProviders = getSocialProviders(); - const categoriesConfig = { - auth: { - facebookAppIdUserPool: socialProviders.FACEBOOK_APP_ID, - facebookAppSecretUserPool: socialProviders.FACEBOOK_APP_SECRET, - googleAppIdUserPool: socialProviders.GOOGLE_APP_ID, - googleAppSecretUserPool: socialProviders.GOOGLE_APP_SECRET, - // eslint-disable-next-line spellcheck/spell-checker - loginwithamazonAppIdUserPool: socialProviders.AMAZON_APP_ID, - // eslint-disable-next-line spellcheck/spell-checker - loginwithamazonAppSecretUserPool: socialProviders.AMAZON_APP_SECRET, - }, - }; - await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, envName), categoriesConfig, true); - assertLambdaexecutionRoleArns(projRoot, true); - }); -}); - -const assertLambdaexecutionRoleArns = (projRoot: string, isDefined: boolean) => { - const meta = getProjectMeta(projRoot); - const authKey = Object.keys(meta.auth).find((key) => meta.auth[key].service === 'Cognito'); - const createFunctionResourceName = `${authKey}CreateAuthChallenge`; - const defineFunctionResourceName = `${authKey}DefineAuthChallenge`; - const customMessageFunctionResourceName = `${authKey}CustomMessage`; - const createFunctionMeta = meta.function[createFunctionResourceName]; - const defineFunctionMeta = meta.function[defineFunctionResourceName]; - const customMessageFunctionMeta = meta.function[customMessageFunctionResourceName]; - const createFunctionRoleArn = createFunctionMeta.output.LambdaExecutionRoleArn; - const defineFunctionRoleArn = defineFunctionMeta.output.LambdaExecutionRoleArn; - const customMessageFunctionRoleArn = customMessageFunctionMeta.output.LambdaExecutionRoleArn; - if (isDefined) { - expect(createFunctionRoleArn).toBeDefined(); - expect(defineFunctionRoleArn).toBeDefined(); - expect(customMessageFunctionRoleArn).toBeDefined(); - } else { - expect(createFunctionRoleArn).not.toBeDefined(); - expect(defineFunctionRoleArn).not.toBeDefined(); - expect(customMessageFunctionRoleArn).not.toBeDefined(); - } -}; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts deleted file mode 100644 index 638c6138c80..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { - addNotificationChannel, - addPinpointAnalytics, - amplifyPushAuth, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, -} from '@aws-amplify/amplify-e2e-core'; -import { validateVersionsForMigrationTest } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { getShortId } from '../../migration-helpers/utils'; - -describe('pinpoint region migration from v10 to latest', () => { - const projectName = 'pinpointMigration'; - let projectRoot: string; - - beforeAll(async () => { - await validateVersionsForMigrationTest(); - }); - - beforeEach(async () => { - projectRoot = await createNewProjectDir(projectName); - await initJSProjectWithProfileV10(projectRoot, { name: 'pinpointMigration', disableAmplifyAppCreation: false }); - await addPinpointAnalytics(projectRoot, false); - await amplifyPushWithoutCodegen(projectRoot); - }); - - afterEach(async () => { - await deleteProject(projectRoot, null, true); - deleteProjectDir(projectRoot); - }); - - // test forced to be executed in us-east-2 region - it('should add notifications using us-east-1 region client to match original pinpoint resource', async () => { - const settings = { resourceName: `notification${getShortId()}` }; - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await addNotificationChannel(projectRoot, settings, 'SMS', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts deleted file mode 100644 index 4dff6ea1bbb..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { createNewProjectDir, deleteProject, deleteProjectDir } from '@aws-amplify/amplify-e2e-core'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; - -describe('amplify migration test scaffold v10', () => { - let projRoot: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('scaffoldTest'); - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - console.log(`Test migration from: ${migrateFromVersion} to ${migrateToVersion}`); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); // uncomment this once we are in v11 for local codebase - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('...should init a project', async () => { - await initJSProjectWithProfileV10(projRoot, { name: 'scaffoldTest' }); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts deleted file mode 100644 index 64b9dd02273..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - addAuthWithDefault, - addDDBWithTrigger, - addDynamoDBWithGSIWithSettings, - addS3StorageWithSettings, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, -} from '@aws-amplify/amplify-e2e-core'; -import { validateVersionsForMigrationTest } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { getShortId, pullPushWithLatestCodebaseValidateParameterAndCfnDrift } from '../../migration-helpers/utils'; - -describe('storage category migration from v10 to latest', () => { - const projectName = 'storageMigration'; - let projRoot: string; - - beforeAll(async () => { - await validateVersionsForMigrationTest(); - }); - - beforeEach(async () => { - projRoot = await createNewProjectDir(projectName); - await initJSProjectWithProfileV10(projRoot, { name: 'storageMigration', disableAmplifyAppCreation: false }); - await addDynamoDBWithGSIWithSettings(projRoot, { - resourceName: `${projectName}res${getShortId()}`, - tableName: `${projectName}tbl${getShortId()}`, - gsiName: `${projectName}gsi${getShortId()}`, - }); - await addDDBWithTrigger(projRoot, {}); - await addAuthWithDefault(projRoot); - await addS3StorageWithSettings(projRoot, {}); - await amplifyPushWithoutCodegen(projRoot); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('...pull and push should not drift with new amplify version', async () => { - await pullPushWithLatestCodebaseValidateParameterAndCfnDrift(projRoot, projectName); - }); -}); diff --git a/packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts b/packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts deleted file mode 100644 index 8b237fb0cb8..00000000000 --- a/packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ExcludeFromCFNDiff } from '../migration-helpers/utils'; - -/** - * Due to a known limitation of APIGateway, we do not want the AWS::ApiGateway::Deployment resource - * from being compared in the CFN diff because it is regenerated whenever an amplify app is pulled down. - * This would produce a false positive when checking for differences in the CFN templates of project1 & project2. - * https://github.com/aws/aws-cdk/issues/8646#issuecomment-647561856 - * - * AWS::ApiGateway::GatewayResponse is also excluded - */ -export const cfnDiffExclusions: ExcludeFromCFNDiff = ( - currentCategory: string, - currentResourceKey: string, - cfnTemplates: { - project1: Record; - project2: Record; - }, -) => { - const excludeAPIGateWayDeploymentResource = (cfnTemplate: Record): void => { - const resources = cfnTemplate.Resources ?? {}; - const resourceKeys = Object.keys(resources); - for (const key of resourceKeys) { - const resource = resources[key]; - if (resource.Type === 'AWS::ApiGateway::Deployment' || resource.Type === 'AWS::ApiGateway::GatewayResponse') { - delete resources[key]; - } - if (resource.Type === 'AWS::AppSync::ApiKey' && resource.Properties) { - delete resource.Properties.Expires; - } - } - }; - if (currentCategory === 'api') { - excludeAPIGateWayDeploymentResource(cfnTemplates.project1); - excludeAPIGateWayDeploymentResource(cfnTemplates.project2); - } - return { project1: cfnTemplates.project1, project2: cfnTemplates.project2 }; -}; diff --git a/packages/amplify-migration-tests/src/migration-helpers-v10/init.ts b/packages/amplify-migration-tests/src/migration-helpers-v10/init.ts deleted file mode 100644 index 70da8a0f60b..00000000000 --- a/packages/amplify-migration-tests/src/migration-helpers-v10/init.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { addCircleCITags, getCLIPath, nspawn as spawn } from '@aws-amplify/amplify-e2e-core'; -import { EOL } from 'os'; - -const defaultSettings = { - name: EOL, - // eslint-disable-next-line spellcheck/spell-checker - envName: 'integtest', - editor: EOL, - appType: EOL, - framework: EOL, - srcDir: EOL, - distDir: EOL, - buildCmd: EOL, - startCmd: EOL, - useProfile: EOL, - profileName: EOL, - region: process.env.CLI_REGION, - local: false, - disableAmplifyAppCreation: true, - disableCIDetection: false, - providerConfig: undefined, - permissionsBoundaryArn: undefined, -}; - -export function initJSProjectWithProfileV10(cwd: string, settings?: Partial): Promise { - const s = { ...defaultSettings, ...settings }; - let env; - - if (s.disableAmplifyAppCreation === true) { - env = { - CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1', - }; - } - - addCircleCITags(cwd); - - const cliArgs = ['init']; - const providerConfigSpecified = !!s.providerConfig && typeof s.providerConfig === 'object'; - if (providerConfigSpecified) { - cliArgs.push('--providers', JSON.stringify(s.providerConfig)); - } - - if (s.permissionsBoundaryArn) { - cliArgs.push('--permissions-boundary', s.permissionsBoundaryArn); - } - - if (s?.name?.length > 20) console.warn('Project names should not be longer than 20 characters. This may cause tests to break.'); - - return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), cliArgs, { - cwd, - stripColors: true, - env, - disableCIDetection: s.disableCIDetection, - }) - .wait('Enter a name for the project') - .sendLine(s.name) - .wait('Initialize the project with the above configuration?') - .sendConfirmNo() - .wait('Enter a name for the environment') - .sendLine(s.envName) - .wait('Choose your default editor:') - .sendLine(s.editor) - .wait("Choose the type of app that you're building") - .sendLine(s.appType) - .wait('What javascript framework are you using') - .sendLine(s.framework) - .wait('Source Directory Path:') - .sendLine(s.srcDir) - .wait('Distribution Directory Path:') - .sendLine(s.distDir) - .wait('Build Command:') - .sendLine(s.buildCmd) - .wait('Start Command:') - .sendCarriageReturn(); - - if (!providerConfigSpecified) { - chain - .wait('Using default provider awscloudformation') - .wait('Select the authentication method you want to use:') - .sendCarriageReturn() - .wait('Please choose the profile you want to use') - .sendLine(s.profileName); - } - chain - .wait('Help improve Amplify CLI by sharing non sensitive configurations on failures') - .sendYes() - .wait(/Try "amplify add api" to create a backend API and then "amplify (push|publish)" to deploy everything/) - .run((err: Error) => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); -} diff --git a/scripts/split-e2e-test-filters.ts b/scripts/split-e2e-test-filters.ts index 4ef4ea0110d..8bb3c5b46d5 100644 --- a/scripts/split-e2e-test-filters.ts +++ b/scripts/split-e2e-test-filters.ts @@ -8,20 +8,6 @@ export const migrationFromV8Tests = [ 'src/__tests__/update_tests/function_migration_update.test.ts', ]; -export const migrationFromV10Tests = [ - 'src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts', - 'src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts', - 'src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts', - 'src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts', - 'src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts', - 'src/__tests__/migration_tests_v10/auth-override.migration.test.ts', - 'src/__tests__/migration_tests_v10/custom-stack.migration.test.ts', - 'src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts', - 'src/__tests__/migration_tests_v10/geo.migration.test.ts', - 'src/__tests__/migration_tests_v10/scaffold.test.ts', - 'src/__tests__/migration_tests_v10/storage.migration.test.ts', - 'src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts', -]; export const migrationFromV12Tests = [ 'src/__tests__/migration_tests_v12/auth.migration.test.ts', 'src/__tests__/migration_tests_v12/auth-app-client-secret-migration.test.ts', diff --git a/scripts/split-e2e-tests-codebuild.ts b/scripts/split-e2e-tests-codebuild.ts index fcaca3aa22e..c6f5bd4da08 100644 --- a/scripts/split-e2e-tests-codebuild.ts +++ b/scripts/split-e2e-tests-codebuild.ts @@ -5,7 +5,7 @@ import * as yaml from 'js-yaml'; import { AWS_REGIONS_TO_RUN_TESTS as regions } from './cci-utils'; import { REPO_ROOT } from './cci-utils'; import { FORCE_REGION_MAP, getOldJobNameWithoutSuffixes, loadTestTimings, USE_PARENT_ACCOUNT } from './cci-utils'; -import { migrationFromV10Tests, migrationFromV12Tests, migrationFromV8Tests } from './split-e2e-test-filters'; +import { migrationFromV12Tests, migrationFromV8Tests } from './split-e2e-test-filters'; const CODEBUILD_CONFIG_BASE_PATH = join(REPO_ROOT, 'codebuild_specs', 'e2e_workflow_base.yml'); const CODEBUILD_GENERATE_CONFIG_PATH = join(REPO_ROOT, 'codebuild_specs', 'e2e_workflow_generated'); const RUN_SOLO = [ @@ -332,20 +332,6 @@ function main(): void { return tests.filter((testName) => migrationFromV8Tests.find((t: string) => t === testName)); }, ); - const splitMigrationV10Tests = splitTestsV3( - { - identifier: 'migration_tests_v10', - buildspec: 'codebuild_specs/migration_tests_v10.yml', - env: {}, - 'depend-on': ['upb'], - }, - undefined, - join(REPO_ROOT, 'packages', 'amplify-migration-tests'), - true, - (tests: string[]) => { - return tests.filter((testName) => migrationFromV10Tests.find((t) => t === testName)); - }, - ); const splitMigrationV12Tests = splitTestsV3( { identifier: 'migration_tests_v12', @@ -361,7 +347,7 @@ function main(): void { }, ); - let allBuilds = [...splitE2ETests, ...splitMigrationV8Tests, ...splitMigrationV10Tests, ...splitMigrationV12Tests]; + let allBuilds = [...splitE2ETests, ...splitMigrationV8Tests, ...splitMigrationV12Tests]; const dependeeIdentifiers: string[] = allBuilds.map((buildObject) => buildObject.identifier).sort(); const dependeeIdentifiersFileContents = `${JSON.stringify(dependeeIdentifiers, null, 2)}\n`; const waitForIdsFilePath = './codebuild_specs/wait_for_ids.json'; From 173d769adaef58aa2f1fcbf5a97c0907eaa2527b Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 20 Feb 2024 14:01:51 -0800 Subject: [PATCH 4/6] chore: remove some v8 migration tests --- codebuild_specs/e2e_workflow_generated.yml | 391 ++++++++---------- codebuild_specs/wait_for_ids.json | 5 - .../layer-migration.test.ts | 182 -------- .../notifications-migration-2.test.ts | 50 --- .../notifications-migration-3.test.ts | 42 -- .../notifications-migration-4.test.ts | 52 --- .../notifications-migration-5.test.ts | 42 -- .../notifications-migration-6.test.ts | 40 -- .../notifications-migration.test.ts | 54 --- .../function_migration_update.test.ts | 145 ------- scripts/split-e2e-test-filters.ts | 5 - 11 files changed, 173 insertions(+), 835 deletions(-) delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts delete mode 100644 packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index e588b3099a6..dbed68edd75 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -145,7 +145,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/diagnose.test.ts|src/__tests__/hooks-a.test.ts|src/__tests__/mock-api.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js @@ -161,7 +161,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_auth_2f_notifications_lifecycle_notifications_analytics_compatibility_in_app_1 @@ -169,7 +169,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c @@ -185,7 +185,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts|src/__tests__/plugin.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1 @@ -193,7 +193,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_notifications_sms_pull_pull_auth_10 @@ -201,7 +201,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/pull.test.ts|src/__tests__/auth_10.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_container_hosting_init_b_notifications_apns @@ -209,7 +209,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/container-hosting.test.ts|src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_notifications_fcm_notifications_in_app_messaging_env_2_with_babel_config @@ -217,7 +217,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-fcm.test.ts|src/__tests__/notifications-in-app-messaging-env-2.test.ts|src/__tests__/with-babel-config.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_amplify_configure_env_2_init_d @@ -233,7 +233,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts|src/__tests__/configure-project.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_git_clone_attach_init_c_layer_4 @@ -241,7 +241,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/git-clone-attach.test.ts|src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_function_2c_function_3b_function_4 @@ -249,7 +249,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_2c.test.ts|src/__tests__/function_3b.test.ts|src/__tests__/function_4.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_interactions_schema_model_a_tags @@ -265,7 +265,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts|src/__tests__/custom_policies_function.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_function_6_storage_2_export @@ -281,7 +281,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/iam-permissions-boundary.test.ts|src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_schema_auth_4b_schema_model_e_schema_versioned @@ -289,7 +289,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_1c_auth_5e_auth_8b @@ -305,7 +305,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-add-b.test.ts|src/__tests__/s3-sse.test.ts|src/__tests__/schema-auth-4a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_model_b_schema_model_d_auth_5f @@ -313,7 +313,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-model-b.test.ts|src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_env_4_frontend_config_drift_schema_auth_4d @@ -321,7 +321,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts|src/__tests__/schema-auth-4d.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_schema_auth_6a_schema_data_access_patterns_schema_model_c @@ -337,7 +337,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-predictions.test.ts|src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_4c_auth_5a_auth_5c @@ -345,7 +345,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_4c.test.ts|src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_env_1_geo_add_a_init_a @@ -353,7 +353,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_auth_4c_schema_auth_5c_auth_5b @@ -361,7 +361,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-4c.test.ts|src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_auth_9_custom_resources_env_5 @@ -369,7 +369,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_9.test.ts|src/__tests__/custom_resources.test.ts|src/__tests__/env-5.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_function_10_function_9c_function_permissions @@ -377,7 +377,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts|src/__tests__/function-permissions.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_geo_import_1a_geo_import_2_global_sandbox_b @@ -401,7 +401,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_3a.test.ts|src/__tests__/auth_3b.test.ts|src/__tests__/auth_4a.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_7a_auth_8c_feature_flags @@ -409,7 +409,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts|src/__tests__/feature-flags.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_import_1b_global_sandbox_a_init_e @@ -417,7 +417,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_notifications_analytics_compatibility_in_app_2_schema_auth_11_c_schema_auth_2b @@ -425,7 +425,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts|src/__tests__/schema-auth-2b.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_6c_schema_auth_6d_schema_auth_7c @@ -441,7 +441,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts|src/__tests__/api_10.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_api_7_export_pull_a_function_9a @@ -449,7 +449,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_headless_api_key_migration5_schema_auth_1a @@ -457,7 +457,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts|src/__tests__/schema-auth-1a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_schema_auth_5b_schema_auth_8b_schema_auth_9_a @@ -465,7 +465,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts|src/__tests__/schema-auth-9-a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_schema_auth_9_c_storage_3_auth_11 @@ -473,7 +473,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts|src/__tests__/auth_11.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_auth_1b_delete_geo_add_c @@ -481,7 +481,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts|src/__tests__/geo-add-c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_geo_add_d_geo_import_3_hosting @@ -489,7 +489,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts|src/__tests__/hosting.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_layer_3_api_connection_migration_api_key_migration3 @@ -497,7 +497,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts|src/__tests__/migration/api.key.migration3.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_predictions_schema_auth_11_b_schema_auth_1b @@ -505,7 +505,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts|src/__tests__/schema-auth-1b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_2a_schema_auth_7a_schema_auth_7b @@ -513,7 +513,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_9_b_schema_iterative_rollback_1_predictions_migration @@ -529,7 +529,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_function_3a_init_special_case_http_migration @@ -545,7 +545,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-12.test.ts|src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_auth_4b_auth_8a_export_pull_d @@ -553,7 +553,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_5a_schema_iterative_rollback_2_schema_iterative_update_3 @@ -561,7 +561,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-5a.test.ts|src/__tests__/schema-iterative-rollback-2.test.ts|src/__tests__/schema-iterative-update-3.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_auth_migration_amplify_remove_api_2a @@ -569,7 +569,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/amplify-remove.test.ts|src/__tests__/api_2a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_api_2b_api_6c_api_9a @@ -577,7 +577,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_auth_12_auth_2g_auth_2h @@ -585,7 +585,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_12.test.ts|src/__tests__/auth_2g.test.ts|src/__tests__/auth_2h.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_5g_hosted_ui_user_groups_s3_access @@ -617,7 +617,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_12.test.ts|src/__tests__/function_13.test.ts|src/__tests__/function_14.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_function_15_function_2d_general_config_headless_init @@ -633,7 +633,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/help.test.ts|src/__tests__/hooks-c.test.ts|src/__tests__/init-force-push.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_interactions_1_interactions_2_minify_cloudformation @@ -649,7 +649,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-multi-env.test.ts|src/__tests__/notifications-sms-update.test.ts|src/__tests__/opensearch-simulator/opensearch-simulator.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_parameter_store_1_parameter_store_2_android_analytics_pinpoint_config @@ -657,7 +657,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/parameter-store-1.test.ts|src/__tests__/parameter-store-2.test.ts|src/__tests__/pinpoint/android-analytics-pinpoint-config.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_android_notifications_pinpoint_config_flutter_analytics_pinpoint_config_flutter_notifications_pinpoint_config @@ -665,7 +665,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/pinpoint/android-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/flutter-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/flutter-notifications-pinpoint-config.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_ios_analytics_pinpoint_config_ios_notifications_pinpoint_config_javascript_analytics_pinpoint_config @@ -673,7 +673,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/pinpoint/ios-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/ios-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/javascript-analytics-pinpoint-config.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_javascript_notifications_pinpoint_config_pr_previews_multi_env_1_pull_2 @@ -681,7 +681,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/pinpoint/javascript-notifications-pinpoint-config.test.ts|src/__tests__/pr-previews-multi-env-1.test.ts|src/__tests__/pull-2.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_push_smoketest_ios_smoketest @@ -689,7 +689,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/push.test.ts|src/__tests__/smoke-tests/smoketest-ios.test.ts|src/__tests__/smoke-tests/smoketest.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_S3server_api_8_function_8 @@ -697,7 +697,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/storage-simulator/S3server.test.ts|src/__tests__/api_8.test.ts|src/__tests__/function_8.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_iterative_update_locking_api_lambda_auth_2_layer_2 @@ -721,7 +721,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_function_1_api_9b_custom_policies_container @@ -729,7 +729,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_function_9b_schema_iterative_update_2_storage_1a @@ -737,7 +737,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_storage_1b_function_11_function_2b @@ -745,7 +745,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_function_7_api_connection_migration2_api_4 @@ -753,7 +753,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_7.test.ts|src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_containers_api_secrets_storage_4_schema_auth_10 @@ -761,7 +761,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_geo_multi_env_searchable_datastore_resolvers @@ -785,7 +785,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/graphql-v2/api_lambda_auth_1.test.ts|src/__tests__/migration/api.key.migration2.test.ts|src/__tests__/schema-searchable.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_api_key_migration1_schema_auth_14_api_3 @@ -793,7 +793,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_api_6b_api_1_layer_1 @@ -801,7 +801,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts|src/__tests__/layer-1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_api_key_migration4_schema_iterative_update_4_function_1 @@ -809,7 +809,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/migration/api.key.migration4.test.ts|src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_storage_5 @@ -818,7 +818,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/storage-5.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_datastore_modelgen @@ -827,7 +827,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/datastore-modelgen.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 DISABLE_COVERAGE: 1 depend-on: - upb @@ -837,7 +837,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/amplify-app.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-west-2 DISABLE_COVERAGE: 1 depend-on: - upb @@ -856,7 +856,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_uibuilder @@ -865,7 +865,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/uibuilder.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_geo_remove_3 @@ -874,7 +874,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-3.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_add_f @@ -883,7 +883,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-f.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_geo_add_e @@ -892,7 +892,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-e.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_dynamodb_2c @@ -901,7 +901,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_env_3 @@ -910,7 +910,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/env-3.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_geo_remove_2 @@ -919,7 +919,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-2.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_notifications_in_app_messaging @@ -928,7 +928,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_auth_2a @@ -937,7 +937,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2a.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_import_auth_1a @@ -946,7 +946,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_auth_2b @@ -955,7 +955,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2b.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_import_s3_2a @@ -964,7 +964,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_s3_2c @@ -973,7 +973,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2c.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_auth_1b @@ -982,7 +982,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1b.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_schema_auth_11_a @@ -991,7 +991,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_geo_update_1 @@ -1000,7 +1000,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_update_2 @@ -1009,7 +1009,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-2.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_s3_3 @@ -1018,7 +1018,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_dynamodb_2b @@ -1027,7 +1027,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2b.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_smoketest_amplify_app @@ -1036,7 +1036,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/smoke-tests/smoketest-amplify-app.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 DISABLE_COVERAGE: 1 depend-on: - upb @@ -1046,7 +1046,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_s3_2b @@ -1055,7 +1055,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_containers_api_1 @@ -1064,7 +1064,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_auth_15 @@ -1100,7 +1100,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_containers_api_2 @@ -1109,7 +1109,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_s3_1 @@ -1118,7 +1118,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1128,7 +1128,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1138,7 +1138,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_import_dynamodb_1 @@ -1147,7 +1147,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1169,7 +1169,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1191,7 +1191,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-analytics-compatibility-sms-2.test.ts|src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1213,7 +1213,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1224,7 +1224,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/auth_10.test.ts|src/__tests__/container-hosting.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1257,7 +1257,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init_d.test.ts|src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1268,7 +1268,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/configure-project.test.ts|src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1290,7 +1290,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/tags.test.ts|src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1301,7 +1301,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/custom_policies_function.test.ts|src/__tests__/storage-2.test.ts|src/__tests__/iam-permissions-boundary.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1312,7 +1312,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts|src/__tests__/schema-auth-4b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1323,7 +1323,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts|src/__tests__/auth_1c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1334,7 +1334,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts|src/__tests__/geo-add-b.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1345,7 +1345,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/s3-sse.test.ts|src/__tests__/schema-auth-4a.test.ts|src/__tests__/schema-model-b.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1356,7 +1356,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts|src/__tests__/env-4.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1367,7 +1367,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/frontend_config_drift.test.ts|src/__tests__/schema-auth-4d.test.ts|src/__tests__/schema-auth-6a.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1378,7 +1378,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts|src/__tests__/schema-predictions.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1389,7 +1389,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts|src/__tests__/auth_4c.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1400,7 +1400,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts|src/__tests__/env-1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1411,7 +1411,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts|src/__tests__/schema-auth-4c.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1433,7 +1433,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1444,7 +1444,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function-permissions.test.ts|src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1455,7 +1455,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/global_sandbox-b.test.ts|src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1466,7 +1466,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-8c.test.ts|src/__tests__/auth_3a.test.ts|src/__tests__/auth_3b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1488,7 +1488,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1521,7 +1521,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-7c.test.ts|src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1543,7 +1543,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function_9a.test.ts|src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1554,7 +1554,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1565,7 +1565,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-9-a.test.ts|src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1576,7 +1576,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1587,7 +1587,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-add-c.test.ts|src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1598,7 +1598,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1620,7 +1620,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-1b.test.ts|src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1631,7 +1631,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-7b.test.ts|src/__tests__/schema-auth-9-b.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1642,7 +1642,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1653,7 +1653,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts|src/__tests__/schema-auth-12.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1675,7 +1675,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts|src/__tests__/schema-auth-5a.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1686,7 +1686,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/amplify-remove.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1697,7 +1697,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_2a.test.ts|src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1708,7 +1708,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_9a.test.ts|src/__tests__/auth_2h.test.ts|src/__tests__/auth_5g.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1719,7 +1719,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups-s3-access.test.ts|src/__tests__/auth/user-groups.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1730,7 +1730,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/aws-exports/js-frontend-config.test.ts|src/__tests__/build-function.test.ts|src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1741,7 +1741,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts|src/__tests__/function_13.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1752,7 +1752,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function_14.test.ts|src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1785,7 +1785,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-sms-update.test.ts|src/__tests__/parameter-store-1.test.ts|src/__tests__/parameter-store-2.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1796,7 +1796,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/push.test.ts|src/__tests__/smoke-tests/smoketest-ios.test.ts|src/__tests__/smoke-tests/smoketest.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1807,7 +1807,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_8.test.ts|src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1818,7 +1818,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1829,7 +1829,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1840,7 +1840,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1851,7 +1851,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1862,7 +1862,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1873,7 +1873,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1884,7 +1884,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts|src/__tests__/geo-multi-env.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1895,7 +1895,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/graphql-v2/searchable-datastore.test.ts|src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1917,7 +1917,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/api.key.migration2.test.ts|src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1928,7 +1928,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1939,7 +1939,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/api_1.test.ts|src/__tests__/layer-1.test.ts|src/__tests__/migration/api.key.migration4.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1950,7 +1950,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1961,7 +1961,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2c.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1972,7 +1972,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -1994,7 +1994,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -2005,7 +2005,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -2016,7 +2016,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -2027,7 +2027,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -2038,7 +2038,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -2049,7 +2049,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -2060,7 +2060,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-connection-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -2071,7 +2071,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -2094,7 +2094,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2106,7 +2106,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -2117,36 +2117,18 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows - upb - - identifier: l_notifications_migration_4_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts - CLI_REGION: us-east-1 - depend-on: - - upb - identifier: l_api_key_migration_v8 buildspec: codebuild_specs/migration_tests_v8.yml env: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts - CLI_REGION: ap-southeast-2 - depend-on: - - upb - - identifier: l_notifications_migration_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_api_key_migration_2_v8 @@ -2155,43 +2137,16 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts - CLI_REGION: eu-west-2 - depend-on: - - upb - - identifier: l_notifications_migration_2_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts - CLI_REGION: us-east-2 - depend-on: - - upb - - identifier: l_function_migration_update_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/update_tests/function_migration_update.test.ts CLI_REGION: ap-southeast-2 depend-on: - upb - - identifier: l_notifications_migration_3_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts - CLI_REGION: ap-northeast-1 - depend-on: - - upb - identifier: l_auth_app_client_secret_migration_v12 buildspec: codebuild_specs/migration_tests_v12.yml env: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-app-client-secret-migration.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_hosted_ui_lambda_migration_v12 @@ -2200,7 +2155,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-hosted-ui-lambda-migration.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_auth_lambda_callout_migration_rollback_v12 @@ -2209,7 +2164,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-lambda-callout-migration-rollback.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_auth_lambda_callout_migration_v12 @@ -2218,7 +2173,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-lambda-callout-migration.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_auth_oauth_lambda_migration_v12 @@ -2227,7 +2182,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-oauth-lambda-migration.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_migration_v12 @@ -2236,7 +2191,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth.migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: aggregate_e2e_reports diff --git a/codebuild_specs/wait_for_ids.json b/codebuild_specs/wait_for_ids.json index 29e21d44b97..32b832eddf0 100644 --- a/codebuild_specs/wait_for_ids.json +++ b/codebuild_specs/wait_for_ids.json @@ -53,7 +53,6 @@ "l_function_6_storage_2_export", "l_function_7_api_connection_migration2_api_4", "l_function_9b_schema_iterative_update_2_storage_1a", - "l_function_migration_update_v8", "l_geo_add_b_s3_sse_schema_auth_4a", "l_geo_add_d_geo_import_3_hosting", "l_geo_add_e", @@ -96,10 +95,6 @@ "l_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c", "l_notifications_fcm_notifications_in_app_messaging_env_2_with_babel_config", "l_notifications_in_app_messaging", - "l_notifications_migration_2_v8", - "l_notifications_migration_3_v8", - "l_notifications_migration_4_v8", - "l_notifications_migration_v8", "l_notifications_multi_env_notifications_sms_update_opensearch_simulator", "l_notifications_sms_pull_pull_auth_10", "l_parameter_store_1_parameter_store_2_android_analytics_pinpoint_config", diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts deleted file mode 100644 index 0d9da13a30f..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { - addFunction, - amplifyPushAuthV5V6, - amplifyPushLayer, - amplifyStatus, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getProjectConfig, - LayerRuntime, - LayerPermissionChoice, - removeLayerVersion, - updateFunction, - updateLayer, -} from '@aws-amplify/amplify-e2e-core'; -import { v4 as uuid } from 'uuid'; -import { - initJSProjectWithProfileV4_28_2, - initJSProjectWithProfileV4_52_0, - legacyAddLayer, - legacyAddOptData, - legacyUpdateOptData, - validateLayerConfigFilesMigrated, - versionCheck, -} from '../../../migration-helpers'; - -describe('test lambda layer migration flow introduced in v5.0.0', () => { - let projRoot: string; - let versionToMigrateFrom: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('functions'); - - const version = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, version); - versionToMigrateFrom = version.v; - - if (versionToMigrateFrom === '4.28.2') { - await initJSProjectWithProfileV4_28_2(projRoot, {}, false); - } else if (versionToMigrateFrom === '4.52.0') { - await initJSProjectWithProfileV4_52_0(projRoot, {}); - } else { - throw new Error(`layer-migration.test.ts was invoked with an unexpected installed Amplify CLI version: ${versionToMigrateFrom}`); - } - }); - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('migrate layer in No Change state with "amplify update function", then push a new vesion after migration', async () => { - const accountId = process.env.LAYERS_AWS_ACCOUNT_ID; - const orgId = process.env.LAYERS_AWS_ORG_ID; - - if (!accountId || !orgId) { - throw new Error('One or both env vars are not set: LAYERS_AWS_ACCOUNT_ID, LAYERS_AWS_ORG_ID'); - } - - const { projectName: projName } = getProjectConfig(projRoot); - const [shortId] = uuid().split('-'); - const layerName = `test${shortId}`; - const layerRuntime: LayerRuntime = 'nodejs'; - const layerSettings = { - layerName, - permissions: ['Specific AWS accounts', 'Specific AWS organization'] as LayerPermissionChoice[], - accountId, - orgId, - projName, - runtimes: [layerRuntime], - }; - - await legacyAddLayer(projRoot, layerSettings); - await amplifyPushAuthV5V6(projRoot); - await amplifyStatus(projRoot, 'No Change', true); - await updateLayer(projRoot, { ...layerSettings, dontChangePermissions: true, migrateLegacyLayer: true }, true); - await amplifyStatus(projRoot, 'Update', true); - expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); - await amplifyPushLayer(projRoot, {}, true); - await removeLayerVersion(projRoot, { removeLegacyOnly: true }, [1], [1, 2], true); - legacyAddOptData(projRoot, layerName); - await amplifyPushLayer(projRoot, {}, true); - await amplifyStatus(projRoot, 'No Change', true); - }); - - it('migrate layer in Create state with "amplify push"', async () => { - const { projectName: projName } = getProjectConfig(projRoot); - const [shortId] = uuid().split('-'); - const layerName = `test${shortId}`; - const layerRuntime: LayerRuntime = 'nodejs'; - const layerSettings = { - layerName, - projName, - runtimes: [layerRuntime], - }; - - await legacyAddLayer(projRoot, layerSettings); - await amplifyPushLayer(projRoot, { migrateLegacyLayer: true }, true); - expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); - }); - - it('migrate layer in Update state with "amplify push"', async () => { - const [shortId] = uuid().split('-'); - const layerName = `test${shortId}`; - const layerRuntime: LayerRuntime = 'nodejs'; - const layerSettings = { - layerName, - runtimes: [layerRuntime], - }; - - await legacyAddLayer(projRoot, layerSettings); - await amplifyPushAuthV5V6(projRoot); - legacyAddOptData(projRoot, layerName); - await amplifyPushLayer(projRoot, { migrateLegacyLayer: true }, true); - await removeLayerVersion(projRoot, { removeLegacyOnly: true }, [1], [1, 2], true); - expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); - }); - - it('migrate layer in No Change state with "amplify update function" by updating permissions', async () => { - const [shortId] = uuid().split('-'); - const layerName = `test${shortId}`; - const layerRuntime: LayerRuntime = 'nodejs'; - const layerSettings = { - layerName, - runtimes: [layerRuntime], - }; - - await legacyAddLayer(projRoot, layerSettings); - await amplifyPushAuthV5V6(projRoot); - await updateLayer( - projRoot, - { - ...layerSettings, - projName: '', - changePermissionOnLatestVersion: true, - migrateLegacyLayer: true, - permissions: ['Public (Anyone on AWS can use this layer)'] as LayerPermissionChoice[], - }, - true, - ); - await amplifyPushLayer(projRoot, {}, true); - await removeLayerVersion(projRoot, { removeLegacyOnly: true }, [1], [1, 2], true); - expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); - }); - - it('migrates a layer with no runtime', async () => { - const [shortId] = uuid().split('-'); - const layerName = `test${shortId}`; - const layerSettings = { - layerName, - runtimes: [], - }; - - await legacyAddLayer(projRoot, layerSettings); - legacyAddOptData(projRoot, layerName); - await amplifyPushAuthV5V6(projRoot); - await updateLayer(projRoot, { ...layerSettings, dontChangePermissions: true, migrateLegacyLayer: true }, true); - await amplifyPushLayer(projRoot, {}, true); - legacyUpdateOptData(projRoot, layerName, 'update'); - await amplifyPushLayer(projRoot, {}, true); - - expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); - }); - - it('handle add and update function when legacy layer is present', async () => { - const [shortId] = uuid().split('-'); - const layerName = `test${shortId}`; - const layerRuntime: LayerRuntime = 'nodejs'; - const functionSettings = { - testingWithLatestCodebase: true, - layerOptions: { - select: [], - expectedListOptions: [layerName], - layerAndFunctionExist: true, - }, - }; - - await legacyAddLayer(projRoot, { layerName: layerName, runtimes: [layerRuntime] }); - await addFunction(projRoot, { ...functionSettings, functionTemplate: 'Hello World' }, layerRuntime); - await updateFunction(projRoot, functionSettings, layerRuntime); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts deleted file mode 100644 index c788a7cd461..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { - addNotificationChannel, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-2'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if another notification channel added with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); - - it('should add in app notifications if another notification channel added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await amplifyPushAuthV5V6(projectRoot); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts deleted file mode 100644 index 72c61786764..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - addNotificationChannel, - addPinpointAnalytics, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-3'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics then another notification channel added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addPinpointAnalytics(projectRoot, false); - await amplifyPushAuthV5V6(projectRoot); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName, true); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts deleted file mode 100644 index ba7b6549ed9..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { - amplifyPull, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel, removeLegacyAllNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-4'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should pull app if notifications added and removed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { - disableAmplifyAppCreation: false, - includeUsageDataPrompt: false, - }); - const appId = getAppId(projectRoot); - expect(appId).toBeDefined(); - - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await amplifyPushAuthV5V6(projectRoot); - - await removeLegacyAllNotificationChannel(projectRoot); - const projectRootPull = await createNewProjectDir('removed-notifications-pull'); - try { - await amplifyPull(projectRootPull, { override: false, emptyDir: true, appId }, true); - } finally { - deleteProjectDir(projectRootPull); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts deleted file mode 100644 index 56c8dc1bd0f..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - addAuthWithDefault, - addNotificationChannel, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-3'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics then another notification channel and auth added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addAuthWithDefault(projectRoot, false); - await amplifyPushAuthV5V6(projectRoot); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts deleted file mode 100644 index 5cceb21164c..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - addAuthWithDefault, - addNotificationChannel, - amplifyPushAuth, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-3'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics then another notification channel and auth added with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addAuthWithDefault(projectRoot, true); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts deleted file mode 100644 index 2fdca92fc31..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - addNotificationChannel, - addPinpointAnalytics, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('init'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics added with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addPinpointAnalytics(projectRoot, false); - - const settings = { resourceName: `notification${getShortId()}` }; - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - - await amplifyPushAuth(projectRoot, true); - }); - - it('should add in app notifications if analytics added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addPinpointAnalytics(projectRoot, false); - await amplifyPushAuthV5V6(projectRoot); - - const settings = { resourceName: `notification${getShortId()}` }; - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts b/packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts deleted file mode 100644 index a339807b77a..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { - addLayer, - amplifyPush, - amplifyPushAuthV5V6, - amplifyPushLayer, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getCurrentLayerArnFromMeta, - getProjectConfig, - getProjectMeta, - invokeFunction, - LayerRuntime, - loadFunctionTestFile, - overrideFunctionSrcNode, - updateApiSchema, - updateFunction, - validateLayerMetadata, - addApiWithoutSchema, - generateRandomShortId, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { v4 as uuid } from 'uuid'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { addFunctionPreV12 } from '../../migration-helpers/lambda-function'; - -describe('amplify function migration', () => { - let projRoot: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('functions'); - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - - await initJSProjectWithProfile(projRoot, { - name: 'functionmigration', - includeUsageDataPrompt: false, - }); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('existing lambda updated with additional permissions should be able to scan ddb', async () => { - const { projectName: appName } = getProjectConfig(projRoot); - - const fnName = `integtestfn${generateRandomShortId()}`; - await addFunctionPreV12( - projRoot, - { - name: fnName, - functionTemplate: 'Hello World', - }, - 'nodejs', - ); - - const functionCode = loadFunctionTestFile('dynamodb-scan-v2.js'); - - overrideFunctionSrcNode(projRoot, fnName, functionCode); - - await amplifyPushAuthV5V6(projRoot); - let meta = getProjectMeta(projRoot); - const { Arn: functionArn, Name: functionName, Region: region } = Object.keys(meta.function).map((key) => meta.function[key])[0].output; - expect(functionArn).toBeDefined(); - expect(functionName).toBeDefined(); - expect(region).toBeDefined(); - - await addApiWithoutSchema(projRoot, { testingWithLatestCodebase: true, transformerVersion: 1 }); - await updateApiSchema(projRoot, appName, 'simple_model.graphql'); - - await updateFunction( - projRoot, - { - name: fnName, - additionalPermissions: { - permissions: ['storage'], - choices: ['function', 'api', 'storage'], - resources: ['Todo:@model(appsync)'], - resourceChoices: ['Todo:@model(appsync)'], - operations: ['read'], - }, - testingWithLatestCodebase: true, - }, - 'nodejs', - ); - await amplifyPush(projRoot, true); - - meta = getProjectMeta(projRoot); - const { GraphQLAPIIdOutput: appsyncId } = Object.keys(meta.api).map((key) => meta.api[key])[0].output; - const result = await invokeFunction(functionName, JSON.stringify({ tableName: `Todo-${appsyncId}-integtest` }), region); - expect(result.StatusCode).toBe(200); - expect(result.Payload).toBeDefined(); - - const payload = JSON.parse(result.Payload.toString()); - expect(payload.errorType).toBeUndefined(); - expect(payload.errorMessage).toBeUndefined(); - expect(payload.Items).toBeDefined(); - expect(payload.Count).toBeDefined(); - expect(payload.ScannedCount).toBeDefined(); - }); - - it('Add 2 functions, upgrade cli, add layer, update a function to depend on layer', async () => { - const [shortId] = uuid().split('-'); - const function1 = `function1${shortId}`; - const function2 = `function2${shortId}`; - const runtime: LayerRuntime = 'nodejs'; - const { projectName: projName } = getProjectConfig(projRoot); - - await addFunctionPreV12(projRoot, { name: function1, functionTemplate: 'Hello World' }, runtime, undefined); - await addFunctionPreV12(projRoot, { name: function2, functionTemplate: 'Hello World' }, runtime, undefined); - await amplifyPushAuthV5V6(projRoot); - - const layerName = `test${shortId}`; - const layerSettings = { - layerName, - projName, - runtimes: [runtime], - }; - - await addLayer(projRoot, layerSettings, true); - await updateFunction( - projRoot, - { - layerOptions: { - select: [projName + layerName], - expectedListOptions: [projName + layerName], - layerAndFunctionExist: true, - }, - name: function1, - testingWithLatestCodebase: true, - }, - runtime, - ); - await amplifyPushLayer(projRoot, {}, true); - const arns: string[] = [getCurrentLayerArnFromMeta(projRoot, { layerName, projName })]; - const meta = getProjectMeta(projRoot); - await validateLayerMetadata(projRoot, { layerName, projName }, meta, 'integtest', arns); - }); -}); diff --git a/scripts/split-e2e-test-filters.ts b/scripts/split-e2e-test-filters.ts index 8bb3c5b46d5..a24b39fb931 100644 --- a/scripts/split-e2e-test-filters.ts +++ b/scripts/split-e2e-test-filters.ts @@ -1,11 +1,6 @@ export const migrationFromV8Tests = [ - 'src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts', - 'src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts', - 'src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts', - 'src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts', 'src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts', 'src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts', - 'src/__tests__/update_tests/function_migration_update.test.ts', ]; export const migrationFromV12Tests = [ From 7beb7049ae8d920d0603aa2c122b53aa991df098 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 20 Feb 2024 14:45:57 -0800 Subject: [PATCH 5/6] chore: remove some v8 migration tests --- codebuild_specs/e2e_workflow_generated.yml | 137 --------------------- codebuild_specs/wait_for_ids.json | 17 --- 2 files changed, 154 deletions(-) diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index 31a1c8dff74..2c35135507b 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -1907,14 +1907,6 @@ batch: depend-on: - build_windows - upb - - identifier: l_notifications_migration_4_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts - depend-on: - - upb - identifier: l_api_key_migration_v8 buildspec: codebuild_specs/migration_tests_v8.yml env: @@ -1923,14 +1915,6 @@ batch: TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts depend-on: - upb - - identifier: l_notifications_migration_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts - depend-on: - - upb - identifier: l_api_key_migration_2_v8 buildspec: codebuild_specs/migration_tests_v8.yml env: @@ -1939,127 +1923,6 @@ batch: TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts depend-on: - upb - - identifier: l_notifications_migration_2_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts - depend-on: - - upb - - identifier: l_function_migration_update_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/update_tests/function_migration_update.test.ts - depend-on: - - upb - - identifier: l_notifications_migration_3_v8 - buildspec: codebuild_specs/migration_tests_v8.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts - depend-on: - - upb - - identifier: l_scaffold_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/scaffold.test.ts - depend-on: - - upb - - identifier: l_api_graphql_v2_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts - depend-on: - - upb - - identifier: l_api_rest_basic_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts - depend-on: - - upb - - identifier: l_api_rest_lambda_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts - depend-on: - - upb - - identifier: l_api_rest_serverless_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts - depend-on: - - upb - - identifier: l_auth_add_all_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts - depend-on: - - upb - - identifier: l_auth_override_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/auth-override.migration.test.ts - depend-on: - - upb - - identifier: l_custom_stack_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/custom-stack.migration.test.ts - depend-on: - - upb - - identifier: l_geo_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/geo.migration.test.ts - depend-on: - - upb - - identifier: l_git_clone_migration_tests_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts - depend-on: - - upb - - identifier: l_pinpoint_region_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts - CLI_REGION: us-east-2 - depend-on: - - upb - - identifier: l_storage_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml - env: - variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/migration_tests_v10/storage.migration.test.ts - depend-on: - - upb - identifier: l_auth_app_client_secret_migration_v12 buildspec: codebuild_specs/migration_tests_v12.yml env: diff --git a/codebuild_specs/wait_for_ids.json b/codebuild_specs/wait_for_ids.json index 8c17580d721..632631c998d 100644 --- a/codebuild_specs/wait_for_ids.json +++ b/codebuild_specs/wait_for_ids.json @@ -8,12 +8,8 @@ "l_api_4_containers_api_secrets_storage_4", "l_api_6a_auth_7b_export_pull_b", "l_api_7_export_pull_a_function_9a", - "l_api_graphql_v2_migration_v10", "l_api_key_migration_2_v8", "l_api_key_migration_v8", - "l_api_rest_basic_migration_v10", - "l_api_rest_lambda_migration_v10", - "l_api_rest_serverless_migration_v10", "l_apigw_api_lambda_auth_1_api_key_migration2", "l_auth_12_auth_2g_auth_2h", "l_auth_1a_auth_trigger_custom_policies_function", @@ -29,7 +25,6 @@ "l_auth_5g_admin_api_hosted_ui", "l_auth_7a_auth_8c_feature_flags", "l_auth_9_custom_resources_env_5", - "l_auth_add_all_migration_v10", "l_auth_app_client_secret_migration_v12", "l_auth_hosted_ui_lambda_migration_1_v12", "l_auth_hosted_ui_lambda_migration_2_v12", @@ -38,13 +33,11 @@ "l_auth_migration_amplify_remove_api_2a", "l_auth_migration_v12", "l_auth_oauth_lambda_migration_v12", - "l_auth_override_migration_v10", "l_build_function_custom_resource_with_storage_dynamodb_simulator", "l_container_hosting_init_b_notifications_apns", "l_containers_api_1", "l_containers_api_2", "l_custom_policies_container_function_9b_schema_iterative_update_2", - "l_custom_stack_migration_v10", "l_datastore_modelgen", "l_diagnose_hooks_a_mock_api", "l_env_1_geo_add_a_init_a", @@ -60,7 +53,6 @@ "l_function_3a_init_special_case_http_migration", "l_function_6_storage_2_export", "l_function_8_schema_iterative_update_locking_api_lambda_auth_2", - "l_function_migration_update_v8", "l_general_config_headless_init_help_hooks_c", "l_geo_add_b_s3_sse_schema_auth_4a", "l_geo_add_d_geo_import_3_hosting", @@ -69,14 +61,12 @@ "l_geo_headless_api_key_migration5_schema_auth_1a", "l_geo_import_1a_geo_import_2_global_sandbox_b", "l_geo_import_1b_global_sandbox_a_init_e", - "l_geo_migration_v10", "l_geo_remove_1", "l_geo_remove_2", "l_geo_remove_3", "l_geo_update_1", "l_geo_update_2", "l_git_clone_attach_init_c_layer_4", - "l_git_clone_migration_tests_v10", "l_hooks_b_notifications_analytics_compatibility_sms_1_plugin", "l_hostingPROD", "l_iam_permissions_boundary_node_function_notifications_sms", @@ -106,17 +96,11 @@ "l_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c", "l_notifications_fcm_notifications_in_app_messaging_env_2_with_babel_config", "l_notifications_in_app_messaging", - "l_notifications_migration_2_v8", - "l_notifications_migration_3_v8", - "l_notifications_migration_4_v8", - "l_notifications_migration_v8", "l_notifications_sms_pull_pull_auth_10", "l_opensearch_simulator_parameter_store_1_parameter_store_2", - "l_pinpoint_region_migration_v10", "l_predictions_schema_auth_11_b_schema_auth_1b", "l_pull_2_push_smoketest_ios", "l_resolvers_schema_key_api_5", - "l_scaffold_v10", "l_schema_auth_10_geo_multi_env_searchable_datastore", "l_schema_auth_11_a", "l_schema_auth_12_schema_auth_3_schema_function_2", @@ -142,7 +126,6 @@ "l_smoketest_S3server_api_8", "l_smoketest_amplify_app", "l_storage_1a_storage_1b_function_11", - "l_storage_migration_v10", "l_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1", "l_uibuilder", "l_user_groups_s3_access_user_groups_js_frontend_config", From 1f65bd2bd34837fa703a7a54e5350891b2939edc Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 20 Feb 2024 16:44:19 -0800 Subject: [PATCH 6/6] restore that --- .../layer-migration.test.ts | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts new file mode 100644 index 00000000000..0d9da13a30f --- /dev/null +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts @@ -0,0 +1,182 @@ +import { + addFunction, + amplifyPushAuthV5V6, + amplifyPushLayer, + amplifyStatus, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getProjectConfig, + LayerRuntime, + LayerPermissionChoice, + removeLayerVersion, + updateFunction, + updateLayer, +} from '@aws-amplify/amplify-e2e-core'; +import { v4 as uuid } from 'uuid'; +import { + initJSProjectWithProfileV4_28_2, + initJSProjectWithProfileV4_52_0, + legacyAddLayer, + legacyAddOptData, + legacyUpdateOptData, + validateLayerConfigFilesMigrated, + versionCheck, +} from '../../../migration-helpers'; + +describe('test lambda layer migration flow introduced in v5.0.0', () => { + let projRoot: string; + let versionToMigrateFrom: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('functions'); + + const version = { v: 'unintialized' }; + await versionCheck(process.cwd(), false, version); + versionToMigrateFrom = version.v; + + if (versionToMigrateFrom === '4.28.2') { + await initJSProjectWithProfileV4_28_2(projRoot, {}, false); + } else if (versionToMigrateFrom === '4.52.0') { + await initJSProjectWithProfileV4_52_0(projRoot, {}); + } else { + throw new Error(`layer-migration.test.ts was invoked with an unexpected installed Amplify CLI version: ${versionToMigrateFrom}`); + } + }); + + afterEach(async () => { + await deleteProject(projRoot, undefined, true); + deleteProjectDir(projRoot); + }); + + it('migrate layer in No Change state with "amplify update function", then push a new vesion after migration', async () => { + const accountId = process.env.LAYERS_AWS_ACCOUNT_ID; + const orgId = process.env.LAYERS_AWS_ORG_ID; + + if (!accountId || !orgId) { + throw new Error('One or both env vars are not set: LAYERS_AWS_ACCOUNT_ID, LAYERS_AWS_ORG_ID'); + } + + const { projectName: projName } = getProjectConfig(projRoot); + const [shortId] = uuid().split('-'); + const layerName = `test${shortId}`; + const layerRuntime: LayerRuntime = 'nodejs'; + const layerSettings = { + layerName, + permissions: ['Specific AWS accounts', 'Specific AWS organization'] as LayerPermissionChoice[], + accountId, + orgId, + projName, + runtimes: [layerRuntime], + }; + + await legacyAddLayer(projRoot, layerSettings); + await amplifyPushAuthV5V6(projRoot); + await amplifyStatus(projRoot, 'No Change', true); + await updateLayer(projRoot, { ...layerSettings, dontChangePermissions: true, migrateLegacyLayer: true }, true); + await amplifyStatus(projRoot, 'Update', true); + expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); + await amplifyPushLayer(projRoot, {}, true); + await removeLayerVersion(projRoot, { removeLegacyOnly: true }, [1], [1, 2], true); + legacyAddOptData(projRoot, layerName); + await amplifyPushLayer(projRoot, {}, true); + await amplifyStatus(projRoot, 'No Change', true); + }); + + it('migrate layer in Create state with "amplify push"', async () => { + const { projectName: projName } = getProjectConfig(projRoot); + const [shortId] = uuid().split('-'); + const layerName = `test${shortId}`; + const layerRuntime: LayerRuntime = 'nodejs'; + const layerSettings = { + layerName, + projName, + runtimes: [layerRuntime], + }; + + await legacyAddLayer(projRoot, layerSettings); + await amplifyPushLayer(projRoot, { migrateLegacyLayer: true }, true); + expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); + }); + + it('migrate layer in Update state with "amplify push"', async () => { + const [shortId] = uuid().split('-'); + const layerName = `test${shortId}`; + const layerRuntime: LayerRuntime = 'nodejs'; + const layerSettings = { + layerName, + runtimes: [layerRuntime], + }; + + await legacyAddLayer(projRoot, layerSettings); + await amplifyPushAuthV5V6(projRoot); + legacyAddOptData(projRoot, layerName); + await amplifyPushLayer(projRoot, { migrateLegacyLayer: true }, true); + await removeLayerVersion(projRoot, { removeLegacyOnly: true }, [1], [1, 2], true); + expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); + }); + + it('migrate layer in No Change state with "amplify update function" by updating permissions', async () => { + const [shortId] = uuid().split('-'); + const layerName = `test${shortId}`; + const layerRuntime: LayerRuntime = 'nodejs'; + const layerSettings = { + layerName, + runtimes: [layerRuntime], + }; + + await legacyAddLayer(projRoot, layerSettings); + await amplifyPushAuthV5V6(projRoot); + await updateLayer( + projRoot, + { + ...layerSettings, + projName: '', + changePermissionOnLatestVersion: true, + migrateLegacyLayer: true, + permissions: ['Public (Anyone on AWS can use this layer)'] as LayerPermissionChoice[], + }, + true, + ); + await amplifyPushLayer(projRoot, {}, true); + await removeLayerVersion(projRoot, { removeLegacyOnly: true }, [1], [1, 2], true); + expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); + }); + + it('migrates a layer with no runtime', async () => { + const [shortId] = uuid().split('-'); + const layerName = `test${shortId}`; + const layerSettings = { + layerName, + runtimes: [], + }; + + await legacyAddLayer(projRoot, layerSettings); + legacyAddOptData(projRoot, layerName); + await amplifyPushAuthV5V6(projRoot); + await updateLayer(projRoot, { ...layerSettings, dontChangePermissions: true, migrateLegacyLayer: true }, true); + await amplifyPushLayer(projRoot, {}, true); + legacyUpdateOptData(projRoot, layerName, 'update'); + await amplifyPushLayer(projRoot, {}, true); + + expect(validateLayerConfigFilesMigrated(projRoot, layerName)).toBe(true); + }); + + it('handle add and update function when legacy layer is present', async () => { + const [shortId] = uuid().split('-'); + const layerName = `test${shortId}`; + const layerRuntime: LayerRuntime = 'nodejs'; + const functionSettings = { + testingWithLatestCodebase: true, + layerOptions: { + select: [], + expectedListOptions: [layerName], + layerAndFunctionExist: true, + }, + }; + + await legacyAddLayer(projRoot, { layerName: layerName, runtimes: [layerRuntime] }); + await addFunction(projRoot, { ...functionSettings, functionTemplate: 'Hello World' }, layerRuntime); + await updateFunction(projRoot, functionSettings, layerRuntime); + }); +});