From 7de776bc9957e7c7d75a2dbed805312154f4a330 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 10:31:27 -0800 Subject: [PATCH 01/17] construct correct stack name on e2e cleanup --- .../health_checks.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts b/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts index 52bcfa30fa..ecd4a42893 100644 --- a/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts +++ b/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts @@ -17,6 +17,7 @@ import { rejectCleanupSandbox, waitForSandboxDeploymentToPrintTotalTime, } from '../process-controller/predicated_action_macros.js'; +import { BackendIdentifierConversions } from '@aws-amplify/platform-core'; const cfnClient = new CloudFormationClient(); @@ -57,7 +58,11 @@ void describe('Live dependency health checks', { concurrency: true }, () => { afterEach(async () => { await fs.rm(tempDir, { recursive: true }); - const stackName = `amplify-${testBranch.appId}-${testBranch.branchName}`; + const stackName = BackendIdentifierConversions.toStackName({ + namespace: testBranch.appId, + name: testBranch.branchName, + type: 'branch', + }); try { await cfnClient.send( new DeleteStackCommand({ From 135cf24ac0a291da35dd3171600f804af1c30644 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 10:32:10 -0800 Subject: [PATCH 02/17] empty changeset --- .changeset/eight-bags-walk.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/eight-bags-walk.md diff --git a/.changeset/eight-bags-walk.md b/.changeset/eight-bags-walk.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/eight-bags-walk.md @@ -0,0 +1,2 @@ +--- +--- From 93b43186f0713e2a4ec819fe7bd3f479efc33fd5 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 12:53:52 -0800 Subject: [PATCH 03/17] removing snapshots and getting new test passing --- package-lock.json | 381 +++- ...BranchName-branch-7d6f6c854a.template.json | 467 ----- ...d6f6c854aauth473E022C.nested.template.json | 255 --- ...d6f6c854adataE67321C2.nested.template.json | 605 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...plifyDataTodo80505FFF.nested.template.json | 1792 ----------------- .../basic-auth-data/factories_for_testing.ts | 7 + packages/integration-tests/package.json | 6 +- .../src/define_backend_template_harness.ts | 60 + .../test-in-memory/integration_tests.test.ts | 44 +- .../data_storage_auth_with_triggers.ts | 2 +- .../minimal_with_typescript_idioms.ts | 2 +- .../data-iterative-deploy/amplify/backend.ts | 0 .../amplify/data/resource.ts | 0 .../update-1/data/resource.ts | 0 .../amplify/auth/resource.cjs | 0 .../amplify/backend.cjs | 0 .../amplify/constants.cjs | 0 .../amplify/data/echo/handler.cjs | 0 .../amplify/data/resource.cjs | 0 .../amplify/func-src/handler.cjs | 0 .../amplify/function.cjs | 0 .../amplify/storage/resource.cjs | 0 .../update-1/data/resource.ts | 0 .../amplify/auth/resource.js | 0 .../amplify/backend.js | 0 .../amplify/constants.js | 0 .../amplify/data/echo/handler.js | 0 .../amplify/data/resource.js | 2 +- .../amplify/func-src/handler.js | 0 .../amplify/function.js | 0 .../amplify/storage/resource.js | 0 .../update-1/data/resource.ts | 0 .../amplify/auth/resource.ts | 0 .../amplify/backend.ts | 4 + .../amplify/constants.ts | 0 .../amplify/data/echo/handler.ts | 0 .../amplify/data/resource.ts | 2 +- .../amplify/func-src/handler.ts | 0 .../amplify/func-src/response_generator.ts | 0 .../amplify/function.ts | 0 .../amplify/storage/resource.ts | 0 .../amplify/test_factories.ts} | 14 +- .../update-1/data/resource.ts | 2 +- .../update-1/function.ts | 0 .../.eslintrc.json | 0 .../amplify/backend.ts | 0 .../amplify/storage/resource.ts | 0 .../amplify/backend.ts | 0 .../amplify/data/lambda_authorizer.ts | 0 .../amplify/data/resource.ts | 0 .../amplify/backend.ts | 0 .../amplify/data/resource.ts | 0 ...BranchName-branch-7d6f6c854a.template.json | 352 ---- ...d6f6c854adataE67321C2.nested.template.json | 568 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...plifyDataTodo80505FFF.nested.template.json | 1235 ------------ ...BranchName-branch-7d6f6c854a.template.json | 579 ------ ...d6f6c854aauth473E022C.nested.template.json | 702 ------- ...d6f6c854adataE67321C2.nested.template.json | 639 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...irectiveStack93F75775.nested.template.json | 329 --- ...plifyDataTodo80505FFF.nested.template.json | 1404 ------------- ...c854afunctionDE2842E0.nested.template.json | 138 -- ...6c854astorage16B83955.nested.template.json | 17 - ...BranchName-branch-7d6f6c854a.template.json | 579 ------ ...d6f6c854aauth473E022C.nested.template.json | 702 ------- ...d6f6c854adataE67321C2.nested.template.json | 639 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...irectiveStack93F75775.nested.template.json | 329 --- ...plifyDataTodo80505FFF.nested.template.json | 1404 ------------- ...c854afunctionDE2842E0.nested.template.json | 138 -- ...6c854astorage16B83955.nested.template.json | 17 - ...BranchName-branch-7d6f6c854a.template.json | 582 ------ ...d6f6c854aauth473E022C.nested.template.json | 702 ------- ...d6f6c854adataE67321C2.nested.template.json | 660 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...irectiveStack93F75775.nested.template.json | 205 -- ...plifyDataTodo80505FFF.nested.template.json | 1792 ----------------- ...c854afunctionDE2842E0.nested.template.json | 138 -- ...6c854astorage16B83955.nested.template.json | 17 - ...BranchName-branch-7d6f6c854a.template.json | 312 --- ...6c854astorage16B83955.nested.template.json | 17 - ...BranchName-branch-7d6f6c854a.template.json | 391 ---- ...d6f6c854adataE67321C2.nested.template.json | 591 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...plifyDataTodo80505FFF.nested.template.json | 1488 -------------- ...c854afunctionDE2842E0.nested.template.json | 85 - ...BranchName-branch-7d6f6c854a.template.json | 352 ---- ...d6f6c854adataE67321C2.nested.template.json | 568 ------ ...yTableManagerA0EBF206.nested.template.json | 987 --------- ...plifyDataTodo80505FFF.nested.template.json | 1235 ------------ packages/integration-tests/tsconfig.json | 4 +- 93 files changed, 497 insertions(+), 28967 deletions(-) delete mode 100644 packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json delete mode 100644 packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json create mode 100644 packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts create mode 100644 packages/integration-tests/src/define_backend_template_harness.ts rename packages/integration-tests/{ => src}/test-projects/data-iterative-deploy/amplify/backend.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-iterative-deploy/amplify/data/resource.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-iterative-deploy/update-1/data/resource.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/backend.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/echo/handler.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/resource.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/func-src/handler.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/function.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/amplify/storage/resource.cjs (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-cjs/update-1/data/resource.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/backend.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/data/echo/handler.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js (94%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/func-src/handler.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/function.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/amplify/storage/resource.js (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-js/update-1/data/resource.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts (100%) create mode 100644 packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/data/echo/handler.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts (98%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/handler.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/response_generator.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/function.ts (100%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/amplify/storage/resource.ts (100%) rename packages/integration-tests/{test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts => src/test-projects/data-storage-auth-with-triggers-ts/amplify/test_factories.ts} (61%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts (98%) rename packages/integration-tests/{ => src}/test-projects/data-storage-auth-with-triggers-ts/update-1/function.ts (100%) rename packages/integration-tests/{ => src}/test-projects/minimalist-project-with-typescript-idioms/.eslintrc.json (100%) rename packages/integration-tests/{ => src}/test-projects/minimalist-project-with-typescript-idioms/amplify/backend.ts (100%) rename packages/integration-tests/{ => src}/test-projects/minimalist-project-with-typescript-idioms/amplify/storage/resource.ts (100%) rename packages/integration-tests/{ => src}/test-projects/standalone-data-auth-modes/amplify/backend.ts (100%) rename packages/integration-tests/{ => src}/test-projects/standalone-data-auth-modes/amplify/data/lambda_authorizer.ts (100%) rename packages/integration-tests/{ => src}/test-projects/standalone-data-auth-modes/amplify/data/resource.ts (100%) rename packages/integration-tests/{ => src}/test-projects/standalone-data-sandbox-mode/amplify/backend.ts (100%) rename packages/integration-tests/{ => src}/test-projects/standalone-data-sandbox-mode/amplify/data/resource.ts (100%) delete mode 100644 packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json delete mode 100644 packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json delete mode 100644 packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json delete mode 100644 packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json diff --git a/package-lock.json b/package-lock.json index f565fad4d4..0234104f83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21010,22 +21010,397 @@ "version": "0.3.7", "license": "Apache-2.0", "devDependencies": { - "@aws-amplify/backend": "0.5.5", - "@aws-amplify/backend-auth": "0.3.5", + "@aws-amplify/backend": "^0.5.5", "@aws-amplify/backend-secret": "^0.3.1", - "@aws-amplify/backend-storage": "0.3.1", "@aws-amplify/client-config": "^0.4.0", "@aws-amplify/data-schema": "^0.12.9", "@aws-amplify/platform-core": "^0.3.1", "@aws-sdk/client-amplify": "^3.440.0", "@aws-sdk/client-cloudformation": "^3.421.0", "@aws-sdk/client-lambda": "^3.460.0", + "aws-cdk-lib": "^2.112.0", + "constructs": "^10.3.0", "execa": "^8.0.1", "fs-extra": "^11.1.1", "glob": "^10.2.7", "uuid": "^9.0.1" } }, + "packages/integration-tests/node_modules/aws-cdk-lib": { + "version": "2.112.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.112.0.tgz", + "integrity": "sha512-nrxfXM05Lq6HRoOXdrGXcc1XqqJTtCW3EkjPqdT0kkZ+fR6yQgbzdW2nVxSBiVDNmcf82vLBTmFMezdEgj8N4w==", + "bundleDependencies": [ + "@balena/dockerignore", + "case", + "fs-extra", + "ignore", + "jsonschema", + "minimatch", + "punycode", + "semver", + "table", + "yaml" + ], + "dev": true, + "dependencies": { + "@aws-cdk/asset-awscli-v1": "^2.2.201", + "@aws-cdk/asset-kubectl-v20": "^2.1.2", + "@aws-cdk/asset-node-proxy-agent-v6": "^2.0.1", + "@balena/dockerignore": "^1.0.2", + "case": "1.6.3", + "fs-extra": "^11.1.1", + "ignore": "^5.3.0", + "jsonschema": "^1.4.1", + "minimatch": "^3.1.2", + "punycode": "^2.3.1", + "semver": "^7.5.4", + "table": "^6.8.1", + "yaml": "1.10.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "constructs": "^10.0.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "Apache-2.0" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/ajv": { + "version": "8.12.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/astral-regex": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/case": { + "version": "1.6.3", + "dev": true, + "inBundle": true, + "license": "(MIT OR GPL-3.0-or-later)", + "engines": { + "node": ">= 0.8.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/fs-extra": { + "version": "11.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/ignore": { + "version": "5.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/jsonfile": { + "version": "6.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/jsonschema": { + "version": "1.4.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/lodash.truncate": { + "version": "4.4.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/punycode": { + "version": "2.3.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/require-from-string": { + "version": "2.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/slice-ansi": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/table": { + "version": "6.8.1", + "dev": true, + "inBundle": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/universalify": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "packages/integration-tests/node_modules/aws-cdk-lib/node_modules/yaml": { + "version": "1.10.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "packages/integration-tests/node_modules/execa": { "version": "8.0.1", "dev": true, diff --git a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index b4338725ea..0000000000 --- a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,467 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::Auth": { - "version": "1", - "stackOutputs": [ - "userPoolId", - "webClientId", - "identityPoolId", - "authRegion", - "signupAttributes", - "usernameAttributes", - "verificationMechanisms", - "passwordPolicyMinLength", - "passwordPolicyRequirements" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncApiKey", - "awsAppsyncAdditionalAuthenticationTypes" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "userPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - } - }, - "webClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef" - ] - } - }, - "identityPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - } - }, - "authRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "signupAttributes": { - "Value": "[\"EMAIL\"]" - }, - "usernameAttributes": { - "Value": "[\"EMAIL\"]" - }, - "verificationMechanisms": { - "Value": "[\"EMAIL\"]" - }, - "passwordPolicyMinLength": { - "Value": "8" - }, - "passwordPolicyRequirements": { - "Value": "[\"REQUIRES_NUMBERS\",\"REQUIRES_LOWERCASE\",\"REQUIRES_UPPERCASE\",\"REQUIRES_SYMBOLS\"]" - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "API_KEY" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncApiKey": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey" - ] - } - }, - "awsAppsyncAdditionalAuthenticationTypes": { - "Value": "AMAZON_COGNITO_USER_POOLS,AWS_IAM" - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "auth179371D7": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/356837bc006efa614dd18d8e0821efb2f05db80aadc347e28db04bb2f6fe8bbd.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/2a0d1b7fb776ba17bf31c9284802781a25e434b93f98845b46620760e48fa284.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json b/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json deleted file mode 100644 index 39d341963d..0000000000 --- a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.4.2\",\"stackType\":\"auth-Cognito\",\"metadata\":{}}", - "Resources": { - "amplifyAuthUserPool4BA7F805": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_email", - "Priority": 1 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email" - ], - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "Policies": { - "PasswordPolicy": { - "MinimumLength": 8, - "RequireLowercase": true, - "RequireNumbers": true, - "RequireSymbols": true, - "RequireUppercase": true - } - }, - "Schema": [ - { - "Mutable": true, - "Name": "email", - "Required": true - } - ], - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserAttributeUpdateSettings": { - "AttributesRequireVerificationBeforeUpdate": [ - "email" - ] - }, - "UsernameAttributes": [ - "email" - ], - "UsernameConfiguration": { - "CaseSensitive": false - }, - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPoolAppClient2626C6F8": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ExplicitAuthFlows": [ - "ALLOW_CUSTOM_AUTH", - "ALLOW_USER_SRP_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "PreventUserExistenceErrors": "ENABLED", - "SupportedIdentityProviders": [ - "COGNITO" - ], - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthIdentityPool3FDE84CC": { - "Type": "AWS::Cognito::IdentityPool", - "Properties": { - "AllowUnauthenticatedIdentities": true, - "CognitoIdentityProviders": [ - { - "ClientId": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - }, - "ProviderName": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - } - ] - ] - } - } - ], - "SupportedLoginProviders": {} - } - }, - "amplifyAuthauthenticatedUserRoleD8DA3689": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "authenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthunauthenticatedUserRole2B524D9E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "unauthenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthIdentityPoolRoleAttachment045F17C8": { - "Type": "AWS::Cognito::IdentityPoolRoleAttachment", - "Properties": { - "IdentityPoolId": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - }, - "RoleMappings": { - "UserPoolWebClientRoleMapping": { - "AmbiguousRoleResolution": "AuthenticatedRole", - "IdentityProvider": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - }, - ":", - { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - ] - ] - }, - "Type": "Token" - } - }, - "Roles": { - "unauthenticated": { - "Fn::GetAtt": [ - "amplifyAuthunauthenticatedUserRole2B524D9E", - "Arn" - ] - }, - "authenticated": { - "Fn::GetAtt": [ - "amplifyAuthauthenticatedUserRoleD8DA3689", - "Arn" - ] - } - } - }, - "DependsOn": [ - "amplifyAuthIdentityPool3FDE84CC", - "amplifyAuthUserPoolAppClient2626C6F8" - ] - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Value": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef": { - "Value": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Value": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Value": { - "Ref": "amplifyAuthauthenticatedUserRoleD8DA3689" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Value": { - "Ref": "amplifyAuthunauthenticatedUserRole2B524D9E" - } - } - } -} \ No newline at end of file diff --git a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 1929590fd3..0000000000 --- a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,605 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", - "UserPoolConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "UserPoolId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - } - } - }, - { - "AuthenticationType": "AWS_IAM" - } - ], - "AuthenticationType": "API_KEY", - "Name": "amplifyData" - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b39fd31c4a79420ca1ff4200a963cc977a0b12fbb02c44b40eda180de8183fd0.graphql" - } - } - }, - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Expires": 1703878641 - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Description": "None Data Source for Pipeline functions", - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/7feef61ce2e7746b3d7700aa837fa419f347b204061c8e32f444e10623738309.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "0a5860b7296bf341e26cca1977394af5a65f8ddbb2cc0b6ab0268289b6e9857f.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374", - "ApiKey" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index c6b93f8d9a..0000000000 --- a/packages/create-amplify/templates/basic-auth-data/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1792 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodopreAuth0FunctionQuerygetTodopreAuth0FunctionAppSyncFunctionFFFAAF80": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ffc597e18023b530e6afcbe02cee647d49550fa9e77bd06f1dee09d8b1be8de3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerygetTodoauth0FunctionQuerygetTodoauth0FunctionAppSyncFunction846D8436": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c8554262032d48d7b24789ed5e30f74e49b3f8833934c8e7620338f481d32f5a.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodopreAuth0FunctionQuerygetTodopreAuth0FunctionAppSyncFunctionFFFAAF80", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerygetTodoauth0FunctionQuerygetTodoauth0FunctionAppSyncFunction846D8436", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodospreAuth0FunctionQuerylistTodospreAuth0FunctionAppSyncFunctionD066FA43": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3e81312d4c75951808eda9fcd5f854c1925c0b819de0939f09c4fe2eebb190b8.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerylistTodosauth0FunctionQuerylistTodosauth0FunctionAppSyncFunction7D761961": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodosauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c8554262032d48d7b24789ed5e30f74e49b3f8833934c8e7620338f481d32f5a.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodospreAuth0FunctionQuerylistTodospreAuth0FunctionAppSyncFunctionD066FA43", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerylistTodosauth0FunctionQuerylistTodosauth0FunctionAppSyncFunction7D761961", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopreAuth0FunctionMutationcreateTodopreAuth0FunctionAppSyncFunctionFE4AC834": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/39fb35c6f8e8573ffe3a63ba867cf543b05af129a104b387a44f03c3d85da0c3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodoauth0FunctionMutationcreateTodoauth0FunctionAppSyncFunction21817E36": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/773f9e40e8b520aa559c92cdb4c2c4a49263b668c0003119ec1ce5211ca59a46.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopreAuth0FunctionMutationcreateTodopreAuth0FunctionAppSyncFunctionFE4AC834", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodoauth0FunctionMutationcreateTodoauth0FunctionAppSyncFunction21817E36", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodopreAuth0FunctionMutationupdateTodopreAuth0FunctionAppSyncFunction08B1C77D": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/39fb35c6f8e8573ffe3a63ba867cf543b05af129a104b387a44f03c3d85da0c3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodoauth0FunctionMutationupdateTodoauth0FunctionAppSyncFunction1E4A3112": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/82043c68ff1436a022343246f58f8d2129ff8c42d642a414f80c550f9ce2d190.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopreAuth0FunctionMutationupdateTodopreAuth0FunctionAppSyncFunction08B1C77D", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodoauth0FunctionMutationupdateTodoauth0FunctionAppSyncFunction1E4A3112", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodopreAuth0FunctionMutationdeleteTodopreAuth0FunctionAppSyncFunctionDA33468D": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a2c0f8a4d76f659d130c8a445801845ae9d33e5cc2c5ecd610edc272d4bd46e3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationdeleteTodoauth0FunctionMutationdeleteTodoauth0FunctionAppSyncFunctionC82C218C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dc9f72eafda6162358e483de942e41fc08ef05c4352f3ce973f2ddcbf06a5e9c.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodopreAuth0FunctionMutationdeleteTodopreAuth0FunctionAppSyncFunctionDA33468D", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationdeleteTodoauth0FunctionMutationdeleteTodoauth0FunctionAppSyncFunctionC82C218C", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodoauth0FunctionSubscriptiononCreateTodoauth0FunctionAppSyncFunction042EF9E1": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc09f231b2c0455c75ad0ff63f6274482a2a34ac85e6db90e1df25d1deb11860.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodoauth0FunctionSubscriptiononCreateTodoauth0FunctionAppSyncFunction042EF9E1", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodoauth0FunctionSubscriptiononUpdateTodoauth0FunctionAppSyncFunction80D0DFA3": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc09f231b2c0455c75ad0ff63f6274482a2a34ac85e6db90e1df25d1deb11860.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodoauth0FunctionSubscriptiononUpdateTodoauth0FunctionAppSyncFunction80D0DFA3", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodoauth0FunctionSubscriptiononDeleteTodoauth0FunctionAppSyncFunctionF69F2220": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc09f231b2c0455c75ad0ff63f6274482a2a34ac85e6db90e1df25d1deb11860.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodoauth0FunctionSubscriptiononDeleteTodoauth0FunctionAppSyncFunctionF69F2220", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "TodoOwnerDataResolverFnTodoOwnerDataResolverFnAppSyncFunction0C7BF45B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "TodoOwnerDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/041534e5fd916595f752318f161512d7c7f83b9f2cf32d0f0be381c12253ff68.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/064303962e481067b44300212516363b99aaee539b6bafaf756fdd83ff0b60f0.vtl" - } - } - }, - "TodoownerResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "owner", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "TodoOwnerDataResolverFnTodoOwnerDataResolverFnAppSyncFunction0C7BF45B", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Todo" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts b/packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts new file mode 100644 index 0000000000..73b68fb684 --- /dev/null +++ b/packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts @@ -0,0 +1,7 @@ +import { auth } from './amplify/auth/resource.js'; +import { data } from './amplify/data/resource.js'; + +export const basicAuthDataFactories = { + auth, + data, +}; diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 07cc221c66..1b33e04229 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -4,16 +4,16 @@ "version": "0.3.7", "type": "module", "devDependencies": { - "@aws-amplify/backend": "0.5.5", - "@aws-amplify/backend-auth": "0.3.5", + "@aws-amplify/backend": "^0.5.5", "@aws-amplify/backend-secret": "^0.3.1", - "@aws-amplify/backend-storage": "0.3.1", "@aws-amplify/client-config": "^0.4.0", "@aws-amplify/data-schema": "^0.12.9", "@aws-amplify/platform-core": "^0.3.1", "@aws-sdk/client-amplify": "^3.440.0", "@aws-sdk/client-cloudformation": "^3.421.0", "@aws-sdk/client-lambda": "^3.460.0", + "aws-cdk-lib": "^2.112.0", + "constructs": "^10.3.0", "execa": "^8.0.1", "fs-extra": "^11.1.1", "glob": "^10.2.7", diff --git a/packages/integration-tests/src/define_backend_template_harness.ts b/packages/integration-tests/src/define_backend_template_harness.ts new file mode 100644 index 0000000000..fb101dc577 --- /dev/null +++ b/packages/integration-tests/src/define_backend_template_harness.ts @@ -0,0 +1,60 @@ +import { Template } from 'aws-cdk-lib/assertions'; +import assert from 'node:assert'; +import { CDKContextKey } from '@aws-amplify/platform-core'; +import { defineBackend } from '@aws-amplify/backend'; +import { Stack } from 'aws-cdk-lib'; +import { ConstructFactory } from '@aws-amplify/plugin-types'; +import { Construct } from 'constructs'; + +/** + * Asserts that the provided template has resources of 'resourceType' with the expected logical IDs + */ +export const assertStableLogicalIds = ( + template: Template, + resourceType: string, + expectedLogicalIds: string[] +) => { + const resources = template.findResources(resourceType); + assert.deepStrictEqual( + Object.keys(resources).sort(), + expectedLogicalIds.sort() + ); +}; + +/** + * Wrapper around `defineBackend` that returns the CDK Stack of each backend resource + */ +export const defineBackendTemplateHarness: DefineBackendStackHarness = < + T extends Record> +>( + constructFactories: T +) => { + process.env.CDK_CONTEXT_JSON = JSON.stringify({ + [CDKContextKey.BACKEND_NAMESPACE]: 'testAppId', + [CDKContextKey.BACKEND_NAME]: 'testBranchName', + [CDKContextKey.DEPLOYMENT_TYPE]: 'branch', + secretLastUpdated: 123456789, + }); + if (Object.keys(constructFactories).length === 0) { + throw new Error('constructFactories must have at least one entry'); + } + const backend = defineBackend(constructFactories); + const result = { + // need to go up two levels to get the root stack + root: Template.fromStack( + Stack.of(backend.resources[Object.keys(constructFactories)[0]]).node + .scope as Stack + ), + } as Partial<{ [K in keyof T]: Template }> & { root: Template }; + + for (const [name, construct] of Object.entries(backend.resources)) { + result[name as keyof T] = Template.fromStack(Stack.of(construct)) as never; // TS can't figure out which "K in keyof T" "name" corresponds to here but this assignment is safe + } + return result as { [K in keyof T]: Template } & { root: Template }; +}; + +type DefineBackendStackHarness = < + T extends Record> +>( + constructFactories: T +) => { [K in keyof T]: Template } & { root: Template }; diff --git a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts index 15a99d4914..daae73c73f 100644 --- a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts +++ b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts @@ -1,10 +1,34 @@ -import { runCDKSnapshotTestSuite } from '../cdk_snapshot_test_runner.js'; -import { fromConventionalDir } from '../cdk_snapshot_test_suite_generator.js'; -import * as path from 'path'; - -runCDKSnapshotTestSuite( - 'CDK snapshot tests', - fromConventionalDir(path.join('..', 'test-projects')).concat( - fromConventionalDir(path.join('..', '..', 'create-amplify', 'templates')) - ) -); +import { dataStorageAuthWithTriggers } from '../test-projects/data-storage-auth-with-triggers-ts/amplify/test_factories.js'; +import { + assertStableLogicalIds, + defineBackendTemplateHarness, +} from '../define_backend_template_harness.js'; +import { it } from 'node:test'; + +void it('data storage auth with triggers', () => { + const templates = defineBackendTemplateHarness(dataStorageAuthWithTriggers); + + assertStableLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ + 'auth179371D7', + 'data7552DF31', + 'function1351588B', + 'storage0EC3F24A', + ]); + + assertStableLogicalIds(templates.auth, 'AWS::Cognito::UserPool', [ + 'amplifyAuthUserPool4BA7F805', + ]); + + assertStableLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ + 'amplifyDataGraphQLAPI42A6FA33', + ]); + assertStableLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ + 'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833', + 'amplifyDataFunctionDirectiveStackNestedStackFunctionDirectiveStackNestedStackResource1246A302', + 'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56', + ]); + + assertStableLogicalIds(templates.storage, 'AWS::S3::Bucket', [ + 'amplifyStorageamplifyStorageBucketC2F702CD', + ]); +}); diff --git a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts index b5d19abe61..772c1d9ed8 100644 --- a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts +++ b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts @@ -64,7 +64,7 @@ export class DataStorageAuthWithTriggerTestProjectCreator */ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { readonly sourceProjectDirPath = - '../../test-projects/data-storage-auth-with-triggers-ts'; + '../test-projects/data-storage-auth-with-triggers-ts'; readonly sourceProjectAmplifyDirSuffix = `${this.sourceProjectDirPath}/amplify`; diff --git a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts index 9bd54c450d..b017f812b7 100644 --- a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts +++ b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts @@ -43,7 +43,7 @@ export class MinimalWithTypescriptIdiomTestProjectCreator */ class MinimalWithTypescriptIdiomTestProject extends TestProjectBase { readonly sourceProjectDirPath = - '../../test-projects/minimalist-project-with-typescript-idioms'; + '../test-projects/minimalist-project-with-typescript-idioms'; readonly sourceProjectAmplifyDirSuffix = `${this.sourceProjectDirPath}/amplify`; diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/amplify/backend.ts b/packages/integration-tests/src/test-projects/data-iterative-deploy/amplify/backend.ts similarity index 100% rename from packages/integration-tests/test-projects/data-iterative-deploy/amplify/backend.ts rename to packages/integration-tests/src/test-projects/data-iterative-deploy/amplify/backend.ts diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/amplify/data/resource.ts b/packages/integration-tests/src/test-projects/data-iterative-deploy/amplify/data/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/data-iterative-deploy/amplify/data/resource.ts rename to packages/integration-tests/src/test-projects/data-iterative-deploy/amplify/data/resource.ts diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/update-1/data/resource.ts b/packages/integration-tests/src/test-projects/data-iterative-deploy/update-1/data/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/data-iterative-deploy/update-1/data/resource.ts rename to packages/integration-tests/src/test-projects/data-iterative-deploy/update-1/data/resource.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/backend.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/backend.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/backend.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/backend.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/echo/handler.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/echo/handler.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/echo/handler.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/echo/handler.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/resource.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/resource.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/resource.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/data/resource.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/func-src/handler.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/func-src/handler.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/func-src/handler.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/func-src/handler.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/function.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/function.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/function.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/function.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/storage/resource.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/storage/resource.cjs similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/amplify/storage/resource.cjs rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/storage/resource.cjs diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/update-1/data/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/update-1/data/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/update-1/data/resource.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/update-1/data/resource.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/backend.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/backend.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/backend.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/backend.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/data/echo/handler.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/data/echo/handler.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/data/echo/handler.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/data/echo/handler.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js similarity index 94% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js index 3bf17f3578..f0ac050853 100644 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/data/resource.js @@ -1,5 +1,5 @@ import { defineData, defineFunction } from '@aws-amplify/backend'; -import { myFunc } from '../function'; +import { myFunc } from '../function.js'; const schema = ` input AMPLIFY {globalAuthRule: AuthRule = { allow: public }} # FOR TESTING ONLY! diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/func-src/handler.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/func-src/handler.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/func-src/handler.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/func-src/handler.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/function.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/function.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/function.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/function.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/storage/resource.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/storage/resource.js similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/amplify/storage/resource.js rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/storage/resource.js diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/update-1/data/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/update-1/data/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/update-1/data/resource.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/update-1/data/resource.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts new file mode 100644 index 0000000000..60b8dd899d --- /dev/null +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts @@ -0,0 +1,4 @@ +import { defineBackend } from '@aws-amplify/backend'; +import { dataStorageAuthWithTriggers } from './test_factories.js'; + +defineBackend(dataStorageAuthWithTriggers); diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/data/echo/handler.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/echo/handler.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/data/echo/handler.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/echo/handler.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts similarity index 98% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts index d0edc17f27..021353062a 100644 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts @@ -26,7 +26,7 @@ const schema = a.schema({ .returns(a.ref('EchoResponse')) .authorization([a.allow.private()]) .function('echo'), -}); +}) as never; export type Schema = ClientSchema; diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/handler.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/handler.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/handler.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/handler.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/response_generator.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/response_generator.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/response_generator.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/func-src/response_generator.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/function.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/function.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/function.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/function.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/storage/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/storage/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/storage/resource.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/storage/resource.ts diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/test_factories.ts similarity index 61% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/test_factories.ts index 3f02f903a7..8dca71ff5c 100644 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/amplify/backend.ts +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/test_factories.ts @@ -1,12 +1,6 @@ -import { defineBackend } from '@aws-amplify/backend'; -import { auth } from './auth/resource.js'; -import { storage } from './storage/resource.js'; -import { myFunc } from './function.js'; import { data } from './data/resource.js'; +import { myFunc } from './function.js'; +import { storage } from './storage/resource.js'; +import { auth } from './auth/resource.js'; -defineBackend({ - auth, - storage, - myFunc, - data, -}); +export const dataStorageAuthWithTriggers = { auth, storage, myFunc, data }; diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts similarity index 98% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts index ea8523c5f4..a340423032 100644 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts @@ -26,7 +26,7 @@ const schema = a.schema({ .returns(a.ref('EchoResponse')) .authorization([a.allow.private()]) .function('echo'), -}); +}) as never; export type Schema = ClientSchema; diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/update-1/function.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/function.ts similarity index 100% rename from packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/update-1/function.ts rename to packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/function.ts diff --git a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/.eslintrc.json b/packages/integration-tests/src/test-projects/minimalist-project-with-typescript-idioms/.eslintrc.json similarity index 100% rename from packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/.eslintrc.json rename to packages/integration-tests/src/test-projects/minimalist-project-with-typescript-idioms/.eslintrc.json diff --git a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/amplify/backend.ts b/packages/integration-tests/src/test-projects/minimalist-project-with-typescript-idioms/amplify/backend.ts similarity index 100% rename from packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/amplify/backend.ts rename to packages/integration-tests/src/test-projects/minimalist-project-with-typescript-idioms/amplify/backend.ts diff --git a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/amplify/storage/resource.ts b/packages/integration-tests/src/test-projects/minimalist-project-with-typescript-idioms/amplify/storage/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/amplify/storage/resource.ts rename to packages/integration-tests/src/test-projects/minimalist-project-with-typescript-idioms/amplify/storage/resource.ts diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/amplify/backend.ts b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/backend.ts similarity index 100% rename from packages/integration-tests/test-projects/standalone-data-auth-modes/amplify/backend.ts rename to packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/backend.ts diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/amplify/data/lambda_authorizer.ts b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/data/lambda_authorizer.ts similarity index 100% rename from packages/integration-tests/test-projects/standalone-data-auth-modes/amplify/data/lambda_authorizer.ts rename to packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/data/lambda_authorizer.ts diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/amplify/data/resource.ts b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/data/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/standalone-data-auth-modes/amplify/data/resource.ts rename to packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/data/resource.ts diff --git a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/amplify/backend.ts b/packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/backend.ts similarity index 100% rename from packages/integration-tests/test-projects/standalone-data-sandbox-mode/amplify/backend.ts rename to packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/backend.ts diff --git a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/amplify/data/resource.ts b/packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/data/resource.ts similarity index 100% rename from packages/integration-tests/test-projects/standalone-data-sandbox-mode/amplify/data/resource.ts rename to packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/data/resource.ts diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index e9560a8602..0000000000 --- a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncApiKey" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "API_KEY" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncApiKey": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey" - ] - } - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/553ca6a57a97283020aca125028d777d295440a941623084927d281faea59446.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 016121d042..0000000000 --- a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,568 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "amplifyData" - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a8641fe7f3d1b191af1863ef36013258b1bfc2dd6925fd5e96a4d7e4da8ff397.graphql" - } - } - }, - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Expires": 1701891434 - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Description": "None Data Source for Pipeline functions", - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/b2592dc0925350164d369b9756628f4e37c379d41cabf3012d22754ae7b343f8.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "91ec9b176ef4ddf3162a347d9075f0dbbf1a7f1202ef2890ba030f5f1c1438a5.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374", - "ApiKey" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index a36d4b3125..0000000000 --- a/packages/integration-tests/test-projects/data-iterative-deploy/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1235 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index 9def60df8d..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,579 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::Auth": { - "version": "1", - "stackOutputs": [ - "userPoolId", - "webClientId", - "identityPoolId", - "authRegion", - "signupAttributes", - "usernameAttributes", - "verificationMechanisms", - "passwordPolicyMinLength", - "passwordPolicyRequirements", - "amazonClientId", - "facebookClientId", - "googleClientId" - ] - }, - "AWS::Amplify::Storage": { - "version": "1", - "stackOutputs": [ - "storageRegion", - "bucketName" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncAdditionalAuthenticationTypes" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "userPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - } - }, - "webClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef" - ] - } - }, - "identityPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - } - }, - "authRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "signupAttributes": { - "Value": "[\"EMAIL\"]" - }, - "usernameAttributes": { - "Value": "[\"EMAIL\"]" - }, - "verificationMechanisms": { - "Value": "[\"EMAIL\"]" - }, - "passwordPolicyMinLength": { - "Value": "8" - }, - "passwordPolicyRequirements": { - "Value": "[\"REQUIRES_NUMBERS\",\"REQUIRES_LOWERCASE\",\"REQUIRES_UPPERCASE\",\"REQUIRES_SYMBOLS\"]" - }, - "amazonClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestAmazonIdSecretFetcherResource622F9AC3secretValue" - ] - } - }, - "facebookClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestFacebookIdSecretFetcherResource589F3C68secretValue" - ] - } - }, - "googleClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestGoogleIdSecretFetcherResource4E726239secretValue" - ] - } - }, - "storageRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "bucketName": { - "Value": { - "Fn::GetAtt": [ - "storage0EC3F24A", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref" - ] - } - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "AMAZON_COGNITO_USER_POOLS" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncAdditionalAuthenticationTypes": { - "Value": "AWS_IAM" - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "auth179371D7": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/601efeefc2f118029b329879a8fe6e995a9c76c75e5ee99588f1b68113b5436f.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "function1351588B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0fbde414ebb3daeaffe0b031f48a97af5b1b5a8e4a7c66e884bbed5962311d38.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "storage0EC3F24A": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0d605cfcd689fb8650f00f193ce7572a75b06a8ccfaebc550876e3be9e352075.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/38d65f8333e6b54dd31e1d08c25bfacf5d46103d4d3968f5cc433339bb5213a3.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json deleted file mode 100644 index 100298eab8..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json +++ /dev/null @@ -1,702 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.4.2\",\"stackType\":\"auth-Cognito\",\"metadata\":{}}", - "Resources": { - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ssm:GetParameter", - "Effect": "Allow", - "Resource": [ - "arn:aws:ssm:*:*:parameter/amplify/testAppId/testBranchName/*", - "arn:aws:ssm:*:*:parameter/amplify/shared/testAppId/*" - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB", - "Roles": [ - { - "Ref": "SecretFetcherResourceProviderLambdaServiceRole5ABAF823" - } - ] - } - }, - "SecretFetcherResourceProviderLambda1ECC380E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5c10bf1d77712f6097fda6d4dfbef61117ecd7e2b383263167287cc2802f7cc5.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB", - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823" - ] - }, - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916", - "Roles": [ - { - "Ref": "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041" - } - ] - } - }, - "SecretFetcherResourceProviderframeworkonEvent960CF056": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/auth/SecretFetcherResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916", - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041" - ] - }, - "testAmazonIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testAmazonId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testAmazonSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testAmazonSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testFacebookIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testFacebookId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testFacebookSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testFacebookSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testGoogleIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testGoogleId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testGoogleSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testGoogleSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPool4BA7F805": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_email", - "Priority": 1 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email" - ], - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "LambdaConfig": { - "PostConfirmation": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - } - }, - "Policies": { - "PasswordPolicy": { - "MinimumLength": 8, - "RequireLowercase": true, - "RequireNumbers": true, - "RequireSymbols": true, - "RequireUppercase": true - } - }, - "Schema": [ - { - "Mutable": true, - "Name": "email", - "Required": true - } - ], - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserAttributeUpdateSettings": { - "AttributesRequireVerificationBeforeUpdate": [ - "email" - ] - }, - "UsernameAttributes": [ - "email" - ], - "UsernameConfiguration": { - "CaseSensitive": false - }, - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPoolPostConfirmationCognitoE7E727CF": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "amplifyAuthUserPool4BA7F805", - "Arn" - ] - } - } - }, - "amplifyAuthGoogleIdPA9736819": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testGoogleSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "profile" - }, - "ProviderName": "Google", - "ProviderType": "Google", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthFacebookIDP7CB5B5CC": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testFacebookSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "public_profile" - }, - "ProviderName": "Facebook", - "ProviderType": "Facebook", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthAmazonIDP72414901": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testAmazonSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "profile" - }, - "ProviderName": "LoginWithAmazon", - "ProviderType": "LoginWithAmazon", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthUserPoolAppClient2626C6F8": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ExplicitAuthFlows": [ - "ALLOW_CUSTOM_AUTH", - "ALLOW_USER_SRP_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "PreventUserExistenceErrors": "ENABLED", - "SupportedIdentityProviders": [ - { - "Ref": "amplifyAuthGoogleIdPA9736819" - }, - { - "Ref": "amplifyAuthFacebookIDP7CB5B5CC" - }, - { - "Ref": "amplifyAuthAmazonIDP72414901" - }, - "COGNITO" - ], - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthIdentityPool3FDE84CC": { - "Type": "AWS::Cognito::IdentityPool", - "Properties": { - "AllowUnauthenticatedIdentities": true, - "CognitoIdentityProviders": [ - { - "ClientId": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - }, - "ProviderName": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - } - ] - ] - } - } - ], - "SupportedLoginProviders": { - "accounts.google.com": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - }, - "graph.facebook.com": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - }, - "www.amazon.com": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - } - } - } - }, - "amplifyAuthauthenticatedUserRoleD8DA3689": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "authenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthunauthenticatedUserRole2B524D9E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "unauthenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthIdentityPoolRoleAttachment045F17C8": { - "Type": "AWS::Cognito::IdentityPoolRoleAttachment", - "Properties": { - "IdentityPoolId": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - }, - "RoleMappings": { - "UserPoolWebClientRoleMapping": { - "AmbiguousRoleResolution": "AuthenticatedRole", - "IdentityProvider": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - }, - ":", - { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - ] - ] - }, - "Type": "Token" - } - }, - "Roles": { - "unauthenticated": { - "Fn::GetAtt": [ - "amplifyAuthunauthenticatedUserRole2B524D9E", - "Arn" - ] - }, - "authenticated": { - "Fn::GetAtt": [ - "amplifyAuthauthenticatedUserRoleD8DA3689", - "Arn" - ] - } - } - }, - "DependsOn": [ - "amplifyAuthIdentityPool3FDE84CC", - "amplifyAuthUserPoolAppClient2626C6F8" - ] - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Value": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef": { - "Value": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Value": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestAmazonIdSecretFetcherResource622F9AC3secretValue": { - "Value": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestFacebookIdSecretFetcherResource589F3C68secretValue": { - "Value": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestGoogleIdSecretFetcherResource4E726239secretValue": { - "Value": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Value": { - "Ref": "amplifyAuthauthenticatedUserRoleD8DA3689" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Value": { - "Ref": "amplifyAuthunauthenticatedUserRole2B524D9E" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 729291545d..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,639 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "AWS_IAM" - } - ], - "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", - "Name": "amplifyData", - "UserPoolConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "DefaultAction": "ALLOW", - "UserPoolId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - } - } - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/99a0121692ae701057e9e5fcd49e1757dda243cbc15f92ce512cc25186665ce5.graphql" - } - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Description": "None Data Source for Pipeline functions", - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/4a79ad097bd6f9650cd9e1d0f0fedf6ae9a46465c9f718f30fbed3e2fc459709.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataFunctionDirectiveStackNestedStackFunctionDirectiveStackNestedStackResource1246A302": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0848bc21a07a9344b4254cf3c2499684d7ae926068bb57f946e7ce996d0e4d0b.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "f7466b40815188839731e7f77595dc9bb8b31e0da6b425153a60cd67de6a1d2f.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json deleted file mode 100644 index 15e925d2cc..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "Description": "An auto-generated nested stack for the @function directive.", - "AWSTemplateFormatVersion": "2010-09-09", - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - } - }, - "Resources": { - "ReverseLambdaDataSourceServiceRole00B33311": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ReverseLambdaDataSourceServiceRoleDefaultPolicy95B7B4C5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ReverseLambdaDataSourceServiceRoleDefaultPolicy95B7B4C5", - "Roles": [ - { - "Ref": "ReverseLambdaDataSourceServiceRole00B33311" - } - ] - } - }, - "ReverseLambdaDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "LambdaConfig": { - "LambdaFunctionArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - } - }, - "Name": "ReverseLambdaDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ReverseLambdaDataSourceServiceRole00B33311", - "Arn" - ] - }, - "Type": "AWS_LAMBDA" - } - }, - "InvokeReverseLambdaDataSourceInvokeReverseLambdaDataSourceAppSyncFunction33B5050E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "ReverseLambdaDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "InvokeReverseLambdaDataSource", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/13a81290d6590d9690e9554414eabeeec87d5c3a89b87edc539a74066a7b6ef7.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/43c39d3f3064d951a274ad91ec62cc12e1c8dab308d0dfa845e4de9f0a874e57.vtl" - } - }, - "DependsOn": [ - "ReverseLambdaDataSource" - ] - }, - "TodoreverseResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "reverse", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "InvokeReverseLambdaDataSourceInvokeReverseLambdaDataSourceAppSyncFunction33B5050E", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"reverse\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n{}\n## [End] Stash resolver specific context.. **" - ] - ] - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" - }, - "TypeName": "Todo" - } - }, - "EchoLambdaDataSourceServiceRole8AE16971": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "EchoLambdaDataSourceServiceRoleDefaultPolicy2D1931E3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EchoLambdaDataSourceServiceRoleDefaultPolicy2D1931E3", - "Roles": [ - { - "Ref": "EchoLambdaDataSourceServiceRole8AE16971" - } - ] - } - }, - "EchoLambdaDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "LambdaConfig": { - "LambdaFunctionArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - } - }, - "Name": "EchoLambdaDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "EchoLambdaDataSourceServiceRole8AE16971", - "Arn" - ] - }, - "Type": "AWS_LAMBDA" - } - }, - "InvokeEchoLambdaDataSourceInvokeEchoLambdaDataSourceAppSyncFunctionC9EAF3A4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "EchoLambdaDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "InvokeEchoLambdaDataSource", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fdc9106f27e773d1662806a27e986f51094bf3afe68c82138bb1dba7fb7772eb.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/43c39d3f3064d951a274ad91ec62cc12e1c8dab308d0dfa845e4de9f0a874e57.vtl" - } - }, - "DependsOn": [ - "EchoLambdaDataSource" - ] - }, - "TodoechoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "echo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "InvokeEchoLambdaDataSourceInvokeEchoLambdaDataSourceAppSyncFunctionC9EAF3A4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"echo\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n{}\n## [End] Stash resolver specific context.. **" - ] - ] - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" - }, - "TypeName": "Todo" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Type": "String" - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index 3da94b2e7d..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1404 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json deleted file mode 100644 index acfde71c9e..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "Resources": { - "handlerlambdaServiceRole46D7AF61": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "handlerlambdaE29D1580": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "6affc7e3567ce94c11b3c71fb1bc09a11e1804ba57a291c7eab4b9c9d4b82e80.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "handlerlambdaServiceRole46D7AF61", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "handlerlambdaServiceRole46D7AF61" - ] - }, - "echoFunclambdaServiceRoleF37965D7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "echoFunclambdaE17DCA46": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3432360d5f85e129a10ef49dc990538a80a6347de86143eb4e1cce2529f7145a.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "echoFunclambdaServiceRoleF37965D7", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "echoFunclambdaServiceRoleF37965D7" - ] - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Value": { - "Fn::GetAtt": [ - "handlerlambdaE29D1580", - "Arn" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Value": { - "Fn::GetAtt": [ - "echoFunclambdaE17DCA46", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json deleted file mode 100644 index 194423b7e3..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-cjs/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.2.3\",\"stackType\":\"storage-S3\",\"metadata\":{}}", - "Resources": { - "amplifyStorageamplifyStorageBucketC2F702CD": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref": { - "Value": { - "Ref": "amplifyStorageamplifyStorageBucketC2F702CD" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index d785da1235..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,579 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::Auth": { - "version": "1", - "stackOutputs": [ - "userPoolId", - "webClientId", - "identityPoolId", - "authRegion", - "signupAttributes", - "usernameAttributes", - "verificationMechanisms", - "passwordPolicyMinLength", - "passwordPolicyRequirements", - "amazonClientId", - "facebookClientId", - "googleClientId" - ] - }, - "AWS::Amplify::Storage": { - "version": "1", - "stackOutputs": [ - "storageRegion", - "bucketName" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncAdditionalAuthenticationTypes" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "userPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - } - }, - "webClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef" - ] - } - }, - "identityPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - } - }, - "authRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "signupAttributes": { - "Value": "[\"EMAIL\"]" - }, - "usernameAttributes": { - "Value": "[\"EMAIL\"]" - }, - "verificationMechanisms": { - "Value": "[\"EMAIL\"]" - }, - "passwordPolicyMinLength": { - "Value": "8" - }, - "passwordPolicyRequirements": { - "Value": "[\"REQUIRES_NUMBERS\",\"REQUIRES_LOWERCASE\",\"REQUIRES_UPPERCASE\",\"REQUIRES_SYMBOLS\"]" - }, - "amazonClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestAmazonIdSecretFetcherResource622F9AC3secretValue" - ] - } - }, - "facebookClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestFacebookIdSecretFetcherResource589F3C68secretValue" - ] - } - }, - "googleClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestGoogleIdSecretFetcherResource4E726239secretValue" - ] - } - }, - "storageRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "bucketName": { - "Value": { - "Fn::GetAtt": [ - "storage0EC3F24A", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref" - ] - } - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "AMAZON_COGNITO_USER_POOLS" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncAdditionalAuthenticationTypes": { - "Value": "AWS_IAM" - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "auth179371D7": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/601efeefc2f118029b329879a8fe6e995a9c76c75e5ee99588f1b68113b5436f.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "function1351588B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/88b7b9e3302285f902b495ec40076afd46e24597fd162e22388db86e33f56c22.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "storage0EC3F24A": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0d605cfcd689fb8650f00f193ce7572a75b06a8ccfaebc550876e3be9e352075.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/38d65f8333e6b54dd31e1d08c25bfacf5d46103d4d3968f5cc433339bb5213a3.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json deleted file mode 100644 index 100298eab8..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json +++ /dev/null @@ -1,702 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.4.2\",\"stackType\":\"auth-Cognito\",\"metadata\":{}}", - "Resources": { - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ssm:GetParameter", - "Effect": "Allow", - "Resource": [ - "arn:aws:ssm:*:*:parameter/amplify/testAppId/testBranchName/*", - "arn:aws:ssm:*:*:parameter/amplify/shared/testAppId/*" - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB", - "Roles": [ - { - "Ref": "SecretFetcherResourceProviderLambdaServiceRole5ABAF823" - } - ] - } - }, - "SecretFetcherResourceProviderLambda1ECC380E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5c10bf1d77712f6097fda6d4dfbef61117ecd7e2b383263167287cc2802f7cc5.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB", - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823" - ] - }, - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916", - "Roles": [ - { - "Ref": "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041" - } - ] - } - }, - "SecretFetcherResourceProviderframeworkonEvent960CF056": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/auth/SecretFetcherResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916", - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041" - ] - }, - "testAmazonIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testAmazonId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testAmazonSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testAmazonSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testFacebookIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testFacebookId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testFacebookSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testFacebookSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testGoogleIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testGoogleId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testGoogleSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testGoogleSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPool4BA7F805": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_email", - "Priority": 1 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email" - ], - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "LambdaConfig": { - "PostConfirmation": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - } - }, - "Policies": { - "PasswordPolicy": { - "MinimumLength": 8, - "RequireLowercase": true, - "RequireNumbers": true, - "RequireSymbols": true, - "RequireUppercase": true - } - }, - "Schema": [ - { - "Mutable": true, - "Name": "email", - "Required": true - } - ], - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserAttributeUpdateSettings": { - "AttributesRequireVerificationBeforeUpdate": [ - "email" - ] - }, - "UsernameAttributes": [ - "email" - ], - "UsernameConfiguration": { - "CaseSensitive": false - }, - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPoolPostConfirmationCognitoE7E727CF": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "amplifyAuthUserPool4BA7F805", - "Arn" - ] - } - } - }, - "amplifyAuthGoogleIdPA9736819": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testGoogleSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "profile" - }, - "ProviderName": "Google", - "ProviderType": "Google", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthFacebookIDP7CB5B5CC": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testFacebookSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "public_profile" - }, - "ProviderName": "Facebook", - "ProviderType": "Facebook", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthAmazonIDP72414901": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testAmazonSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "profile" - }, - "ProviderName": "LoginWithAmazon", - "ProviderType": "LoginWithAmazon", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthUserPoolAppClient2626C6F8": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ExplicitAuthFlows": [ - "ALLOW_CUSTOM_AUTH", - "ALLOW_USER_SRP_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "PreventUserExistenceErrors": "ENABLED", - "SupportedIdentityProviders": [ - { - "Ref": "amplifyAuthGoogleIdPA9736819" - }, - { - "Ref": "amplifyAuthFacebookIDP7CB5B5CC" - }, - { - "Ref": "amplifyAuthAmazonIDP72414901" - }, - "COGNITO" - ], - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthIdentityPool3FDE84CC": { - "Type": "AWS::Cognito::IdentityPool", - "Properties": { - "AllowUnauthenticatedIdentities": true, - "CognitoIdentityProviders": [ - { - "ClientId": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - }, - "ProviderName": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - } - ] - ] - } - } - ], - "SupportedLoginProviders": { - "accounts.google.com": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - }, - "graph.facebook.com": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - }, - "www.amazon.com": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - } - } - } - }, - "amplifyAuthauthenticatedUserRoleD8DA3689": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "authenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthunauthenticatedUserRole2B524D9E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "unauthenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthIdentityPoolRoleAttachment045F17C8": { - "Type": "AWS::Cognito::IdentityPoolRoleAttachment", - "Properties": { - "IdentityPoolId": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - }, - "RoleMappings": { - "UserPoolWebClientRoleMapping": { - "AmbiguousRoleResolution": "AuthenticatedRole", - "IdentityProvider": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - }, - ":", - { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - ] - ] - }, - "Type": "Token" - } - }, - "Roles": { - "unauthenticated": { - "Fn::GetAtt": [ - "amplifyAuthunauthenticatedUserRole2B524D9E", - "Arn" - ] - }, - "authenticated": { - "Fn::GetAtt": [ - "amplifyAuthauthenticatedUserRoleD8DA3689", - "Arn" - ] - } - } - }, - "DependsOn": [ - "amplifyAuthIdentityPool3FDE84CC", - "amplifyAuthUserPoolAppClient2626C6F8" - ] - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Value": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef": { - "Value": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Value": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestAmazonIdSecretFetcherResource622F9AC3secretValue": { - "Value": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestFacebookIdSecretFetcherResource589F3C68secretValue": { - "Value": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestGoogleIdSecretFetcherResource4E726239secretValue": { - "Value": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Value": { - "Ref": "amplifyAuthauthenticatedUserRoleD8DA3689" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Value": { - "Ref": "amplifyAuthunauthenticatedUserRole2B524D9E" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 729291545d..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,639 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "AWS_IAM" - } - ], - "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", - "Name": "amplifyData", - "UserPoolConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "DefaultAction": "ALLOW", - "UserPoolId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - } - } - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/99a0121692ae701057e9e5fcd49e1757dda243cbc15f92ce512cc25186665ce5.graphql" - } - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Description": "None Data Source for Pipeline functions", - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/4a79ad097bd6f9650cd9e1d0f0fedf6ae9a46465c9f718f30fbed3e2fc459709.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataFunctionDirectiveStackNestedStackFunctionDirectiveStackNestedStackResource1246A302": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0848bc21a07a9344b4254cf3c2499684d7ae926068bb57f946e7ce996d0e4d0b.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "f7466b40815188839731e7f77595dc9bb8b31e0da6b425153a60cd67de6a1d2f.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json deleted file mode 100644 index 15e925d2cc..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "Description": "An auto-generated nested stack for the @function directive.", - "AWSTemplateFormatVersion": "2010-09-09", - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - } - }, - "Resources": { - "ReverseLambdaDataSourceServiceRole00B33311": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "ReverseLambdaDataSourceServiceRoleDefaultPolicy95B7B4C5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ReverseLambdaDataSourceServiceRoleDefaultPolicy95B7B4C5", - "Roles": [ - { - "Ref": "ReverseLambdaDataSourceServiceRole00B33311" - } - ] - } - }, - "ReverseLambdaDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "LambdaConfig": { - "LambdaFunctionArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn" - } - }, - "Name": "ReverseLambdaDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "ReverseLambdaDataSourceServiceRole00B33311", - "Arn" - ] - }, - "Type": "AWS_LAMBDA" - } - }, - "InvokeReverseLambdaDataSourceInvokeReverseLambdaDataSourceAppSyncFunction33B5050E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "ReverseLambdaDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "InvokeReverseLambdaDataSource", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/13a81290d6590d9690e9554414eabeeec87d5c3a89b87edc539a74066a7b6ef7.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/43c39d3f3064d951a274ad91ec62cc12e1c8dab308d0dfa845e4de9f0a874e57.vtl" - } - }, - "DependsOn": [ - "ReverseLambdaDataSource" - ] - }, - "TodoreverseResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "reverse", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "InvokeReverseLambdaDataSourceInvokeReverseLambdaDataSourceAppSyncFunction33B5050E", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"reverse\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n{}\n## [End] Stash resolver specific context.. **" - ] - ] - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" - }, - "TypeName": "Todo" - } - }, - "EchoLambdaDataSourceServiceRole8AE16971": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "EchoLambdaDataSourceServiceRoleDefaultPolicy2D1931E3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EchoLambdaDataSourceServiceRoleDefaultPolicy2D1931E3", - "Roles": [ - { - "Ref": "EchoLambdaDataSourceServiceRole8AE16971" - } - ] - } - }, - "EchoLambdaDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "LambdaConfig": { - "LambdaFunctionArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - } - }, - "Name": "EchoLambdaDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "EchoLambdaDataSourceServiceRole8AE16971", - "Arn" - ] - }, - "Type": "AWS_LAMBDA" - } - }, - "InvokeEchoLambdaDataSourceInvokeEchoLambdaDataSourceAppSyncFunctionC9EAF3A4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "EchoLambdaDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "InvokeEchoLambdaDataSource", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fdc9106f27e773d1662806a27e986f51094bf3afe68c82138bb1dba7fb7772eb.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/43c39d3f3064d951a274ad91ec62cc12e1c8dab308d0dfa845e4de9f0a874e57.vtl" - } - }, - "DependsOn": [ - "EchoLambdaDataSource" - ] - }, - "TodoechoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "echo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "InvokeEchoLambdaDataSourceInvokeEchoLambdaDataSourceAppSyncFunctionC9EAF3A4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"echo\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n{}\n## [End] Stash resolver specific context.. **" - ] - ] - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" - }, - "TypeName": "Todo" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Type": "String" - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index 3da94b2e7d..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1404 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json deleted file mode 100644 index 029b8d1a5e..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "Resources": { - "handlerlambdaServiceRole46D7AF61": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "handlerlambdaE29D1580": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "ce20b1bbd042ee1db4251e55e10f01aad7d6d5d39a0303451585952ce49958db.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "handlerlambdaServiceRole46D7AF61", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "handlerlambdaServiceRole46D7AF61" - ] - }, - "echoFunclambdaServiceRoleF37965D7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "echoFunclambdaE17DCA46": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "fee8578fcf3b0063089a4abe381e26050b959e96c277ed3b554fd6515fa84151.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "echoFunclambdaServiceRoleF37965D7", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "echoFunclambdaServiceRoleF37965D7" - ] - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionhandlerlambda640CAA5DArn": { - "Value": { - "Fn::GetAtt": [ - "handlerlambdaE29D1580", - "Arn" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Value": { - "Fn::GetAtt": [ - "echoFunclambdaE17DCA46", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json deleted file mode 100644 index 194423b7e3..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-js/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.2.3\",\"stackType\":\"storage-S3\",\"metadata\":{}}", - "Resources": { - "amplifyStorageamplifyStorageBucketC2F702CD": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref": { - "Value": { - "Ref": "amplifyStorageamplifyStorageBucketC2F702CD" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index 3364a5b675..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,582 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::Auth": { - "version": "1", - "stackOutputs": [ - "userPoolId", - "webClientId", - "identityPoolId", - "authRegion", - "signupAttributes", - "usernameAttributes", - "verificationMechanisms", - "passwordPolicyMinLength", - "passwordPolicyRequirements", - "amazonClientId", - "facebookClientId", - "googleClientId" - ] - }, - "AWS::Amplify::Storage": { - "version": "1", - "stackOutputs": [ - "storageRegion", - "bucketName" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncApiKey", - "awsAppsyncAdditionalAuthenticationTypes" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "userPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - } - }, - "webClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef" - ] - } - }, - "identityPoolId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - } - }, - "authRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "signupAttributes": { - "Value": "[\"EMAIL\"]" - }, - "usernameAttributes": { - "Value": "[\"EMAIL\"]" - }, - "verificationMechanisms": { - "Value": "[\"EMAIL\"]" - }, - "passwordPolicyMinLength": { - "Value": "8" - }, - "passwordPolicyRequirements": { - "Value": "[\"REQUIRES_NUMBERS\",\"REQUIRES_LOWERCASE\",\"REQUIRES_UPPERCASE\",\"REQUIRES_SYMBOLS\"]" - }, - "amazonClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestAmazonIdSecretFetcherResource622F9AC3secretValue" - ] - } - }, - "facebookClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestFacebookIdSecretFetcherResource589F3C68secretValue" - ] - } - }, - "googleClientId": { - "Value": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestGoogleIdSecretFetcherResource4E726239secretValue" - ] - } - }, - "storageRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "bucketName": { - "Value": { - "Fn::GetAtt": [ - "storage0EC3F24A", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref" - ] - } - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "API_KEY" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncApiKey": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey" - ] - } - }, - "awsAppsyncAdditionalAuthenticationTypes": { - "Value": "AMAZON_COGNITO_USER_POOLS,AWS_IAM" - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "auth179371D7": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionspecialTestFunctionlambda0688CD5DArn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionspecialTestFunctionlambda0688CD5DArn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/9f71e49e8d317f7bf49b5734f898c8697fd3b5210bf862d6e52cfde157b965c4.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "function1351588B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/9c68b83eec1055821272eb84581a1d4ed9f5c18f5618be403beca9c6a445f1b1.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "storage0EC3F24A": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0d605cfcd689fb8650f00f193ce7572a75b06a8ccfaebc550876e3be9e352075.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Fn::GetAtt": [ - "auth179371D7", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/40583c2982a9c1e19dbe32ad7ed34dd47363d6ccf2f5f42f55a12dddd590d2a4.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json deleted file mode 100644 index f7628d4cdd..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854aauth473E022C.nested.template.json +++ /dev/null @@ -1,702 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.4.2\",\"stackType\":\"auth-Cognito\",\"metadata\":{}}", - "Resources": { - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "ssm:GetParameter", - "Effect": "Allow", - "Resource": [ - "arn:aws:ssm:*:*:parameter/amplify/testAppId/testBranchName/*", - "arn:aws:ssm:*:*:parameter/amplify/shared/testAppId/*" - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB", - "Roles": [ - { - "Ref": "SecretFetcherResourceProviderLambdaServiceRole5ABAF823" - } - ] - } - }, - "SecretFetcherResourceProviderLambda1ECC380E": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5c10bf1d77712f6097fda6d4dfbef61117ecd7e2b383263167287cc2802f7cc5.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "SecretFetcherResourceProviderLambdaServiceRoleDefaultPolicyD52F71CB", - "SecretFetcherResourceProviderLambdaServiceRole5ABAF823" - ] - }, - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916", - "Roles": [ - { - "Ref": "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041" - } - ] - } - }, - "SecretFetcherResourceProviderframeworkonEvent960CF056": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/auth/SecretFetcherResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderLambda1ECC380E", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "SecretFetcherResourceProviderframeworkonEventServiceRoleDefaultPolicy38F3A916", - "SecretFetcherResourceProviderframeworkonEventServiceRoleA7B78041" - ] - }, - "testAmazonIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testAmazonId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testAmazonSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testAmazonSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testFacebookIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testFacebookId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testFacebookSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testFacebookSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testGoogleIdSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testGoogleId", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "testGoogleSecretSecretFetcherResource": { - "Type": "Custom::SecretFetcherResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SecretFetcherResourceProviderframeworkonEvent960CF056", - "Arn" - ] - }, - "namespace": "testAppId", - "name": "testBranchName", - "secretName": "testGoogleSecret", - "secretLastUpdated": 123456789 - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPool4BA7F805": { - "Type": "AWS::Cognito::UserPool", - "Properties": { - "AccountRecoverySetting": { - "RecoveryMechanisms": [ - { - "Name": "verified_email", - "Priority": 1 - } - ] - }, - "AdminCreateUserConfig": { - "AllowAdminCreateUserOnly": false - }, - "AutoVerifiedAttributes": [ - "email" - ], - "EmailVerificationMessage": "The verification code to your new account is {####}", - "EmailVerificationSubject": "Verify your new account", - "LambdaConfig": { - "PostConfirmation": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionspecialTestFunctionlambda0688CD5DArn" - } - }, - "Policies": { - "PasswordPolicy": { - "MinimumLength": 8, - "RequireLowercase": true, - "RequireNumbers": true, - "RequireSymbols": true, - "RequireUppercase": true - } - }, - "Schema": [ - { - "Mutable": true, - "Name": "email", - "Required": true - } - ], - "SmsVerificationMessage": "The verification code to your new account is {####}", - "UserAttributeUpdateSettings": { - "AttributesRequireVerificationBeforeUpdate": [ - "email" - ] - }, - "UsernameAttributes": [ - "email" - ], - "UsernameConfiguration": { - "CaseSensitive": false - }, - "VerificationMessageTemplate": { - "DefaultEmailOption": "CONFIRM_WITH_CODE", - "EmailMessage": "The verification code to your new account is {####}", - "EmailSubject": "Verify your new account", - "SmsMessage": "The verification code to your new account is {####}" - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyAuthUserPoolPostConfirmationCognitoE7E727CF": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionspecialTestFunctionlambda0688CD5DArn" - }, - "Principal": "cognito-idp.amazonaws.com", - "SourceArn": { - "Fn::GetAtt": [ - "amplifyAuthUserPool4BA7F805", - "Arn" - ] - } - } - }, - "amplifyAuthGoogleIdPA9736819": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testGoogleSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "profile" - }, - "ProviderName": "Google", - "ProviderType": "Google", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthFacebookIDP7CB5B5CC": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testFacebookSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "public_profile" - }, - "ProviderName": "Facebook", - "ProviderType": "Facebook", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthAmazonIDP72414901": { - "Type": "AWS::Cognito::UserPoolIdentityProvider", - "Properties": { - "ProviderDetails": { - "client_id": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - }, - "client_secret": { - "Fn::GetAtt": [ - "testAmazonSecretSecretFetcherResource", - "secretValue" - ] - }, - "authorize_scopes": "profile" - }, - "ProviderName": "LoginWithAmazon", - "ProviderType": "LoginWithAmazon", - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthUserPoolAppClient2626C6F8": { - "Type": "AWS::Cognito::UserPoolClient", - "Properties": { - "AllowedOAuthFlows": [ - "implicit", - "code" - ], - "AllowedOAuthFlowsUserPoolClient": true, - "AllowedOAuthScopes": [ - "profile", - "phone", - "email", - "openid", - "aws.cognito.signin.user.admin" - ], - "CallbackURLs": [ - "https://example.com" - ], - "ExplicitAuthFlows": [ - "ALLOW_CUSTOM_AUTH", - "ALLOW_USER_SRP_AUTH", - "ALLOW_REFRESH_TOKEN_AUTH" - ], - "PreventUserExistenceErrors": "ENABLED", - "SupportedIdentityProviders": [ - { - "Ref": "amplifyAuthGoogleIdPA9736819" - }, - { - "Ref": "amplifyAuthFacebookIDP7CB5B5CC" - }, - { - "Ref": "amplifyAuthAmazonIDP72414901" - }, - "COGNITO" - ], - "UserPoolId": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - } - }, - "amplifyAuthIdentityPool3FDE84CC": { - "Type": "AWS::Cognito::IdentityPool", - "Properties": { - "AllowUnauthenticatedIdentities": true, - "CognitoIdentityProviders": [ - { - "ClientId": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - }, - "ProviderName": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - } - ] - ] - } - } - ], - "SupportedLoginProviders": { - "accounts.google.com": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - }, - "graph.facebook.com": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - }, - "www.amazon.com": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - } - } - } - }, - "amplifyAuthauthenticatedUserRoleD8DA3689": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "authenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthunauthenticatedUserRole2B524D9E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "cognito-identity.amazonaws.com:aud": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "ForAnyValue:StringLike": { - "cognito-identity.amazonaws.com:amr": "unauthenticated" - } - }, - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyAuthIdentityPoolRoleAttachment045F17C8": { - "Type": "AWS::Cognito::IdentityPoolRoleAttachment", - "Properties": { - "IdentityPoolId": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - }, - "RoleMappings": { - "UserPoolWebClientRoleMapping": { - "AmbiguousRoleResolution": "AuthenticatedRole", - "IdentityProvider": { - "Fn::Join": [ - "", - [ - "cognito-idp.", - { - "Ref": "AWS::Region" - }, - ".amazonaws.com/", - { - "Ref": "amplifyAuthUserPool4BA7F805" - }, - ":", - { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - ] - ] - }, - "Type": "Token" - } - }, - "Roles": { - "unauthenticated": { - "Fn::GetAtt": [ - "amplifyAuthunauthenticatedUserRole2B524D9E", - "Arn" - ] - }, - "authenticated": { - "Fn::GetAtt": [ - "amplifyAuthauthenticatedUserRoleD8DA3689", - "Arn" - ] - } - } - }, - "DependsOn": [ - "amplifyAuthIdentityPool3FDE84CC", - "amplifyAuthUserPoolAppClient2626C6F8" - ] - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionspecialTestFunctionlambda0688CD5DArn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Value": { - "Ref": "amplifyAuthUserPool4BA7F805" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPoolAppClientE9865FACRef": { - "Value": { - "Ref": "amplifyAuthUserPoolAppClient2626C6F8" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Value": { - "Ref": "amplifyAuthIdentityPool3FDE84CC" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestAmazonIdSecretFetcherResource622F9AC3secretValue": { - "Value": { - "Fn::GetAtt": [ - "testAmazonIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestFacebookIdSecretFetcherResource589F3C68secretValue": { - "Value": { - "Fn::GetAtt": [ - "testFacebookIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthtestGoogleIdSecretFetcherResource4E726239secretValue": { - "Value": { - "Fn::GetAtt": [ - "testGoogleIdSecretFetcherResource", - "secretValue" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Value": { - "Ref": "amplifyAuthauthenticatedUserRoleD8DA3689" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Value": { - "Ref": "amplifyAuthunauthenticatedUserRole2B524D9E" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 5827a8292f..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,660 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", - "UserPoolConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "UserPoolId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref" - } - } - }, - { - "AuthenticationType": "AWS_IAM" - } - ], - "AuthenticationType": "API_KEY", - "Name": "amplifyData" - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/58802100f02170602794fc02fb537b685d5542486d709f01a709c78861b95330.graphql" - } - } - }, - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Expires": 1703878639 - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/d89721af476e01d4f665fda80e72c127ff52254c15304495d4d24d46ee0b289b.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataFunctionDirectiveStackNestedStackFunctionDirectiveStackNestedStackResource1246A302": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/313ef813581ce8a50e6465ec2bcbf54abdeeb5fa9a6b2b43d7c11b6989adeb41.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "6d7efa67d952ad7b033f523fa6069f0ea8b09281442c76c5594b7fa76eb2c3fb.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthUserPool70E84902Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374", - "ApiKey" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json deleted file mode 100644 index a841c1bdda..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataFunctionDirectiveStack93F75775.nested.template.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "Description": "An auto-generated nested stack for the @function directive.", - "AWSTemplateFormatVersion": "2010-09-09", - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - } - }, - "Resources": { - "EchoLambdaDataSourceServiceRole8AE16971": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "EchoLambdaDataSourceServiceRoleDefaultPolicy2D1931E3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EchoLambdaDataSourceServiceRoleDefaultPolicy2D1931E3", - "Roles": [ - { - "Ref": "EchoLambdaDataSourceServiceRole8AE16971" - } - ] - } - }, - "EchoLambdaDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "LambdaConfig": { - "LambdaFunctionArn": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn" - } - }, - "Name": "EchoLambdaDataSource", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "EchoLambdaDataSourceServiceRole8AE16971", - "Arn" - ] - }, - "Type": "AWS_LAMBDA" - } - }, - "InvokeEchoLambdaDataSourceInvokeEchoLambdaDataSourceAppSyncFunctionC9EAF3A4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "EchoLambdaDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "InvokeEchoLambdaDataSource", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fdc9106f27e773d1662806a27e986f51094bf3afe68c82138bb1dba7fb7772eb.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/43c39d3f3064d951a274ad91ec62cc12e1c8dab308d0dfa845e4de9f0a874e57.vtl" - } - }, - "DependsOn": [ - "EchoLambdaDataSource" - ] - }, - "QueryechoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "echo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QueryEchoAuthFNQueryEchoAuthFNAppSyncFunction2298FF70", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "InvokeEchoLambdaDataSourceInvokeEchoLambdaDataSourceAppSyncFunctionC9EAF3A4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"echo\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n{}\n## [End] Stash resolver specific context.. **" - ] - ] - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" - }, - "TypeName": "Query" - } - }, - "QueryEchoAuthFNQueryEchoAuthFNAppSyncFunction2298FF70": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryEchoAuthFN", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5f414b859566bd0e573d2e1568817fb281a6e73aa6a98ec1bc76ff39cac84b0d.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index 92a42e41a3..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1792 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodopreAuth0FunctionQuerygetTodopreAuth0FunctionAppSyncFunctionFFFAAF80": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ffc597e18023b530e6afcbe02cee647d49550fa9e77bd06f1dee09d8b1be8de3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerygetTodoauth0FunctionQuerygetTodoauth0FunctionAppSyncFunction846D8436": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c8554262032d48d7b24789ed5e30f74e49b3f8833934c8e7620338f481d32f5a.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodopreAuth0FunctionQuerygetTodopreAuth0FunctionAppSyncFunctionFFFAAF80", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerygetTodoauth0FunctionQuerygetTodoauth0FunctionAppSyncFunction846D8436", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodospreAuth0FunctionQuerylistTodospreAuth0FunctionAppSyncFunctionD066FA43": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3e81312d4c75951808eda9fcd5f854c1925c0b819de0939f09c4fe2eebb190b8.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerylistTodosauth0FunctionQuerylistTodosauth0FunctionAppSyncFunction7D761961": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodosauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c8554262032d48d7b24789ed5e30f74e49b3f8833934c8e7620338f481d32f5a.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodospreAuth0FunctionQuerylistTodospreAuth0FunctionAppSyncFunctionD066FA43", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerylistTodosauth0FunctionQuerylistTodosauth0FunctionAppSyncFunction7D761961", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopreAuth0FunctionMutationcreateTodopreAuth0FunctionAppSyncFunctionFE4AC834": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/39fb35c6f8e8573ffe3a63ba867cf543b05af129a104b387a44f03c3d85da0c3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodoauth0FunctionMutationcreateTodoauth0FunctionAppSyncFunction21817E36": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fce509b1dbeb920f6b34c415cdc5b847353be02e1d11808d6551e98a22d4c708.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopreAuth0FunctionMutationcreateTodopreAuth0FunctionAppSyncFunctionFE4AC834", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodoauth0FunctionMutationcreateTodoauth0FunctionAppSyncFunction21817E36", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodopreAuth0FunctionMutationupdateTodopreAuth0FunctionAppSyncFunction08B1C77D": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/39fb35c6f8e8573ffe3a63ba867cf543b05af129a104b387a44f03c3d85da0c3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodoauth0FunctionMutationupdateTodoauth0FunctionAppSyncFunction1E4A3112": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7845f4cbb5051aae3d7b6dc158d25ac7ce9a2ef555125e3aed3780c7dd94f261.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopreAuth0FunctionMutationupdateTodopreAuth0FunctionAppSyncFunction08B1C77D", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodoauth0FunctionMutationupdateTodoauth0FunctionAppSyncFunction1E4A3112", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodopreAuth0FunctionMutationdeleteTodopreAuth0FunctionAppSyncFunctionDA33468D": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopreAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a2c0f8a4d76f659d130c8a445801845ae9d33e5cc2c5ecd610edc272d4bd46e3.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationdeleteTodoauth0FunctionMutationdeleteTodoauth0FunctionAppSyncFunctionC82C218C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dc9f72eafda6162358e483de942e41fc08ef05c4352f3ce973f2ddcbf06a5e9c.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodopreAuth0FunctionMutationdeleteTodopreAuth0FunctionAppSyncFunctionDA33468D", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationdeleteTodoauth0FunctionMutationdeleteTodoauth0FunctionAppSyncFunctionC82C218C", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodoauth0FunctionSubscriptiononCreateTodoauth0FunctionAppSyncFunction042EF9E1": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc09f231b2c0455c75ad0ff63f6274482a2a34ac85e6db90e1df25d1deb11860.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodoauth0FunctionSubscriptiononCreateTodoauth0FunctionAppSyncFunction042EF9E1", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodoauth0FunctionSubscriptiononUpdateTodoauth0FunctionAppSyncFunction80D0DFA3": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc09f231b2c0455c75ad0ff63f6274482a2a34ac85e6db90e1df25d1deb11860.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodoauth0FunctionSubscriptiononUpdateTodoauth0FunctionAppSyncFunction80D0DFA3", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodoauth0FunctionSubscriptiononDeleteTodoauth0FunctionAppSyncFunctionF69F2220": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bc09f231b2c0455c75ad0ff63f6274482a2a34ac85e6db90e1df25d1deb11860.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodoauth0FunctionSubscriptiononDeleteTodoauth0FunctionAppSyncFunctionF69F2220", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "TodoOwnerDataResolverFnTodoOwnerDataResolverFnAppSyncFunction0C7BF45B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "TodoOwnerDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/041534e5fd916595f752318f161512d7c7f83b9f2cf32d0f0be381c12253ff68.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/064303962e481067b44300212516363b99aaee539b6bafaf756fdd83ff0b60f0.vtl" - } - } - }, - "TodoownerResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "owner", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "TodoOwnerDataResolverFnTodoOwnerDataResolverFnAppSyncFunction0C7BF45B", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthauthenticatedUserRoleF0783640Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", - { - "Ref": "AWS::AccountId" - }, - ":assumed-role/", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthunauthenticatedUserRoleF922AD28Ref" - }, - "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854aauthNestedStackauthNestedStackResource462F2942OutputsamplifytestAppIdtestBranchNamebranch7d6f6c854aauthamplifyAuthIdentityPool7404D50ERef" - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Todo" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json deleted file mode 100644 index 0677184e6c..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "Resources": { - "specialTestFunctionlambdaServiceRole0C3D972B": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "specialTestFunctionlambda1BF9BBA4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "d734d72b26bbfcea4362172e7e5076e26ab1859f5e1dffaee893424e20dcb690.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "specialTestFunctionlambdaServiceRole0C3D972B", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "specialTestFunctionlambdaServiceRole0C3D972B" - ] - }, - "echoFunclambdaServiceRoleF37965D7": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "echoFunclambdaE17DCA46": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "8ec7c45f429a0cbe47336d1e8f7cd0efae9cd53d7597f14aa180fa922b5be180.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "echoFunclambdaServiceRoleF37965D7", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "echoFunclambdaServiceRoleF37965D7" - ] - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionspecialTestFunctionlambda0688CD5DArn": { - "Value": { - "Fn::GetAtt": [ - "specialTestFunctionlambda1BF9BBA4", - "Arn" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionechoFunclambda1F2D9982Arn": { - "Value": { - "Fn::GetAtt": [ - "echoFunclambdaE17DCA46", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json b/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json deleted file mode 100644 index 194423b7e3..0000000000 --- a/packages/integration-tests/test-projects/data-storage-auth-with-triggers-ts/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.2.3\",\"stackType\":\"storage-S3\",\"metadata\":{}}", - "Resources": { - "amplifyStorageamplifyStorageBucketC2F702CD": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref": { - "Value": { - "Ref": "amplifyStorageamplifyStorageBucketC2F702CD" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index a3c3041a35..0000000000 --- a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::Storage": { - "version": "1", - "stackOutputs": [ - "storageRegion", - "bucketName" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "storageRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "bucketName": { - "Value": { - "Fn::GetAtt": [ - "storage0EC3F24A", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref" - ] - } - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "storage0EC3F24A": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/0d605cfcd689fb8650f00f193ce7572a75b06a8ccfaebc550876e3be9e352075.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json b/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json deleted file mode 100644 index 194423b7e3..0000000000 --- a/packages/integration-tests/test-projects/minimalist-project-with-typescript-idioms/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854astorage16B83955.nested.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.2.3\",\"stackType\":\"storage-S3\",\"metadata\":{}}", - "Resources": { - "amplifyStorageamplifyStorageBucketC2F702CD": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854astorageamplifyStorageamplifyStorageBucket3E64AF96Ref": { - "Value": { - "Ref": "amplifyStorageamplifyStorageBucketC2F702CD" - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index dbee98032a..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncApiKey", - "awsAppsyncAdditionalAuthenticationTypes" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "AWS_LAMBDA" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncApiKey": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey" - ] - } - }, - "awsAppsyncAdditionalAuthenticationTypes": { - "Value": "API_KEY,OPENID_CONNECT" - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionlambdaauthorizerlambdaD2057200Arn": { - "Fn::GetAtt": [ - "function1351588B", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionlambdaauthorizerlambdaD2057200Arn" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/d25f871ae362f56389c1ccda0b350546833da108ef4cfc6d416b6e56a20448c2.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "function1351588B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/36a67e80be9b6f698e1b433195eb1b7a8214ca85775562e0f9bffdf3f1b0b358.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 18a8db87cf..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,591 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AdditionalAuthenticationProviders": [ - { - "AuthenticationType": "API_KEY" - }, - { - "AuthenticationType": "OPENID_CONNECT", - "OpenIDConnectConfig": { - "AuthTTL": 50, - "IatTTL": 60, - "Issuer": "https://fake-provider.fake/" - } - } - ], - "AuthenticationType": "AWS_LAMBDA", - "LambdaAuthorizerConfig": { - "AuthorizerResultTtlInSeconds": 0, - "AuthorizerUri": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionlambdaauthorizerlambdaD2057200Arn" - }, - "IdentityValidationExpression": "" - }, - "Name": "amplifyData" - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/78eb7ae54bd7ec301d9187d362c3703f257dba202a996eee5be8e34daab6da2c.graphql" - } - } - }, - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Expires": 1703878640 - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Description": "None Data Source for Pipeline functions", - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/580228053b6e026b7f9389b9ec80f5dd0ffe66538d18ae535134bd77335db21d.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "ad0ad6aaca1bae0a53c638cc684b9b07e7e20b1eb9072e96cc6fcdc8d825c0bc.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionNestedStackfunctionNestedStackResource482C479FOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854afunctionlambdaauthorizerlambdaD2057200Arn": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374", - "ApiKey" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index 434dbe0fdb..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1488 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodoauth0FunctionQuerygetTodoauth0FunctionAppSyncFunction846D8436": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7ed05f9ac3e35cba173ffd87debd75f0d776e3cff38e86aa7ff81cb5793c741b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodoauth0FunctionQuerygetTodoauth0FunctionAppSyncFunction846D8436", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodosauth0FunctionQuerylistTodosauth0FunctionAppSyncFunction7D761961": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodosauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7ed05f9ac3e35cba173ffd87debd75f0d776e3cff38e86aa7ff81cb5793c741b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodosauth0FunctionQuerylistTodosauth0FunctionAppSyncFunction7D761961", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodoauth0FunctionMutationcreateTodoauth0FunctionAppSyncFunction21817E36": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/394b4df4220dda8e2b7651f43e5bb11283afc22c786cfdd2aa20072deafc28b7.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodoauth0FunctionMutationcreateTodoauth0FunctionAppSyncFunction21817E36", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodoauth0FunctionMutationupdateTodoauth0FunctionAppSyncFunction1E4A3112": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c9c0dd40988bbbc4ed7f7d4003c94a65ae4f7ef5a35f5c61789ae197c4dd0c51.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodoauth0FunctionMutationupdateTodoauth0FunctionAppSyncFunction1E4A3112", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodoauth0FunctionMutationdeleteTodoauth0FunctionAppSyncFunctionC82C218C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ed93408eb204184cb0a3497c9dda91d6bd74bc32a7f35c8be2f68c977b9bea1f.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodoauth0FunctionMutationdeleteTodoauth0FunctionAppSyncFunctionC82C218C", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodoauth0FunctionSubscriptiononCreateTodoauth0FunctionAppSyncFunction042EF9E1": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/72094993147e8c5de445da39ab878c678c3b7834addda5f79b08f309bcbd0461.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodoauth0FunctionSubscriptiononCreateTodoauth0FunctionAppSyncFunction042EF9E1", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodoauth0FunctionSubscriptiononUpdateTodoauth0FunctionAppSyncFunction80D0DFA3": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/72094993147e8c5de445da39ab878c678c3b7834addda5f79b08f309bcbd0461.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodoauth0FunctionSubscriptiononUpdateTodoauth0FunctionAppSyncFunction80D0DFA3", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodoauth0FunctionSubscriptiononDeleteTodoauth0FunctionAppSyncFunctionF69F2220": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodoauth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/72094993147e8c5de445da39ab878c678c3b7834addda5f79b08f309bcbd0461.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3a607c80c325a3edcae10503ccceaaad8e73d3447432eceba2dab95a3a1c4665.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodoauth0FunctionSubscriptiononDeleteTodoauth0FunctionAppSyncFunctionF69F2220", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "TodoOwnerDataResolverFnTodoOwnerDataResolverFnAppSyncFunction0C7BF45B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "TodoOwnerDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/041534e5fd916595f752318f161512d7c7f83b9f2cf32d0f0be381c12253ff68.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/064303962e481067b44300212516363b99aaee539b6bafaf756fdd83ff0b60f0.vtl" - } - } - }, - "TodoownerResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "owner", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "TodoOwnerDataResolverFnTodoOwnerDataResolverFnAppSyncFunction0C7BF45B", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Todo\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Todo" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json b/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json deleted file mode 100644 index 44d95bec23..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-auth-modes/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionDE2842E0.nested.template.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "Resources": { - "lambdaauthorizerlambdaServiceRoleCF35E55A": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "lambdaauthorizerlambda4ACE2410": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "4a66b7e5d6972e7f007f7b05bc1120abeebb6878a29ee6071a79eac87896494d.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "lambdaauthorizerlambdaServiceRoleCF35E55A", - "Arn" - ] - }, - "Runtime": "nodejs16.x" - }, - "DependsOn": [ - "lambdaauthorizerlambdaServiceRoleCF35E55A" - ] - }, - "lambdaauthorizerlambdaappsyncauthinvoke93C85899": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "lambdaauthorizerlambda4ACE2410", - "Arn" - ] - }, - "Principal": "appsync.amazonaws.com" - } - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854afunctionlambdaauthorizerlambdaD2057200Arn": { - "Value": { - "Fn::GetAtt": [ - "lambdaauthorizerlambda4ACE2410", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json b/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json deleted file mode 100644 index 8726bd8f1c..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplify-testAppId-testBranchName-branch-7d6f6c854a.template.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"0.5.5\",\"stackType\":\"root\",\"metadata\":{}}", - "Metadata": { - "AWS::Amplify::Platform": { - "version": "1", - "stackOutputs": [ - "deploymentType", - "region" - ] - }, - "AWS::Amplify::GraphQL": { - "version": "1", - "stackOutputs": [ - "awsAppsyncApiId", - "awsAppsyncApiEndpoint", - "awsAppsyncAuthenticationType", - "awsAppsyncRegion", - "amplifyApiModelSchemaS3Uri", - "awsAppsyncApiKey" - ] - } - }, - "Outputs": { - "deploymentType": { - "Value": "branch" - }, - "region": { - "Value": { - "Ref": "AWS::Region" - } - }, - "awsAppsyncApiId": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - ] - } - }, - "awsAppsyncApiEndpoint": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl" - ] - } - }, - "awsAppsyncAuthenticationType": { - "Value": "API_KEY" - }, - "awsAppsyncRegion": { - "Value": { - "Ref": "AWS::Region" - } - }, - "amplifyApiModelSchemaS3Uri": { - "Value": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref" - ] - }, - "/model-schema.graphql" - ] - ] - } - }, - "awsAppsyncApiKey": { - "Value": { - "Fn::GetAtt": [ - "data7552DF31", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey" - ] - } - } - }, - "Resources": { - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:GetBranch", - "amplify:UpdateBranch" - ], - "Effect": "Allow", - "Resource": "arn:aws:amplify:*:*:apps/testAppId/branches/testBranchName" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceLambda582AC093": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "747012bf6fea04c81a436d8dfe16db211a8a4df19c15421de44ea7440573b86b.zip" - }, - "Environment": { - "Variables": { - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" - } - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 10 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceLambdaServiceRoleDefaultPolicy86099CA1", - "AmplifyBranchLinkerCustomResourceLambdaServiceRole3DDCBC03" - ] - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "Roles": [ - { - "Ref": "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - } - ] - } - }, - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/AmplifyBranchLinker/CustomResourceProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceLambda582AC093", - "Arn" - ] - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRoleDefaultPolicy38AAE412", - "AmplifyBranchLinkerCustomResourceProviderframeworkonEventServiceRole92A035EB" - ] - }, - "AmplifyBranchLinkerCustomResource96E36FC1": { - "Type": "Custom::AmplifyBranchLinkerResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AmplifyBranchLinkerCustomResourceProviderframeworkonEvent3B23F900", - "Arn" - ] - }, - "appId": "testAppId", - "branchName": "testBranchName" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "data7552DF31": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/5b3b700c10856197bf0f6f3048792cdc9a2a5835c1f3e1092b73ae46fd39ae4d.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "Default": "/cdk-bootstrap/hnb659fds/version", - "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" - } - }, - "Rules": { - "CheckBootstrapVersion": { - "Assertions": [ - { - "Assert": { - "Fn::Not": [ - { - "Fn::Contains": [ - [ - "1", - "2", - "3", - "4", - "5" - ], - { - "Ref": "BootstrapVersion" - } - ] - } - ] - }, - "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json b/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json deleted file mode 100644 index 380f1178d2..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataE67321C2.nested.template.json +++ /dev/null @@ -1,568 +0,0 @@ -{ - "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifyPipelineDeploy\",\"createdWith\":\"1.4.2\",\"stackType\":\"api-AppSync\",\"metadata\":{}}", - "Resources": { - "amplifyDataGraphQLAPI42A6FA33": { - "Type": "AWS::AppSync::GraphQLApi", - "Properties": { - "AuthenticationType": "API_KEY", - "Name": "amplifyData" - } - }, - "amplifyDataGraphQLAPITransformerSchemaFF50A789": { - "Type": "AWS::AppSync::GraphQLSchema", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "DefinitionS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f6c1ed42cda791da480da1f92b6aa1089d2648364201187fb99fbbf3a7d1419b.graphql" - } - } - }, - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374": { - "Type": "AWS::AppSync::ApiKey", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Expires": 1701891441 - } - }, - "amplifyDataGraphQLAPINONEDS684BF699": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "Description": "None Data Source for Pipeline functions", - "Name": "NONE_DS", - "Type": "NONE" - } - }, - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/35e06ca29c28793a345d0a1e4ed0a16bf7bad8a644c30c06a02b4218f7be6aa6.json" - ] - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataTodoNestedStackTodoNestedStackResource551CEA56": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "DynamoDBModelTableWriteIOPS": { - "Ref": "DynamoDBModelTableWriteIOPS" - }, - "DynamoDBBillingMode": { - "Ref": "DynamoDBBillingMode" - }, - "DynamoDBEnablePointInTimeRecovery": { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "DynamoDBEnableServerSideEncryption": { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Fn::GetAtt": [ - "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", - "Outputs.amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPINONEDS684BF699", - "Name" - ] - } - }, - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/b2592dc0925350164d369b9756628f4e37c379d41cabf3012d22754ae7b343f8.json" - ] - ] - } - }, - "DependsOn": [ - "amplifyDataGraphQLAPITransformerSchemaFF50A789" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { - "Type": "AWS::S3::Bucket", - "Properties": { - "Tags": [ - { - "Key": "aws-cdk:auto-delete-objects", - "Value": "true" - }, - { - "Key": "aws-cdk:cr-owned:6d332485", - "Value": "true" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { - "Type": "AWS::S3::BucketPolicy", - "Properties": { - "Bucket": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:PutBucketPolicy", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*" - ], - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - } - }, - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - } - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { - "Type": "Custom::S3AutoDeleteObjects", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", - "Arn" - ] - }, - "BucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "DependsOn": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "3fb6287214999ddeafa7cd0e3e58bc5144c8678bb720f3b5e45e8fd32f333eb3.zip" - }, - "Description": "/opt/awscli/aws" - } - }, - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { - "Type": "Custom::CDKBucketDeployment", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", - "Arn" - ] - }, - "SourceBucketNames": [ - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ], - "SourceObjectKeys": [ - "d9cf6c37d8ab509efa6659c329e9e4deda95642808c4200f4a371aae43560585.zip" - ], - "SourceMarkers": [ - {} - ], - "DestinationBucketName": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - "Prune": true - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ] - } - }, - "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Description": { - "Fn::Join": [ - "", - [ - "Lambda function for auto-deleting objects in ", - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - }, - " S3 bucket." - ] - ] - } - }, - "DependsOn": [ - "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" - ] - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::", - { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject", - "s3:PutObjectLegalHold", - "s3:PutObjectRetention", - "s3:PutObjectTagging", - "s3:PutObjectVersionTagging", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "Roles": [ - { - "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - } - ] - } - }, - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "0b1f5aa55d045066ed91316b823a808060c12737e0575ab7cefe2335324108b0.zip" - }, - "Environment": { - "Variables": { - "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" - } - }, - "Handler": "index.handler", - "Layers": [ - { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" - } - ], - "MemorySize": 1536, - "Role": { - "Fn::GetAtt": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", - "Arn" - ] - }, - "Runtime": "python3.9", - "Timeout": 900 - }, - "DependsOn": [ - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", - "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" - ] - } - }, - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "ApiId" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEGraphQLUrl": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPI42A6FA33", - "GraphQLUrl" - ] - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket01B64A21Ref": { - "Value": { - "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" - } - }, - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPIDefaultApiKey346D40FDApiKey": { - "Value": { - "Fn::GetAtt": [ - "amplifyDataGraphQLAPIDefaultApiKey1C8ED374", - "ApiKey" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json b/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json deleted file mode 100644 index b342d0c674..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerA0EBF206.nested.template.json +++ /dev/null @@ -1,987 +0,0 @@ -{ - "Resources": { - "CreateUpdateDeleteTablesPolicyB7B6ADB5": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:CreateTable", - "dynamodb:UpdateTable", - "dynamodb:DeleteTable", - "dynamodb:DescribeTable", - "dynamodb:DescribeContinuousBackups", - "dynamodb:DescribeTimeToLive", - "dynamodb:UpdateContinuousBackups", - "dynamodb:UpdateTimeToLive" - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", - { - "apiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "envName": "NONE" - } - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "CreateUpdateDeleteTablesPolicyB7B6ADB5", - "Roles": [ - { - "Ref": "TableManagerOnEventHandlerServiceRoleD69E8A0C" - }, - { - "Ref": "TableManagerIsCompleteHandlerServiceRole73EE73E4" - } - ] - } - }, - "TableManagerOnEventHandlerServiceRoleD69E8A0C": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerOnEventHandler8779E150": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerOnEventHandlerServiceRoleD69E8A0C" - ] - }, - "TableManagerIsCompleteHandlerServiceRole73EE73E4": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerIsCompleteHandler63238667": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "35f0ff01a162da0adea484fa653e860e0b7c072bd5ab30402714eeff56ba0b45.zip" - }, - "Handler": "amplify-table-manager-handler.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 840 - }, - "DependsOn": [ - "TableManagerIsCompleteHandlerServiceRole73EE73E4" - ] - }, - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "states:StartExecution", - "Effect": "Allow", - "Resource": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - } - ] - } - }, - "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onEvent (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - "WAITER_STATE_MACHINE_ARN": { - "Ref": "TableManagerCustomProviderwaiterstatemachine46E6141A" - } - } - }, - "Handler": "framework.onEvent", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonEventServiceRoleDefaultPolicy679A5FD0", - "TableManagerCustomProviderframeworkonEventServiceRole9A1F0230" - ] - }, - "TableManagerCustomProviderframeworkonEventLogRetention3E5C45E7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonEvent1DFC2ECC" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - } - ] - } - }, - "TableManagerCustomProviderframeworkisComplete2E51021B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - isComplete (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.isComplete", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkisCompleteServiceRoleDefaultPolicy4BCAB84C", - "TableManagerCustomProviderframeworkisCompleteServiceRole926CCCF5" - ] - }, - "TableManagerCustomProviderframeworkisCompleteLogRetentionBED1D9F7": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkisComplete2E51021B" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "Roles": [ - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - } - ] - } - }, - "TableManagerCustomProviderframeworkonTimeoutC98D33BB": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip" - }, - "Description": "AWS CDK resource provider framework - onTimeout (amplify-testAppId-testBranchName-branch-7d6f6c854a/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerOnEventHandler8779E150", - "Arn" - ] - }, - "USER_IS_COMPLETE_FUNCTION_ARN": { - "Fn::GetAtt": [ - "TableManagerIsCompleteHandler63238667", - "Arn" - ] - } - } - }, - "Handler": "framework.onTimeout", - "Role": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 900 - }, - "DependsOn": [ - "TableManagerCustomProviderframeworkonTimeoutServiceRoleDefaultPolicyF1D89219", - "TableManagerCustomProviderframeworkonTimeoutServiceRoleC0D4F3A8" - ] - }, - "TableManagerCustomProviderframeworkonTimeoutLogRetention3A93F510": { - "Type": "Custom::LogRetention", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", - "Arn" - ] - }, - "LogGroupName": { - "Fn::Join": [ - "", - [ - "/aws/lambda/", - { - "Ref": "TableManagerCustomProviderframeworkonTimeoutC98D33BB" - } - ] - ] - }, - "RetentionInDays": 30 - } - }, - "TableManagerCustomProviderwaiterstatemachineRole9616A97E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::FindInMap": [ - "ServiceprincipalMap", - { - "Ref": "AWS::Region" - }, - "states" - ] - } - } - } - ], - "Version": "2012-10-17" - } - } - }, - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - }, - { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - ":*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "Roles": [ - { - "Ref": "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - } - ] - } - }, - "TableManagerCustomProviderwaiterstatemachine46E6141A": { - "Type": "AWS::StepFunctions::StateMachine", - "Properties": { - "DefinitionString": { - "Fn::Join": [ - "", - [ - "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":30,\"MaxAttempts\":240,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkisComplete2E51021B", - "Arn" - ] - }, - "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", - { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonTimeoutC98D33BB", - "Arn" - ] - }, - "\"}}}" - ] - ] - }, - "RoleArn": { - "Fn::GetAtt": [ - "TableManagerCustomProviderwaiterstatemachineRole9616A97E", - "Arn" - ] - } - }, - "DependsOn": [ - "TableManagerCustomProviderwaiterstatemachineRoleDefaultPolicy485A85C2", - "TableManagerCustomProviderwaiterstatemachineRole9616A97E" - ] - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:PutRetentionPolicy", - "logs:DeleteRetentionPolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "Roles": [ - { - "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ] - } - }, - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Handler": "index.handler", - "Runtime": "nodejs18.x", - "Timeout": 900, - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "5bc602ecde93c947efe5899ae355f999986a1acbe610b1c0b9c468d738857555.zip" - }, - "Role": { - "Fn::GetAtt": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", - "Arn" - ] - } - }, - "DependsOn": [ - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", - "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - ] - } - }, - "Mappings": { - "ServiceprincipalMap": { - "af-south-1": { - "states": "states.af-south-1.amazonaws.com" - }, - "ap-east-1": { - "states": "states.ap-east-1.amazonaws.com" - }, - "ap-northeast-1": { - "states": "states.ap-northeast-1.amazonaws.com" - }, - "ap-northeast-2": { - "states": "states.ap-northeast-2.amazonaws.com" - }, - "ap-northeast-3": { - "states": "states.ap-northeast-3.amazonaws.com" - }, - "ap-south-1": { - "states": "states.ap-south-1.amazonaws.com" - }, - "ap-south-2": { - "states": "states.ap-south-2.amazonaws.com" - }, - "ap-southeast-1": { - "states": "states.ap-southeast-1.amazonaws.com" - }, - "ap-southeast-2": { - "states": "states.ap-southeast-2.amazonaws.com" - }, - "ap-southeast-3": { - "states": "states.ap-southeast-3.amazonaws.com" - }, - "ap-southeast-4": { - "states": "states.ap-southeast-4.amazonaws.com" - }, - "ca-central-1": { - "states": "states.ca-central-1.amazonaws.com" - }, - "cn-north-1": { - "states": "states.cn-north-1.amazonaws.com" - }, - "cn-northwest-1": { - "states": "states.cn-northwest-1.amazonaws.com" - }, - "eu-central-1": { - "states": "states.eu-central-1.amazonaws.com" - }, - "eu-central-2": { - "states": "states.eu-central-2.amazonaws.com" - }, - "eu-north-1": { - "states": "states.eu-north-1.amazonaws.com" - }, - "eu-south-1": { - "states": "states.eu-south-1.amazonaws.com" - }, - "eu-south-2": { - "states": "states.eu-south-2.amazonaws.com" - }, - "eu-west-1": { - "states": "states.eu-west-1.amazonaws.com" - }, - "eu-west-2": { - "states": "states.eu-west-2.amazonaws.com" - }, - "eu-west-3": { - "states": "states.eu-west-3.amazonaws.com" - }, - "il-central-1": { - "states": "states.il-central-1.amazonaws.com" - }, - "me-central-1": { - "states": "states.me-central-1.amazonaws.com" - }, - "me-south-1": { - "states": "states.me-south-1.amazonaws.com" - }, - "sa-east-1": { - "states": "states.sa-east-1.amazonaws.com" - }, - "us-east-1": { - "states": "states.us-east-1.amazonaws.com" - }, - "us-east-2": { - "states": "states.us-east-2.amazonaws.com" - }, - "us-gov-east-1": { - "states": "states.us-gov-east-1.amazonaws.com" - }, - "us-gov-west-1": { - "states": "states.us-gov-west-1.amazonaws.com" - }, - "us-iso-east-1": { - "states": "states.amazonaws.com" - }, - "us-iso-west-1": { - "states": "states.amazonaws.com" - }, - "us-isob-east-1": { - "states": "states.amazonaws.com" - }, - "us-west-1": { - "states": "states.us-west-1.amazonaws.com" - }, - "us-west-2": { - "states": "states.us-west-2.amazonaws.com" - } - } - }, - "Parameters": { - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - } - }, - "Outputs": { - "amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEventE4FBF539Arn": { - "Value": { - "Fn::GetAtt": [ - "TableManagerCustomProviderframeworkonEvent1DFC2ECC", - "Arn" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json b/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json deleted file mode 100644 index a36d4b3125..0000000000 --- a/packages/integration-tests/test-projects/standalone-data-sandbox-mode/expected-cdk-out/amplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataTodo80505FFF.nested.template.json +++ /dev/null @@ -1,1235 +0,0 @@ -{ - "Parameters": { - "DynamoDBModelTableReadIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of read IOPS the table should support." - }, - "DynamoDBModelTableWriteIOPS": { - "Type": "Number", - "Default": 5, - "Description": "The number of write IOPS the table should support." - }, - "DynamoDBBillingMode": { - "Type": "String", - "Default": "PAY_PER_REQUEST", - "AllowedValues": [ - "PAY_PER_REQUEST", - "PROVISIONED" - ], - "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." - }, - "DynamoDBEnablePointInTimeRecovery": { - "Type": "String", - "Default": "false", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Whether to enable Point in Time Recovery on the table." - }, - "DynamoDBEnableServerSideEncryption": { - "Type": "String", - "Default": "true", - "AllowedValues": [ - "true", - "false" - ], - "Description": "Enable server side encryption powered by KMS." - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId": { - "Type": "String" - }, - "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name": { - "Type": "String" - } - }, - "Conditions": { - "HasEnvironmentParameter": { - "Fn::Not": [ - { - "Fn::Equals": [ - "NONE", - "NONE" - ] - } - ] - }, - "ShouldUseServerSideEncryption": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnableServerSideEncryption" - }, - "true" - ] - }, - "ShouldUsePayPerRequestBilling": { - "Fn::Equals": [ - { - "Ref": "DynamoDBBillingMode" - }, - "PAY_PER_REQUEST" - ] - }, - "ShouldUsePointInTimeRecovery": { - "Fn::Equals": [ - { - "Ref": "DynamoDBEnablePointInTimeRecovery" - }, - "true" - ] - } - }, - "Resources": { - "TodoTable": { - "Type": "Custom::AmplifyDynamoDBTable", - "Properties": { - "ServiceToken": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource8C0952BCOutputsamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataAmplifyTableManagerTableD81D951E" - }, - "tableName": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - } - ], - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - } - ], - "provisionedThroughput": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - { - "Ref": "AWS::NoValue" - }, - { - "ReadCapacityUnits": { - "Ref": "DynamoDBModelTableReadIOPS" - }, - "WriteCapacityUnits": { - "Ref": "DynamoDBModelTableWriteIOPS" - } - } - ] - }, - "sseSpecification": { - "sseEnabled": { - "Fn::If": [ - "ShouldUseServerSideEncryption", - true, - false - ] - } - }, - "streamSpecification": { - "streamViewType": "NEW_AND_OLD_IMAGES" - }, - "allowDestructiveGraphqlSchemaUpdates": false, - "replaceTableUponGsiUpdate": false, - "pointInTimeRecoverySpecification": { - "Fn::If": [ - "ShouldUsePointInTimeRecovery", - { - "PointInTimeRecoveryEnabled": true - }, - { - "Ref": "AWS::NoValue" - } - ] - }, - "billingMode": { - "Fn::If": [ - "ShouldUsePayPerRequestBilling", - "PAY_PER_REQUEST", - { - "Ref": "AWS::NoValue" - } - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "TodoIAMRole2DA8E66E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "RoleName": { - "Fn::Join": [ - "", - [ - "TodoIAMRolecfd440-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - }, - "TodoIAMRoleDefaultPolicy7BBBF45B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TodoIAMRoleDefaultPolicy7BBBF45B", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "DynamoDBAccess71ABE5AE": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:DeleteItem", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:Query", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - }, - { - "Fn::Sub": [ - "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", - { - "tablename": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - } - } - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "DynamoDBAccess71ABE5AE", - "Roles": [ - { - "Ref": "TodoIAMRole2DA8E66E" - } - ] - } - }, - "TodoDataSource": { - "Type": "AWS::AppSync::DataSource", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DynamoDBConfig": { - "AwsRegion": { - "Ref": "AWS::Region" - }, - "TableName": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - } - }, - "Name": "TodoTable", - "ServiceRoleArn": { - "Fn::GetAtt": [ - "TodoIAMRole2DA8E66E", - "Arn" - ] - }, - "Type": "AMAZON_DYNAMODB" - }, - "DependsOn": [ - "TodoIAMRole2DA8E66E" - ] - }, - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerygetTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryGetTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "GetTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "getTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerygetTodopostAuth0FunctionQuerygetTodopostAuth0FunctionAppSyncFunction6BE14593", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryGetTodoDataResolverFnQueryGetTodoDataResolverFnAppSyncFunctionE2B57DAD", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "QuerylistTodospostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "QueryListTodosDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3665466abf40cc747bff935f1cf2f49edd920e2cd12d45d502d3857488b3ff3e.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "ListTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "listTodos", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "QuerylistTodospostAuth0FunctionQuerylistTodospostAuth0FunctionAppSyncFunction154D8577", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "QueryListTodosDataResolverFnQueryListTodosDataResolverFnAppSyncFunctionF825FE47", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTodos\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Query" - } - }, - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01dd50f40481ed4d3b0fb1a5f22dbe631b252847144e59c565ad3874813dc77c.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationcreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2bf64327ca5682da4be84d0d16440204e25abc3a221195b41f2d21dfa432e5ab.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "CreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "createTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationcreateTodoinit0FunctionMutationcreateTodoinit0FunctionAppSyncFunction54DE5B8B", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationcreateTodopostAuth0FunctionMutationcreateTodopostAuth0FunctionAppSyncFunctionED59EB9F", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationCreateTodoDataResolverFnMutationCreateTodoDataResolverFnAppSyncFunction900EC5CF", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodoinit0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationupdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "UpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "updateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationupdateTodoinit0FunctionMutationupdateTodoinit0FunctionAppSyncFunction1B95BB19", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationupdateTodopostAuth0FunctionMutationupdateTodopostAuth0FunctionAppSyncFunction50C507D7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationUpdateTodoDataResolverFnMutationUpdateTodoDataResolverFnAppSyncFunctionBC238C49", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationdeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Fn::GetAtt": [ - "TodoDataSource", - "Name" - ] - }, - "FunctionVersion": "2018-05-29", - "Name": "MutationDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" - } - }, - "DependsOn": [ - "TodoDataSource" - ] - }, - "DeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "deleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "MutationdeleteTodopostAuth0FunctionMutationdeleteTodopostAuth0FunctionAppSyncFunction483271A2", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "MutationDeleteTodoDataResolverFnMutationDeleteTodoDataResolverFnAppSyncFunction3879153F", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "/", - { - "Fn::Select": [ - 5, - { - "Fn::Split": [ - ":", - { - "Fn::GetAtt": [ - "TodoTable", - "TableArn" - ] - } - ] - } - ] - } - ] - } - ] - }, - "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Mutation" - } - }, - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononCreateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnCreateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononCreateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onCreateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononCreateTodopostAuth0FunctionSubscriptiononCreateTodopostAuth0FunctionAppSyncFunction18E34C4E", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnCreateTodoDataResolverFnSubscriptionOnCreateTodoDataResolverFnAppSyncFunction462A70C9", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononUpdateTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnUpdateTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononUpdateTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onUpdateTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononUpdateTodopostAuth0FunctionSubscriptiononUpdateTodopostAuth0FunctionAppSyncFunction04445BC7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnUpdateTodoDataResolverFnSubscriptionOnUpdateTodoDataResolverFnAppSyncFunction523DF0E4", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - }, - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptiononDeleteTodopostAuth0Function", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07a05bd2c51ef4301689c4b8ad017df158d0d180155b71f76fa4feafbd01583.vtl" - }, - "ResponseMappingTemplate": "$util.toJson({})" - } - }, - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C": { - "Type": "AWS::AppSync::FunctionConfiguration", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "DataSourceName": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPINONEDS1C56C895Name" - }, - "FunctionVersion": "2018-05-29", - "Name": "SubscriptionOnDeleteTodoDataResolverFn", - "RequestMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" - }, - "ResponseMappingTemplateS3Location": { - "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" - } - } - }, - "SubscriptiononDeleteTodoResolver": { - "Type": "AWS::AppSync::Resolver", - "Properties": { - "ApiId": { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "FieldName": "onDeleteTodo", - "Kind": "PIPELINE", - "PipelineConfig": { - "Functions": [ - { - "Fn::GetAtt": [ - "SubscriptiononDeleteTodopostAuth0FunctionSubscriptiononDeleteTodopostAuth0FunctionAppSyncFunctionE131CBE7", - "FunctionId" - ] - }, - { - "Fn::GetAtt": [ - "SubscriptionOnDeleteTodoDataResolverFnSubscriptionOnDeleteTodoDataResolverFnAppSyncFunction3E641E8C", - "FunctionId" - ] - } - ] - }, - "RequestMappingTemplate": { - "Fn::Join": [ - "", - [ - "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTodo\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" - ] - ] - }, - "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", - "TypeName": "Subscription" - } - } - }, - "Outputs": { - "GetAttTodoTableStreamArn": { - "Description": "Your DynamoDB table StreamArn.", - "Value": { - "Fn::GetAtt": [ - "TodoTable", - "TableStreamArn" - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:StreamArn" - ] - ] - } - } - }, - "GetAttTodoTableName": { - "Description": "Your DynamoDB table name.", - "Value": { - "Fn::Join": [ - "", - [ - "Todo-", - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "-NONE" - ] - ] - }, - "Export": { - "Name": { - "Fn::Join": [ - ":", - [ - { - "Ref": "referencetoamplifytestAppIdtestBranchNamebranch7d6f6c854adataamplifyDataGraphQLAPI8E80FACEApiId" - }, - "GetAtt:TodoTable:Name" - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/packages/integration-tests/tsconfig.json b/packages/integration-tests/tsconfig.json index 148f61b046..5ac3f702d1 100644 --- a/packages/integration-tests/tsconfig.json +++ b/packages/integration-tests/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "../../tsconfig.base.json", - "compilerOptions": { "rootDir": "src", "outDir": "lib" }, + "compilerOptions": { "rootDir": "src", "outDir": "lib", "allowJs": true }, "references": [ { "path": "../backend" }, { "path": "../backend-auth" }, @@ -9,5 +9,5 @@ { "path": "../client-config" }, { "path": "../platform-core" } ], - "exclude": ["**/node_modules", "**/lib", "src/e2e-tests", "test-projects"] + "exclude": ["**/node_modules", "**/lib", "src/e2e-tests"] } From e22c43c881ac488f99f837b40230671fb66d5151 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 12:54:15 -0800 Subject: [PATCH 04/17] update tsconfig --- packages/integration-tests/tsconfig.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/integration-tests/tsconfig.json b/packages/integration-tests/tsconfig.json index 5ac3f702d1..3e171885a9 100644 --- a/packages/integration-tests/tsconfig.json +++ b/packages/integration-tests/tsconfig.json @@ -3,9 +3,7 @@ "compilerOptions": { "rootDir": "src", "outDir": "lib", "allowJs": true }, "references": [ { "path": "../backend" }, - { "path": "../backend-auth" }, { "path": "../backend-secret" }, - { "path": "../backend-storage" }, { "path": "../client-config" }, { "path": "../platform-core" } ], From abc8c4f250ab3604265e39f2f455b2991f3c0973 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 13:22:08 -0800 Subject: [PATCH 05/17] fix e2e test secret loading --- .../data_storage_auth_with_triggers.ts | 34 +++++++------------ .../amplify/auth/resource.cjs | 13 ++++--- .../amplify/constants.cjs | 10 ------ .../amplify/auth/resource.js | 13 ++++--- .../amplify/constants.js | 8 ----- .../amplify/auth/resource.ts | 13 ++++--- .../amplify/constants.ts | 8 ----- 7 files changed, 30 insertions(+), 69 deletions(-) delete mode 100644 packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs delete mode 100644 packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js delete mode 100644 packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts diff --git a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts index 772c1d9ed8..47aa9422fc 100644 --- a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts +++ b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts @@ -11,12 +11,6 @@ import { DeployedResourcesFinder } from '../find_deployed_resource.js'; import assert from 'node:assert'; import { InvokeCommand, LambdaClient } from '@aws-sdk/client-lambda'; -type TestConstant = { - secretNames: { - [name: string]: string; - }; -}; - /** * Creates test projects with data, storage, and auth categories. */ @@ -73,11 +67,6 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { import.meta.url ); - private readonly sourceProjectConstantFilePath: string = new URL( - `${this.sourceProjectAmplifyDirSuffix}/constants.ts`, - import.meta.url - ).toString(); - private readonly sourceProjectUpdateDirPath: URL = new URL( `${this.sourceProjectDirPath}/update-1`, import.meta.url @@ -85,6 +74,15 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { private readonly dataResourceFileSuffix = 'data/resource.ts'; + private readonly testSecretNames = [ + 'googleId', + 'googleSecret', + 'facebookId', + 'facebookSecret', + 'amazonId', + 'amazonSecret', + ]; + /** * Create a test project instance. */ @@ -173,12 +171,8 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { private setUpDeployEnvironment = async ( backendId: BackendIdentifier ): Promise => { - const { secretNames } = (await import( - this.sourceProjectConstantFilePath - )) as TestConstant; - for (const secretField in secretNames) { - const secretName = secretNames[secretField]; - const secretValue = `${secretName as string}-e2eTestValue`; + for (const secretName in this.testSecretNames) { + const secretValue = `${secretName}-e2eTestValue`; await this.secretClient.setSecret(backendId, secretName, secretValue); } }; @@ -186,12 +180,8 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { private clearDeployEnvironment = async ( backendId: BackendIdentifier ): Promise => { - const { secretNames } = (await import( - this.sourceProjectConstantFilePath - )) as TestConstant; // clear secrets - for (const secretField in secretNames) { - const secretName = secretNames[secretField]; + for (const secretName in this.testSecretNames) { await this.secretClient.removeSecret(backendId, secretName); } }; diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs index e839a80270..9a27451ad4 100644 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/auth/resource.cjs @@ -2,23 +2,22 @@ const { defineAuth, secret } = require('@aws-amplify/backend'); const { myFunc } = require('../function.cjs'); -const { secretNames } = require('../constants.cjs'); const auth = defineAuth({ loginWith: { email: true, externalProviders: { google: { - clientId: secret(secretNames.googleId), - clientSecret: secret(secretNames.googleSecret), + clientId: secret('googleId'), + clientSecret: secret('googleSecret'), }, facebook: { - clientId: secret(secretNames.facebookId), - clientSecret: secret(secretNames.facebookSecret), + clientId: secret('facebookId'), + clientSecret: secret('facebookSecret'), }, loginWithAmazon: { - clientId: secret(secretNames.amazonId), - clientSecret: secret(secretNames.amazonSecret), + clientId: secret('amazonId'), + clientSecret: secret('amazonSecret'), }, }, }, diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs deleted file mode 100644 index 0a17ffcc9b..0000000000 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-cjs/amplify/constants.cjs +++ /dev/null @@ -1,10 +0,0 @@ -const secretNames = { - googleId: 'testGoogleId', - googleSecret: 'testGoogleSecret', - facebookId: 'testFacebookId', - facebookSecret: 'testFacebookSecret', - amazonId: 'testAmazonId', - amazonSecret: 'testAmazonSecret', -}; - -module.exports = { secretNames }; diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js index 0fcb2cbcf1..e9d529be53 100644 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/auth/resource.js @@ -1,22 +1,21 @@ import { defineAuth, secret } from '@aws-amplify/backend'; import { myFunc } from '../function.js'; -import { secretNames } from '../constants.js'; export const auth = defineAuth({ loginWith: { email: true, externalProviders: { google: { - clientId: secret(secretNames.googleId), - clientSecret: secret(secretNames.googleSecret), + clientId: secret('googleId'), + clientSecret: secret('googleSecret'), }, facebook: { - clientId: secret(secretNames.facebookId), - clientSecret: secret(secretNames.facebookSecret), + clientId: secret('facebookId'), + clientSecret: secret('facebookSecret'), }, loginWithAmazon: { - clientId: secret(secretNames.amazonId), - clientSecret: secret(secretNames.amazonSecret), + clientId: secret('amazonId'), + clientSecret: secret('amazonSecret'), }, }, }, diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js deleted file mode 100644 index b5d769150e..0000000000 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-js/amplify/constants.js +++ /dev/null @@ -1,8 +0,0 @@ -export const secretNames = { - googleId: 'testGoogleId', - googleSecret: 'testGoogleSecret', - facebookId: 'testFacebookId', - facebookSecret: 'testFacebookSecret', - amazonId: 'testAmazonId', - amazonSecret: 'testAmazonSecret', -}; diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts index 0fcb2cbcf1..e9d529be53 100644 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/auth/resource.ts @@ -1,22 +1,21 @@ import { defineAuth, secret } from '@aws-amplify/backend'; import { myFunc } from '../function.js'; -import { secretNames } from '../constants.js'; export const auth = defineAuth({ loginWith: { email: true, externalProviders: { google: { - clientId: secret(secretNames.googleId), - clientSecret: secret(secretNames.googleSecret), + clientId: secret('googleId'), + clientSecret: secret('googleSecret'), }, facebook: { - clientId: secret(secretNames.facebookId), - clientSecret: secret(secretNames.facebookSecret), + clientId: secret('facebookId'), + clientSecret: secret('facebookSecret'), }, loginWithAmazon: { - clientId: secret(secretNames.amazonId), - clientSecret: secret(secretNames.amazonSecret), + clientId: secret('amazonId'), + clientSecret: secret('amazonSecret'), }, }, }, diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts deleted file mode 100644 index b5d769150e..0000000000 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/constants.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const secretNames = { - googleId: 'testGoogleId', - googleSecret: 'testGoogleSecret', - facebookId: 'testFacebookId', - facebookSecret: 'testFacebookSecret', - amazonId: 'testAmazonId', - amazonSecret: 'testAmazonSecret', -}; From 1849f8760465a71d2a4fd822592f7695b832fbd1 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 14:27:28 -0800 Subject: [PATCH 06/17] fix secrets iteration --- .../src/test-project-setup/data_storage_auth_with_triggers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts index 47aa9422fc..519a108963 100644 --- a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts +++ b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts @@ -171,7 +171,7 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { private setUpDeployEnvironment = async ( backendId: BackendIdentifier ): Promise => { - for (const secretName in this.testSecretNames) { + for (const secretName of this.testSecretNames) { const secretValue = `${secretName}-e2eTestValue`; await this.secretClient.setSecret(backendId, secretName, secretValue); } From 91c88ad14123e1c4250a668b624c40220358f58f Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 14:49:19 -0800 Subject: [PATCH 07/17] more fixes --- .../src/test-project-setup/data_storage_auth_with_triggers.ts | 4 ++-- .../src/test-project-setup/minimal_with_typescript_idioms.ts | 2 +- packages/integration-tests/tsconfig.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts index 519a108963..117c51e456 100644 --- a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts +++ b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts @@ -58,7 +58,7 @@ export class DataStorageAuthWithTriggerTestProjectCreator */ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { readonly sourceProjectDirPath = - '../test-projects/data-storage-auth-with-triggers-ts'; + '../../src/test-projects/data-storage-auth-with-triggers-ts'; readonly sourceProjectAmplifyDirSuffix = `${this.sourceProjectDirPath}/amplify`; @@ -181,7 +181,7 @@ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { backendId: BackendIdentifier ): Promise => { // clear secrets - for (const secretName in this.testSecretNames) { + for (const secretName of this.testSecretNames) { await this.secretClient.removeSecret(backendId, secretName); } }; diff --git a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts index b017f812b7..8acf5d5146 100644 --- a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts +++ b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts @@ -43,7 +43,7 @@ export class MinimalWithTypescriptIdiomTestProjectCreator */ class MinimalWithTypescriptIdiomTestProject extends TestProjectBase { readonly sourceProjectDirPath = - '../test-projects/minimalist-project-with-typescript-idioms'; + '../../src/test-projects/minimalist-project-with-typescript-idioms'; readonly sourceProjectAmplifyDirSuffix = `${this.sourceProjectDirPath}/amplify`; diff --git a/packages/integration-tests/tsconfig.json b/packages/integration-tests/tsconfig.json index 3e171885a9..1f51a22e20 100644 --- a/packages/integration-tests/tsconfig.json +++ b/packages/integration-tests/tsconfig.json @@ -7,5 +7,5 @@ { "path": "../client-config" }, { "path": "../platform-core" } ], - "exclude": ["**/node_modules", "**/lib", "src/e2e-tests"] + "exclude": ["**/node_modules", "**/lib"] } From 06ebca872722d32a279f5f7fa6acf5f52b6d8da4 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 15:01:40 -0800 Subject: [PATCH 08/17] e2e passing --- .../src/cdk_out_dir_validator.ts | 158 ------------------ .../src/cdk_snapshot_test_runner.ts | 107 ------------ .../src/cdk_snapshot_test_suite_generator.ts | 49 ------ packages/integration-tests/src/index.ts | 2 - .../data_storage_auth_with_triggers.ts | 2 + .../minimal_with_typescript_idioms.ts | 2 + 6 files changed, 4 insertions(+), 316 deletions(-) delete mode 100644 packages/integration-tests/src/cdk_out_dir_validator.ts delete mode 100644 packages/integration-tests/src/cdk_snapshot_test_runner.ts delete mode 100644 packages/integration-tests/src/cdk_snapshot_test_suite_generator.ts delete mode 100644 packages/integration-tests/src/index.ts diff --git a/packages/integration-tests/src/cdk_out_dir_validator.ts b/packages/integration-tests/src/cdk_out_dir_validator.ts deleted file mode 100644 index 15d4821051..0000000000 --- a/packages/integration-tests/src/cdk_out_dir_validator.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { glob } from 'glob'; -import path from 'path'; -import assert from 'node:assert'; -import * as fse from 'fs-extra/esm'; -import * as fs from 'fs'; -import * as fsp from 'fs/promises'; -import { ObjectPath, Predicate, assertCustomMatch } from './object_compare.js'; - -const UPDATE_SNAPSHOTS = process.env.UPDATE_INTEGRATION_SNAPSHOTS === 'true'; - -const matchHashedJsonFile: Predicate = (actual, expected) => { - const jsonFileHashRegex = /^\/[a-z0-9]{64}\.json$/; - return ( - typeof actual === 'string' && - jsonFileHashRegex.test(actual) && - typeof expected === 'string' && - jsonFileHashRegex.test(expected) - ); -}; - -const matchTimestamp: Predicate = (actual, expected) => - typeof actual === 'number' && typeof expected === 'number'; - -const nestedStackDescriptions = new Set([ - 'An auto-generated nested stack for the @function directive.', -]); - -const customMatchers: Map = new Map([ - [ - [ - 'Resources', - 'data7552DF31', - 'Properties', - 'TemplateURL', - 'Fn::Join', - 1, - 6, - ], - matchHashedJsonFile, - ], - [ - [ - 'Resources', - 'auth179371D7', - 'Properties', - 'TemplateURL', - 'Fn::Join', - 1, - 6, - ], - matchHashedJsonFile, - ], - [ - [ - 'Resources', - 'function1351588B', - 'Properties', - 'TemplateURL', - 'Fn::Join', - 1, - 6, - ], - matchHashedJsonFile, - ], - [ - [ - 'Resources', - 'storage0EC3F24A', - 'Properties', - 'TemplateURL', - 'Fn::Join', - 1, - 6, - ], - matchHashedJsonFile, - ], - [ - [ - 'Resources', - 'amplifyDataGraphQLAPIDefaultApiKey1C8ED374', - 'Properties', - 'Expires', - ], - matchTimestamp, - ], - [ - ['Description'], - // the description field of the gql template contains a JSON string that includes "createdOn": "Linux|Mac|Windows" - // this check just verifies that the string is valid JSON because the createdOn value is different for each platform - // Deeply nested stacks may not adhere to this, so we check if the stack description is expected, short-circuiting parse. - (actual) => - typeof actual === 'string' && - (nestedStackDescriptions.has(actual) || JSON.parse(actual)), - ], -]); - -/** - * Essentially a snapshot validator. - * - * It checks that actualDir and expectedDir have the same files (ignoring ignoreFiles defined below) - * It then checks that all JSON files parse to identical objects - * It fails if a non-JSON file is found - * @param actualDir The actual cdk synth output generated by the test - * @param expectedDir The expected cdk synth output - */ -export const validateCdkOutDir = async ( - actualDir: string, - expectedDir: string -) => { - // These are CDK internal bookkeeping files that change across minor versions of CDK. - // We only care about validating the CFN templates - const ignoreFiles = ['tree.json', 'cdk.out', 'manifest.json', '.assets.json']; - - const actualPaths = await glob(path.join(actualDir, '*')); - const expectedPaths = await glob(path.join(expectedDir, '*')); - - /** - * Filter out ignoreFiles and sort - */ - const normalize = (paths: string[]) => - paths - .filter((p) => !ignoreFiles.some((ignoreFile) => p.endsWith(ignoreFile))) - .filter((p) => !path.basename(p).startsWith('asset.')) - .sort(); - - const normalizedActualPaths = normalize(actualPaths); - const normalizedExpectedPaths = normalize(expectedPaths); - - if (UPDATE_SNAPSHOTS) { - await fsp.rm(expectedDir, { recursive: true, force: true }); - await fsp.mkdir(expectedDir, { recursive: true }); - normalizedActualPaths.forEach((actualPath) => { - const destination = path.resolve(expectedDir, path.basename(actualPath)); - fse.copySync(actualPath, destination); - }); - return; - } - - assert.deepStrictEqual( - normalizedActualPaths.map((fileName) => path.basename(fileName)), - normalizedExpectedPaths.map((fileName) => path.basename(fileName)) - ); - - // check that JSON files parse to the same object - for (let i = 0; i < normalizedActualPaths.length; i++) { - const actualFile = normalizedActualPaths[i]; - const expectedFile = normalizedExpectedPaths[i]; - if (path.extname(normalizedActualPaths[i]) !== '.json') { - assert.fail(`Unknown file type ${actualFile}`); - } - const actualObj = JSON.parse(fs.readFileSync(actualFile, 'utf-8')); - const expectedObj = JSON.parse(fs.readFileSync(expectedFile, 'utf-8')); - - // there are some CDK asset hashes that differ when the template is synthesized on different operating systems - // we specify a custom match rule for some paths in the template to work around these differences - assertCustomMatch(actualObj, expectedObj, customMatchers); - } -}; diff --git a/packages/integration-tests/src/cdk_snapshot_test_runner.ts b/packages/integration-tests/src/cdk_snapshot_test_runner.ts deleted file mode 100644 index 230a2b26f5..0000000000 --- a/packages/integration-tests/src/cdk_snapshot_test_runner.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { afterEach, beforeEach, describe, it } from 'node:test'; -import path from 'path'; -import assert from 'node:assert'; -import * as os from 'os'; -import * as fs from 'fs'; -import { validateCdkOutDir } from './cdk_out_dir_validator.js'; -import { pathToFileURL } from 'url'; -import { CDKContextKey } from '@aws-amplify/platform-core'; - -export type CDKSynthSnapshotTestCase = { - name: string; - absoluteBackendFilePath: string; - absoluteExpectedCdkOutDir: string; -}; - -/** - * Run a set of integration test cases - */ -export const runCDKSnapshotTestSuite = ( - suiteName: string, - testCases: CDKSynthSnapshotTestCase[] -) => { - // concurrency of 1 is needed because the tests set environment variables that would create a race condition if multiple tests ran in parallel - void describe(suiteName, { concurrency: 1 }, () => { - testCases.forEach(runCDKSnapshotTest); - }); -}; - -/** - * Executes a single CDK snapshot test - * - * It creates a temp dir for test synth output - * It sets environment variables that are picked up by CDK synth to determine CDK context and synth output location - * Then it synthesizes the provided CDK app under test and asserts that the synth output matches the expected output - * Lastly it deletes the test synth dir - */ -const runCDKSnapshotTest = ({ - name, - absoluteBackendFilePath, - absoluteExpectedCdkOutDir, -}: CDKSynthSnapshotTestCase) => { - beforeEach(async () => { - // see https://github.com/aws/aws-cdk/blob/30596fe96bfba240a70e53ab64a9acbf39e92f77/packages/aws-cdk-lib/cx-api/lib/cxapi.ts#L4-L5 - process.env.CDK_OUTDIR = await createTempCdkOutDirForTest(name); - process.env.CDK_CONTEXT_JSON = JSON.stringify({ - [CDKContextKey.BACKEND_NAMESPACE]: 'testAppId', - [CDKContextKey.BACKEND_NAME]: 'testBranchName', - [CDKContextKey.DEPLOYMENT_TYPE]: 'branch', - secretLastUpdated: 123456789, - }); - }); - afterEach(() => { - if (process.env.CDK_OUTDIR) { - fs.rmSync(process.env.CDK_OUTDIR, { recursive: true, force: true }); - } - }); - void it(name, async (t) => { - // this import must create the CDK App - await import(pathToFileURL(absoluteBackendFilePath).toString()); - - // now we find and execute the synth beforeExit listener that the CDK App attaches to the process - // see https://github.com/aws/aws-cdk/blob/9af05d85acf95138a149c03b1e4dfbc48284921a/packages/aws-cdk-lib/core/lib/app.ts#L192-L196 - const synth = process - .listeners('beforeExit') - .find((listener) => listener.toString().includes('this.synth()')); - assert.ok(synth, 'Could not find synth listener in beforeExit listeners'); - synth(0); - - // remove the synth listener now that it's been executed - // this allows other tests to run their synth command successfully - process.removeAllListeners('beforeExit'); - - // now check that the synth output matches the expected output - assert.ok( - process.env.CDK_OUTDIR, - 'CDK_OUTDIR environment variable not set' - ); - - const shouldSkipCdkOutValidation = - process.env[ - 'AMPLIFY_BACKEND_TESTS_DISABLE_INTEGRATION_SNAPSHOTS_COMPARISON' - ] === 'true'; - if (shouldSkipCdkOutValidation) { - t.diagnostic('Skipping CDK out validation.'); - return; - } - await validateCdkOutDir( - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - process.env.CDK_OUTDIR!, - absoluteExpectedCdkOutDir - ); - }); -}; - -/** - * Creates a unique temp dir in the os temp dir location for the test to put cdk synth output - * @param testName Used to make the temp dir identifiable with the test that created it - */ -const createTempCdkOutDirForTest = async (testName: string) => { - const dirPrefix = testName.trim().replace(/\s+/, '_'); - return new Promise((resolve, reject) => { - fs.mkdtemp(path.resolve(os.tmpdir(), `${dirPrefix}_`), (err, dirName) => { - if (err) reject(err); - resolve(dirName); - }); - }); -}; diff --git a/packages/integration-tests/src/cdk_snapshot_test_suite_generator.ts b/packages/integration-tests/src/cdk_snapshot_test_suite_generator.ts deleted file mode 100644 index 9f6f19a767..0000000000 --- a/packages/integration-tests/src/cdk_snapshot_test_suite_generator.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { CDKSynthSnapshotTestCase } from './cdk_snapshot_test_runner.js'; -import { BackendLocator } from '@aws-amplify/platform-core'; -import * as fs from 'fs'; -import * as path from 'path'; -import { fileURLToPath } from 'url'; - -/** - * Constructs an IntegrationTestCase[] given a directory that conforms to the following convention: - * - * If dirPath is an absolute path, it points to the directory - * If dirPath is relative, the directory is located at path.resolve(\, relativeDirPath) - * Each subdirectory is the name of the test - * Within each test directory is a backend.ts file that contains the `defineBackend({...})` entry point - * Within each test directory is an `expected-cdk-out` directory that contains a snapshot of the expected synthesis result of the backend - * @example - * - * \ - * test-name-1 - * backend.ts - * expected-cdk-out - * test-name-2 - * backend.ts - * expected-cdk-out - */ -export const fromConventionalDir = ( - dirPath: string -): CDKSynthSnapshotTestCase[] => { - const rootDir = path.isAbsolute(dirPath) - ? new URL(dirPath) - : new URL(dirPath, import.meta.url); - const testDirectories = fs - .readdirSync(rootDir, { withFileTypes: true }) - .filter((entry) => entry.isDirectory()); - return testDirectories.map((testDirectory) => ({ - name: testDirectory.name, - absoluteBackendFilePath: path.resolve( - fileURLToPath(rootDir), - testDirectory.name, - new BackendLocator( - path.join(fileURLToPath(rootDir), testDirectory.name) - ).locate() - ), - absoluteExpectedCdkOutDir: path.join( - fileURLToPath(rootDir), - testDirectory.name, - 'expected-cdk-out' - ), - })); -}; diff --git a/packages/integration-tests/src/index.ts b/packages/integration-tests/src/index.ts deleted file mode 100644 index b1329e07d1..0000000000 --- a/packages/integration-tests/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cdk_snapshot_test_runner.js'; -export * from './cdk_snapshot_test_suite_generator.js'; diff --git a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts index 117c51e456..9ccdcbe7a1 100644 --- a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts +++ b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts @@ -57,6 +57,8 @@ export class DataStorageAuthWithTriggerTestProjectCreator * Test project with data, storage, and auth categories. */ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { + // Note that this is pointing to the non-transpiled project directory + // This allows us to test that we are able to deploy js, cjs, ts, etc without transpiling with tsc first readonly sourceProjectDirPath = '../../src/test-projects/data-storage-auth-with-triggers-ts'; diff --git a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts index 8acf5d5146..cb68ec43a8 100644 --- a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts +++ b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts @@ -42,6 +42,8 @@ export class MinimalWithTypescriptIdiomTestProjectCreator * The minimal test with typescript idioms. */ class MinimalWithTypescriptIdiomTestProject extends TestProjectBase { + // Note that this is pointing to the non-transpiled project directory + // This allows us to test that we are able to deploy js, cjs, ts, etc without transpiling with tsc first readonly sourceProjectDirPath = '../../src/test-projects/minimalist-project-with-typescript-idioms'; From 300d5ff4aea87666f765f1aaab52ace8fd71c7f0 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 15:25:08 -0800 Subject: [PATCH 09/17] adding a few more tests --- package.json | 1 - .../test-in-memory/integration_tests.test.ts | 40 +++++++++++++++++++ .../amplify/data/resource.ts | 2 +- .../update-1/data/resource.ts | 2 +- .../amplify/backend.ts | 4 +- .../amplify/test_factories.ts | 3 ++ .../amplify/test_factories.ts | 3 ++ 7 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/test_factories.ts create mode 100644 packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/test_factories.ts diff --git a/package.json b/package.json index 148557ef82..a24b24a015 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "test:coverage:threshold": "c8 npm run test", "test:dir": "tsx --test --test-reporter spec", "update:api": "npm run update:api --workspaces", - "update:integration-snapshots": "UPDATE_INTEGRATION_SNAPSHOTS=true tsx --test --test-reporter spec packages/integration-tests/lib/test-in-memory", "update:tsconfig-refs": "tsx scripts/update_tsconfig_refs.ts", "vend": "npm run start:npm-proxy && npm run publish:local", "watch": "npm run build -- --watch" diff --git a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts index daae73c73f..d6ecfa4e4e 100644 --- a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts +++ b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts @@ -4,6 +4,15 @@ import { defineBackendTemplateHarness, } from '../define_backend_template_harness.js'; import { it } from 'node:test'; +import { dataWithoutAuth } from '../test-projects/standalone-data-auth-modes/amplify/test_factories.js'; +import { dataWithoutAuthNoAuthMode } from '../test-projects/standalone-data-sandbox-mode/amplify/test_factories.js'; + +/** + * This test suite is meant to provide a fast feedback loop to sanity check that different feature verticals are working properly together. + * Specific feature configurations should be checked at the unit test level. + * Some assertions about how feature verticals interact could be appropriate here. + * Critical path interactions should be exercised in a full e2e test. + */ void it('data storage auth with triggers', () => { const templates = defineBackendTemplateHarness(dataStorageAuthWithTriggers); @@ -32,3 +41,34 @@ void it('data storage auth with triggers', () => { 'amplifyStorageamplifyStorageBucketC2F702CD', ]); }); + +void it('data without auth with lambda auth mode', () => { + const templates = defineBackendTemplateHarness(dataWithoutAuth); + + assertStableLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ + 'data7552DF31', + 'function1351588B', + ]); + assertStableLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ + 'amplifyDataGraphQLAPI42A6FA33', + ]); + assertStableLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ + 'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833', + 'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56', + ]); +}); + +void it('data without auth with default auth mode', () => { + const templates = defineBackendTemplateHarness(dataWithoutAuthNoAuthMode); + + assertStableLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ + 'data7552DF31', + ]); + assertStableLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ + 'amplifyDataGraphQLAPI42A6FA33', + ]); + assertStableLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ + 'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833', + 'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56', + ]); +}); diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts index 021353062a..ae575df950 100644 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/amplify/data/resource.ts @@ -26,7 +26,7 @@ const schema = a.schema({ .returns(a.ref('EchoResponse')) .authorization([a.allow.private()]) .function('echo'), -}) as never; +}) as never; // Not 100% sure why TS is complaining here. The error I'm getting is "The inferred type of 'schema' references an inaccessible 'unique symbol' type. A type annotation is necessary." export type Schema = ClientSchema; diff --git a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts index a340423032..2bdcdb89e6 100644 --- a/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts +++ b/packages/integration-tests/src/test-projects/data-storage-auth-with-triggers-ts/update-1/data/resource.ts @@ -26,7 +26,7 @@ const schema = a.schema({ .returns(a.ref('EchoResponse')) .authorization([a.allow.private()]) .function('echo'), -}) as never; +}) as never; // Not 100% sure why TS is complaining here. The error I'm getting is "The inferred type of 'schema' references an inaccessible 'unique symbol' type. A type annotation is necessary." export type Schema = ClientSchema; diff --git a/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/backend.ts b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/backend.ts index 031b6539ed..efdd89c65d 100644 --- a/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/backend.ts +++ b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/backend.ts @@ -1,4 +1,4 @@ import { defineBackend } from '@aws-amplify/backend'; -import { data } from './data/resource.js'; +import { dataWithoutAuth } from './test_factories.js'; -defineBackend({ data }); +defineBackend(dataWithoutAuth); diff --git a/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/test_factories.ts b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/test_factories.ts new file mode 100644 index 0000000000..5660e1e84a --- /dev/null +++ b/packages/integration-tests/src/test-projects/standalone-data-auth-modes/amplify/test_factories.ts @@ -0,0 +1,3 @@ +import { data } from './data/resource.js'; + +export const dataWithoutAuth = { data }; diff --git a/packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/test_factories.ts b/packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/test_factories.ts new file mode 100644 index 0000000000..b09dfe6159 --- /dev/null +++ b/packages/integration-tests/src/test-projects/standalone-data-sandbox-mode/amplify/test_factories.ts @@ -0,0 +1,3 @@ +import { data } from './data/resource.js'; + +export const dataWithoutAuthNoAuthMode = { data }; From 274c51698833d9999d1aa95c0c6f95367ba13be2 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 15:25:59 -0800 Subject: [PATCH 10/17] remove unnecessary file --- .../templates/basic-auth-data/factories_for_testing.ts | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts diff --git a/packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts b/packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts deleted file mode 100644 index 73b68fb684..0000000000 --- a/packages/create-amplify/templates/basic-auth-data/factories_for_testing.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { auth } from './amplify/auth/resource.js'; -import { data } from './amplify/data/resource.js'; - -export const basicAuthDataFactories = { - auth, - data, -}; From 5fb143fe8bd4e1a626863f0f53076b9f39c400c4 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 15:44:48 -0800 Subject: [PATCH 11/17] rename type --- .../src/define_backend_template_harness.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/integration-tests/src/define_backend_template_harness.ts b/packages/integration-tests/src/define_backend_template_harness.ts index fb101dc577..b11fddad25 100644 --- a/packages/integration-tests/src/define_backend_template_harness.ts +++ b/packages/integration-tests/src/define_backend_template_harness.ts @@ -22,9 +22,11 @@ export const assertStableLogicalIds = ( }; /** - * Wrapper around `defineBackend` that returns the CDK Stack of each backend resource + * Wrapper around `defineBackend` that returns CDK Template objects for each backend resource + * + * Supplies stable CDK context values to the synth process for deterministic synth output */ -export const defineBackendTemplateHarness: DefineBackendStackHarness = < +export const defineBackendTemplateHarness: DefineBackendTemplateHarness = < T extends Record> >( constructFactories: T @@ -53,7 +55,7 @@ export const defineBackendTemplateHarness: DefineBackendStackHarness = < return result as { [K in keyof T]: Template } & { root: Template }; }; -type DefineBackendStackHarness = < +type DefineBackendTemplateHarness = < T extends Record> >( constructFactories: T From 1db3286542ff3596deb45ede97f92b13cb446c0e Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 16:07:44 -0800 Subject: [PATCH 12/17] fix api extract and typedoc --- package.json | 2 +- packages/integration-tests/API.md | 22 ------------------- packages/integration-tests/api-extractor.json | 3 --- packages/integration-tests/typedoc.json | 3 --- 4 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 packages/integration-tests/API.md delete mode 100644 packages/integration-tests/api-extractor.json delete mode 100644 packages/integration-tests/typedoc.json diff --git a/package.json b/package.json index a24b24a015..5718b0ff70 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "test:coverage:generate": "NODE_V8_COVERAGE=coverage/ npm run test", "test:coverage:threshold": "c8 npm run test", "test:dir": "tsx --test --test-reporter spec", - "update:api": "npm run update:api --workspaces", + "update:api": "npm run update:api --workspaces --if-present", "update:tsconfig-refs": "tsx scripts/update_tsconfig_refs.ts", "vend": "npm run start:npm-proxy && npm run publish:local", "watch": "npm run build -- --watch" diff --git a/packages/integration-tests/API.md b/packages/integration-tests/API.md deleted file mode 100644 index 51bb7faf6c..0000000000 --- a/packages/integration-tests/API.md +++ /dev/null @@ -1,22 +0,0 @@ -## API Report File for "@aws-amplify/integration-tests" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -// @public (undocumented) -export type CDKSynthSnapshotTestCase = { - name: string; - absoluteBackendFilePath: string; - absoluteExpectedCdkOutDir: string; -}; - -// @public -export const fromConventionalDir: (dirPath: string) => CDKSynthSnapshotTestCase[]; - -// @public -export const runCDKSnapshotTestSuite: (suiteName: string, testCases: CDKSynthSnapshotTestCase[]) => void; - -// (No @packageDocumentation comment for this package) - -``` diff --git a/packages/integration-tests/api-extractor.json b/packages/integration-tests/api-extractor.json deleted file mode 100644 index 0f56de03f6..0000000000 --- a/packages/integration-tests/api-extractor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../api-extractor.base.json" -} diff --git a/packages/integration-tests/typedoc.json b/packages/integration-tests/typedoc.json deleted file mode 100644 index 35fed2c958..0000000000 --- a/packages/integration-tests/typedoc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "entryPoints": ["src/index.ts"] -} From 683c0e3b247572f2ea7e811689af2094284ef0d0 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 16:10:55 -0800 Subject: [PATCH 13/17] fix lint --- .../src/test-in-memory/integration_tests.test.ts | 1 + .../src/test-project-setup/data_storage_auth_with_triggers.ts | 4 ++-- .../src/test-project-setup/minimal_with_typescript_idioms.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts index d6ecfa4e4e..6817519a8a 100644 --- a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts +++ b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts @@ -38,6 +38,7 @@ void it('data storage auth with triggers', () => { ]); assertStableLogicalIds(templates.storage, 'AWS::S3::Bucket', [ + // eslint-disable-next-line spellcheck/spell-checker 'amplifyStorageamplifyStorageBucketC2F702CD', ]); }); diff --git a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts index 9ccdcbe7a1..12d0ac52b2 100644 --- a/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts +++ b/packages/integration-tests/src/test-project-setup/data_storage_auth_with_triggers.ts @@ -57,8 +57,8 @@ export class DataStorageAuthWithTriggerTestProjectCreator * Test project with data, storage, and auth categories. */ class DataStorageAuthWithTriggerTestProject extends TestProjectBase { - // Note that this is pointing to the non-transpiled project directory - // This allows us to test that we are able to deploy js, cjs, ts, etc without transpiling with tsc first + // Note that this is pointing to the non-compiled project directory + // This allows us to test that we are able to deploy js, cjs, ts, etc without compiling with tsc first readonly sourceProjectDirPath = '../../src/test-projects/data-storage-auth-with-triggers-ts'; diff --git a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts index cb68ec43a8..da051c9785 100644 --- a/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts +++ b/packages/integration-tests/src/test-project-setup/minimal_with_typescript_idioms.ts @@ -42,8 +42,8 @@ export class MinimalWithTypescriptIdiomTestProjectCreator * The minimal test with typescript idioms. */ class MinimalWithTypescriptIdiomTestProject extends TestProjectBase { - // Note that this is pointing to the non-transpiled project directory - // This allows us to test that we are able to deploy js, cjs, ts, etc without transpiling with tsc first + // Note that this is pointing to the non-compiled project directory + // This allows us to test that we are able to deploy js, cjs, ts, etc without compiling with tsc first readonly sourceProjectDirPath = '../../src/test-projects/minimalist-project-with-typescript-idioms'; From 75fa31cde6a0728856fb22d8d98eb07d166ec849 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 16:16:33 -0800 Subject: [PATCH 14/17] remove api extract script from integ test package --- packages/integration-tests/package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 1b33e04229..8714439470 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -19,8 +19,5 @@ "glob": "^10.2.7", "uuid": "^9.0.1" }, - "scripts": { - "update:api": "api-extractor run --local" - }, "license": "Apache-2.0" } From ad080c5794d15eaf7e872b6a306ba3a590eeba1b Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 1 Dec 2023 16:27:48 -0800 Subject: [PATCH 15/17] add empty changeset --- .changeset/chilled-camels-nail.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/chilled-camels-nail.md diff --git a/.changeset/chilled-camels-nail.md b/.changeset/chilled-camels-nail.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/chilled-camels-nail.md @@ -0,0 +1,2 @@ +--- +--- From e5eaff49cbc4dee0524bbdd7f6135d86b25e90d1 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Mon, 4 Dec 2023 09:50:05 -0800 Subject: [PATCH 16/17] PR comments --- package-lock.json | 8 ++--- package.json | 2 +- .../src/define_backend_template_harness.ts | 32 +++++++++++++------ .../test-in-memory/integration_tests.test.ts | 32 +++++++++---------- packages/integration-tests/tsconfig.json | 2 +- 5 files changed, 44 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0234104f83..907e82e9a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "rimraf": "^5.0.0", "tsx": "^3.12.6", "typedoc": "^0.25.3", - "typescript": "~5.2.0", + "typescript": "^5.3.2", "verdaccio": "^5.24.1" }, "engines": { @@ -19570,9 +19570,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 5718b0ff70..be61addacd 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "rimraf": "^5.0.0", "tsx": "^3.12.6", "typedoc": "^0.25.3", - "typescript": "~5.2.0", + "typescript": "~5.3.2", "verdaccio": "^5.24.1" }, "workspaces": [ diff --git a/packages/integration-tests/src/define_backend_template_harness.ts b/packages/integration-tests/src/define_backend_template_harness.ts index b11fddad25..6c7bf753b8 100644 --- a/packages/integration-tests/src/define_backend_template_harness.ts +++ b/packages/integration-tests/src/define_backend_template_harness.ts @@ -9,7 +9,7 @@ import { Construct } from 'constructs'; /** * Asserts that the provided template has resources of 'resourceType' with the expected logical IDs */ -export const assertStableLogicalIds = ( +export const assertExpectedLogicalIds = ( template: Template, resourceType: string, expectedLogicalIds: string[] @@ -22,21 +22,33 @@ export const assertStableLogicalIds = ( }; /** - * Wrapper around `defineBackend` that returns CDK Template objects for each backend resource + * Synthesizes deterministic `defineBackend` CDK templates for each backend resource * * Supplies stable CDK context values to the synth process for deterministic synth output */ -export const defineBackendTemplateHarness: DefineBackendTemplateHarness = < +export const synthesizeBackendTemplates: SynthesizeBackendTemplates = < + T extends Record> +>( + constructFactories: T +) => { + try { + process.env.CDK_CONTEXT_JSON = JSON.stringify({ + [CDKContextKey.BACKEND_NAMESPACE]: 'testAppId', + [CDKContextKey.BACKEND_NAME]: 'testBranchName', + [CDKContextKey.DEPLOYMENT_TYPE]: 'branch', + secretLastUpdated: 123456789, + }); + return backendTemplatesCollector(constructFactories); + } finally { + delete process.env.CDK_CONTEXT_JSON; + } +}; + +const backendTemplatesCollector: SynthesizeBackendTemplates = < T extends Record> >( constructFactories: T ) => { - process.env.CDK_CONTEXT_JSON = JSON.stringify({ - [CDKContextKey.BACKEND_NAMESPACE]: 'testAppId', - [CDKContextKey.BACKEND_NAME]: 'testBranchName', - [CDKContextKey.DEPLOYMENT_TYPE]: 'branch', - secretLastUpdated: 123456789, - }); if (Object.keys(constructFactories).length === 0) { throw new Error('constructFactories must have at least one entry'); } @@ -55,7 +67,7 @@ export const defineBackendTemplateHarness: DefineBackendTemplateHarness = < return result as { [K in keyof T]: Template } & { root: Template }; }; -type DefineBackendTemplateHarness = < +type SynthesizeBackendTemplates = < T extends Record> >( constructFactories: T diff --git a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts index 6817519a8a..5f34be654c 100644 --- a/packages/integration-tests/src/test-in-memory/integration_tests.test.ts +++ b/packages/integration-tests/src/test-in-memory/integration_tests.test.ts @@ -1,7 +1,7 @@ import { dataStorageAuthWithTriggers } from '../test-projects/data-storage-auth-with-triggers-ts/amplify/test_factories.js'; import { - assertStableLogicalIds, - defineBackendTemplateHarness, + assertExpectedLogicalIds, + synthesizeBackendTemplates, } from '../define_backend_template_harness.js'; import { it } from 'node:test'; import { dataWithoutAuth } from '../test-projects/standalone-data-auth-modes/amplify/test_factories.js'; @@ -15,60 +15,60 @@ import { dataWithoutAuthNoAuthMode } from '../test-projects/standalone-data-sand */ void it('data storage auth with triggers', () => { - const templates = defineBackendTemplateHarness(dataStorageAuthWithTriggers); + const templates = synthesizeBackendTemplates(dataStorageAuthWithTriggers); - assertStableLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ + assertExpectedLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ 'auth179371D7', 'data7552DF31', 'function1351588B', 'storage0EC3F24A', ]); - assertStableLogicalIds(templates.auth, 'AWS::Cognito::UserPool', [ + assertExpectedLogicalIds(templates.auth, 'AWS::Cognito::UserPool', [ 'amplifyAuthUserPool4BA7F805', ]); - assertStableLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ + assertExpectedLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ 'amplifyDataGraphQLAPI42A6FA33', ]); - assertStableLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ + assertExpectedLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ 'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833', 'amplifyDataFunctionDirectiveStackNestedStackFunctionDirectiveStackNestedStackResource1246A302', 'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56', ]); - assertStableLogicalIds(templates.storage, 'AWS::S3::Bucket', [ + assertExpectedLogicalIds(templates.storage, 'AWS::S3::Bucket', [ // eslint-disable-next-line spellcheck/spell-checker 'amplifyStorageamplifyStorageBucketC2F702CD', ]); }); void it('data without auth with lambda auth mode', () => { - const templates = defineBackendTemplateHarness(dataWithoutAuth); + const templates = synthesizeBackendTemplates(dataWithoutAuth); - assertStableLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ + assertExpectedLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ 'data7552DF31', 'function1351588B', ]); - assertStableLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ + assertExpectedLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ 'amplifyDataGraphQLAPI42A6FA33', ]); - assertStableLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ + assertExpectedLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ 'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833', 'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56', ]); }); void it('data without auth with default auth mode', () => { - const templates = defineBackendTemplateHarness(dataWithoutAuthNoAuthMode); + const templates = synthesizeBackendTemplates(dataWithoutAuthNoAuthMode); - assertStableLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ + assertExpectedLogicalIds(templates.root, 'AWS::CloudFormation::Stack', [ 'data7552DF31', ]); - assertStableLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ + assertExpectedLogicalIds(templates.data, 'AWS::AppSync::GraphQLApi', [ 'amplifyDataGraphQLAPI42A6FA33', ]); - assertStableLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ + assertExpectedLogicalIds(templates.data, 'AWS::CloudFormation::Stack', [ 'amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833', 'amplifyDataTodoNestedStackTodoNestedStackResource551CEA56', ]); diff --git a/packages/integration-tests/tsconfig.json b/packages/integration-tests/tsconfig.json index 1f51a22e20..3e171885a9 100644 --- a/packages/integration-tests/tsconfig.json +++ b/packages/integration-tests/tsconfig.json @@ -7,5 +7,5 @@ { "path": "../client-config" }, { "path": "../platform-core" } ], - "exclude": ["**/node_modules", "**/lib"] + "exclude": ["**/node_modules", "**/lib", "src/e2e-tests"] } From c8440145536014a761ff1dc16c8ea83b1bbc567d Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Mon, 4 Dec 2023 12:34:54 -0800 Subject: [PATCH 17/17] fix build issue --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 907e82e9a7..0234104f83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "rimraf": "^5.0.0", "tsx": "^3.12.6", "typedoc": "^0.25.3", - "typescript": "^5.3.2", + "typescript": "~5.2.0", "verdaccio": "^5.24.1" }, "engines": { @@ -19570,9 +19570,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index be61addacd..5718b0ff70 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "rimraf": "^5.0.0", "tsx": "^3.12.6", "typedoc": "^0.25.3", - "typescript": "~5.3.2", + "typescript": "~5.2.0", "verdaccio": "^5.24.1" }, "workspaces": [