@takumi-stack/core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/helpers/deep-merge.d.ts +4 -0
- package/common/helpers/deep-merge.d.ts.map +1 -0
- package/common/helpers/deep-merge.js +58 -0
- package/common/helpers/deep-merge.js.map +1 -0
- package/common/helpers/index.d.ts +4 -0
- package/common/helpers/index.d.ts.map +1 -0
- package/common/helpers/index.js +20 -0
- package/common/helpers/index.js.map +1 -0
- package/common/helpers/string-parser.d.ts +7 -0
- package/common/helpers/string-parser.d.ts.map +1 -0
- package/common/helpers/string-parser.js +52 -0
- package/common/helpers/string-parser.js.map +1 -0
- package/common/helpers/types.d.ts +7 -0
- package/common/helpers/types.d.ts.map +1 -0
- package/common/helpers/types.js.map +1 -0
- package/common/index.d.ts +4 -0
- package/common/index.d.ts.map +1 -0
- package/common/index.js +20 -0
- package/common/index.js.map +1 -0
- package/common/main/index.d.ts +5 -0
- package/common/main/index.d.ts.map +1 -0
- package/{.dist/prefab/cdn → common/main}/index.js +4 -4
- package/common/main/index.js.map +1 -0
- package/{.dist/common/modifier.d.ts → common/main/mods.d.ts} +1 -1
- package/common/main/mods.d.ts.map +1 -0
- package/{.dist/common/modifier.js → common/main/mods.js} +1 -1
- package/{.dist/common/modifier.js.map → common/main/mods.js.map} +1 -1
- package/common/main/prefab.d.ts +21 -0
- package/common/main/prefab.d.ts.map +1 -0
- package/common/main/prefab.js +29 -0
- package/common/main/prefab.js.map +1 -0
- package/common/main/takumi-app.d.ts +18 -0
- package/common/main/takumi-app.d.ts.map +1 -0
- package/{.dist/common/coordinator.js → common/main/takumi-app.js} +31 -31
- package/common/main/takumi-app.js.map +1 -0
- package/common/main/takumi-stack.d.ts +14 -0
- package/common/main/takumi-stack.d.ts.map +1 -0
- package/common/main/takumi-stack.js +30 -0
- package/common/main/takumi-stack.js.map +1 -0
- package/common/props/default-config.d.ts +3 -0
- package/common/props/default-config.d.ts.map +1 -0
- package/common/props/default-config.js +21 -0
- package/common/props/default-config.js.map +1 -0
- package/common/props/global-config.d.ts +40 -0
- package/common/props/global-config.d.ts.map +1 -0
- package/{.dist/common/synth/props-types.js → common/props/global-config.js} +1 -1
- package/common/props/global-config.js.map +1 -0
- package/common/props/global-props.d.ts +12 -0
- package/common/props/global-props.d.ts.map +1 -0
- package/common/props/global-props.js +41 -0
- package/common/props/global-props.js.map +1 -0
- package/common/props/index.d.ts +6 -0
- package/common/props/index.d.ts.map +1 -0
- package/{.dist/common → common/props}/index.js +5 -5
- package/common/props/index.js.map +1 -0
- package/common/props/naming.d.ts +38 -0
- package/common/props/naming.d.ts.map +1 -0
- package/common/props/naming.js +88 -0
- package/common/props/naming.js.map +1 -0
- package/common/props/prefab-props.d.ts +14 -0
- package/common/props/prefab-props.d.ts.map +1 -0
- package/common/props/prefab-props.js +37 -0
- package/common/props/prefab-props.js.map +1 -0
- package/common/props/stack-props.d.ts +9 -0
- package/common/props/stack-props.d.ts.map +1 -0
- package/common/props/stack-props.js +16 -0
- package/common/props/stack-props.js.map +1 -0
- package/{index.ts → index.d.ts} +1 -1
- package/{.dist/index.d.ts.map → index.d.ts.map} +1 -1
- package/{.dist/index.js → index.js} +1 -1
- package/{.dist/index.js.map → index.js.map} +1 -1
- package/package.json +3 -5
- package/prefab/auth/cognito-user-pool/index.d.ts +43 -0
- package/prefab/auth/cognito-user-pool/index.d.ts.map +1 -0
- package/{.dist/prefab/auth/cognito-pool → prefab/auth/cognito-user-pool}/index.js +94 -102
- package/prefab/auth/cognito-user-pool/index.js.map +1 -0
- package/prefab/auth/index.d.ts +2 -0
- package/prefab/auth/index.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/auth/index.js +1 -1
- package/{.dist/prefab → prefab}/auth/index.js.map +1 -1
- package/prefab/cdn/api/index.d.ts +54 -0
- package/prefab/cdn/api/index.d.ts.map +1 -0
- package/{.dist/prefab/cdn/cdn-api → prefab/cdn/api}/index.js +75 -49
- package/prefab/cdn/api/index.js.map +1 -0
- package/prefab/cdn/assets/index.d.ts +26 -0
- package/prefab/cdn/assets/index.d.ts.map +1 -0
- package/prefab/cdn/assets/index.js +110 -0
- package/prefab/cdn/assets/index.js.map +1 -0
- package/prefab/cdn/index.d.ts +4 -0
- package/prefab/cdn/index.d.ts.map +1 -0
- package/{.dist/prefab/compute/function/api-function → prefab/cdn}/index.js +3 -2
- package/{.dist/prefab → prefab}/cdn/index.js.map +1 -1
- package/prefab/cdn/web/index.d.ts +31 -0
- package/prefab/cdn/web/index.d.ts.map +1 -0
- package/prefab/cdn/web/index.js +149 -0
- package/prefab/cdn/web/index.js.map +1 -0
- package/prefab/compute/ecs/cluster.d.ts +19 -0
- package/prefab/compute/ecs/cluster.d.ts.map +1 -0
- package/prefab/compute/ecs/cluster.js +21 -0
- package/prefab/compute/ecs/cluster.js.map +1 -0
- package/prefab/compute/ecs/index.d.ts.map +1 -0
- package/prefab/compute/ecs/index.js.map +1 -0
- package/prefab/compute/ecs/service.d.ts +44 -0
- package/prefab/compute/ecs/service.d.ts.map +1 -0
- package/prefab/compute/ecs/service.js +98 -0
- package/prefab/compute/ecs/service.js.map +1 -0
- package/prefab/compute/function/api/index.d.ts +21 -0
- package/prefab/compute/function/api/index.d.ts.map +1 -0
- package/prefab/compute/function/api/index.js +40 -0
- package/prefab/compute/function/api/index.js.map +1 -0
- package/prefab/compute/function/base/index.d.ts +34 -0
- package/prefab/compute/function/base/index.d.ts.map +1 -0
- package/prefab/compute/function/base/index.js +76 -0
- package/prefab/compute/function/base/index.js.map +1 -0
- package/prefab/compute/function/cognito/index.d.ts +20 -0
- package/prefab/compute/function/cognito/index.d.ts.map +1 -0
- package/prefab/compute/function/cognito/index.js +35 -0
- package/prefab/compute/function/cognito/index.js.map +1 -0
- package/prefab/compute/function/cron/index.d.ts +20 -0
- package/prefab/compute/function/cron/index.d.ts.map +1 -0
- package/prefab/compute/function/cron/index.js +30 -0
- package/prefab/compute/function/cron/index.js.map +1 -0
- package/prefab/compute/function/event/index.d.ts +20 -0
- package/prefab/compute/function/event/index.d.ts.map +1 -0
- package/prefab/compute/function/event/index.js +38 -0
- package/prefab/compute/function/event/index.js.map +1 -0
- package/prefab/compute/function/index.d.ts +9 -0
- package/prefab/compute/function/index.d.ts.map +1 -0
- package/prefab/compute/function/index.js +25 -0
- package/{.dist/prefab → prefab}/compute/function/index.js.map +1 -1
- package/prefab/compute/function/queue/index.d.ts +19 -0
- package/prefab/compute/function/queue/index.d.ts.map +1 -0
- package/prefab/compute/function/queue/index.js +32 -0
- package/prefab/compute/function/queue/index.js.map +1 -0
- package/prefab/compute/function/scheduled/index.d.ts +21 -0
- package/prefab/compute/function/scheduled/index.d.ts.map +1 -0
- package/prefab/compute/function/scheduled/index.js +56 -0
- package/prefab/compute/function/scheduled/index.js.map +1 -0
- package/prefab/compute/function/topic/index.d.ts +20 -0
- package/prefab/compute/function/topic/index.d.ts.map +1 -0
- package/prefab/compute/function/topic/index.js +30 -0
- package/prefab/compute/function/topic/index.js.map +1 -0
- package/prefab/compute/index.d.ts +2 -0
- package/prefab/compute/index.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/compute/index.js +1 -1
- package/{.dist/prefab → prefab}/compute/index.js.map +1 -1
- package/prefab/database/dynamo/index.d.ts +22 -0
- package/prefab/database/dynamo/index.d.ts.map +1 -0
- package/prefab/database/dynamo/index.js +58 -0
- package/prefab/database/dynamo/index.js.map +1 -0
- package/prefab/database/rds/index.d.ts +82 -0
- package/prefab/database/rds/index.d.ts.map +1 -0
- package/prefab/database/rds/index.js +270 -0
- package/prefab/database/rds/index.js.map +1 -0
- package/prefab/database/timestream/timestream-database.d.ts +16 -0
- package/prefab/database/timestream/timestream-database.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/database/timestream/timestream-database.js +9 -7
- package/prefab/database/timestream/timestream-database.js.map +1 -0
- package/prefab/database/timestream/timestream-table.d.ts +23 -0
- package/prefab/database/timestream/timestream-table.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/database/timestream/timestream-table.js +22 -22
- package/prefab/database/timestream/timestream-table.js.map +1 -0
- package/prefab/gateway/alb-public/index.d.ts +43 -0
- package/prefab/gateway/alb-public/index.d.ts.map +1 -0
- package/prefab/gateway/alb-public/index.js +123 -0
- package/prefab/gateway/alb-public/index.js.map +1 -0
- package/prefab/gateway/api-gateway/api-http.d.ts +38 -0
- package/prefab/gateway/api-gateway/api-http.d.ts.map +1 -0
- package/prefab/gateway/api-gateway/api-http.js +95 -0
- package/prefab/gateway/api-gateway/api-http.js.map +1 -0
- package/prefab/gateway/api-gateway/api-rest.d.ts +45 -0
- package/prefab/gateway/api-gateway/api-rest.d.ts.map +1 -0
- package/prefab/gateway/api-gateway/api-rest.js +113 -0
- package/prefab/gateway/api-gateway/api-rest.js.map +1 -0
- package/prefab/gateway/{index.ts → index.d.ts} +1 -1
- package/{.dist/prefab → prefab}/gateway/index.d.ts.map +1 -1
- package/{.dist/prefab → prefab}/gateway/index.js +1 -1
- package/{.dist/prefab → prefab}/gateway/index.js.map +1 -1
- package/{.dist/prefab → prefab}/index.d.ts +2 -1
- package/prefab/index.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/index.js +2 -1
- package/prefab/index.js.map +1 -0
- package/prefab/integration/event-bus/index.d.ts +24 -0
- package/prefab/integration/event-bus/index.d.ts.map +1 -0
- package/prefab/integration/event-bus/index.js +53 -0
- package/prefab/integration/event-bus/index.js.map +1 -0
- package/prefab/integration/queue/index.d.ts +37 -0
- package/prefab/integration/queue/index.d.ts.map +1 -0
- package/prefab/integration/queue/index.js +73 -0
- package/prefab/integration/queue/index.js.map +1 -0
- package/prefab/integration/topic/index.d.ts +26 -0
- package/prefab/integration/topic/index.d.ts.map +1 -0
- package/prefab/integration/topic/index.js +42 -0
- package/prefab/integration/topic/index.js.map +1 -0
- package/prefab/networking/certificate/index.d.ts +19 -0
- package/prefab/networking/certificate/index.d.ts.map +1 -0
- package/prefab/networking/certificate/index.js +39 -0
- package/prefab/networking/certificate/index.js.map +1 -0
- package/prefab/networking/hosted-zone/index.d.ts +21 -0
- package/prefab/networking/hosted-zone/index.d.ts.map +1 -0
- package/prefab/networking/hosted-zone/index.js +38 -0
- package/prefab/networking/hosted-zone/index.js.map +1 -0
- package/prefab/networking/index.d.ts +5 -0
- package/{.dist/prefab → prefab}/networking/index.d.ts.map +1 -1
- package/{.dist/prefab → prefab}/networking/index.js +2 -3
- package/{.dist/prefab → prefab}/networking/index.js.map +1 -1
- package/prefab/networking/vpc/index.d.ts +17 -0
- package/prefab/networking/vpc/index.d.ts.map +1 -0
- package/prefab/networking/vpc/index.js +20 -0
- package/prefab/networking/vpc/index.js.map +1 -0
- package/prefab/networking/waf/index.d.ts +17 -0
- package/prefab/networking/waf/index.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/networking/waf/index.js +11 -11
- package/prefab/networking/waf/index.js.map +1 -0
- package/prefab/secrets/index.d.ts +3 -0
- package/prefab/secrets/index.d.ts.map +1 -0
- package/prefab/secrets/index.js +19 -0
- package/prefab/secrets/index.js.map +1 -0
- package/prefab/secrets/sm-secret/index.d.ts +22 -0
- package/prefab/secrets/sm-secret/index.d.ts.map +1 -0
- package/prefab/secrets/sm-secret/index.js +39 -0
- package/prefab/secrets/sm-secret/index.js.map +1 -0
- package/prefab/secrets/ssm-parameter/index.d.ts +23 -0
- package/prefab/secrets/ssm-parameter/index.d.ts.map +1 -0
- package/prefab/secrets/ssm-parameter/index.js +43 -0
- package/prefab/secrets/ssm-parameter/index.js.map +1 -0
- package/prefab/ssr/index.d.ts +2 -0
- package/prefab/ssr/index.d.ts.map +1 -0
- package/{.dist/prefab/analytics → prefab/ssr}/index.js +1 -1
- package/prefab/ssr/index.js.map +1 -0
- package/prefab/ssr/next/index.d.ts +28 -0
- package/prefab/ssr/next/index.d.ts.map +1 -0
- package/prefab/ssr/next/index.js +77 -0
- package/prefab/ssr/next/index.js.map +1 -0
- package/prefab/storage/bucket/index.d.ts +42 -0
- package/prefab/storage/bucket/index.d.ts.map +1 -0
- package/prefab/storage/bucket/index.js +64 -0
- package/prefab/storage/bucket/index.js.map +1 -0
- package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/slack.d.ts +4 -4
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/index.d.ts +2 -0
- package/prefab/utils/deploy-pipeline/index.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/index.js +163 -0
- package/prefab/utils/deploy-pipeline/index.js.map +1 -0
- package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-slack-payload.d.ts.map +1 -1
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.js.map +1 -0
- package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/send-to-slack.d.ts.map +1 -1
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.js.map +1 -0
- package/prefab/utils/exports.d.ts +4 -0
- package/prefab/utils/exports.d.ts.map +1 -0
- package/prefab/utils/exports.js +26 -0
- package/prefab/utils/exports.js.map +1 -0
- package/prefab/utils/frontend-builder/index.d.ts +21 -0
- package/prefab/utils/frontend-builder/index.d.ts.map +1 -0
- package/prefab/utils/frontend-builder/index.js +54 -0
- package/prefab/utils/frontend-builder/index.js.map +1 -0
- package/prefab/utils/index.d.ts +5 -0
- package/prefab/utils/index.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/utils/index.js +2 -2
- package/{.dist/prefab → prefab}/utils/index.js.map +1 -1
- package/prefab/utils/ses/index.d.ts +21 -0
- package/prefab/utils/ses/index.d.ts.map +1 -0
- package/{.dist/prefab → prefab}/utils/ses/index.js +33 -53
- package/prefab/utils/ses/index.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/.dist/common/coordinator.d.ts +0 -18
- package/.dist/common/coordinator.d.ts.map +0 -1
- package/.dist/common/coordinator.js.map +0 -1
- package/.dist/common/index.d.ts +0 -6
- package/.dist/common/index.d.ts.map +0 -1
- package/.dist/common/index.js.map +0 -1
- package/.dist/common/modifier.d.ts.map +0 -1
- package/.dist/common/naming/get-deploy-config.d.ts +0 -5
- package/.dist/common/naming/get-deploy-config.d.ts.map +0 -1
- package/.dist/common/naming/get-deploy-config.js +0 -8
- package/.dist/common/naming/get-deploy-config.js.map +0 -1
- package/.dist/common/naming/get-domain.d.ts +0 -8
- package/.dist/common/naming/get-domain.d.ts.map +0 -1
- package/.dist/common/naming/get-domain.js +0 -13
- package/.dist/common/naming/get-domain.js.map +0 -1
- package/.dist/common/naming/get-function-entry.d.ts +0 -3
- package/.dist/common/naming/get-function-entry.d.ts.map +0 -1
- package/.dist/common/naming/get-function-entry.js +0 -14
- package/.dist/common/naming/get-function-entry.js.map +0 -1
- package/.dist/common/naming/get-logical-name.d.ts +0 -2
- package/.dist/common/naming/get-logical-name.d.ts.map +0 -1
- package/.dist/common/naming/get-logical-name.js +0 -8
- package/.dist/common/naming/get-logical-name.js.map +0 -1
- package/.dist/common/naming/get-resource-name.d.ts +0 -26
- package/.dist/common/naming/get-resource-name.d.ts.map +0 -1
- package/.dist/common/naming/get-resource-name.js +0 -38
- package/.dist/common/naming/get-resource-name.js.map +0 -1
- package/.dist/common/naming/get-service-name.d.ts +0 -9
- package/.dist/common/naming/get-service-name.d.ts.map +0 -1
- package/.dist/common/naming/get-service-name.js +0 -10
- package/.dist/common/naming/get-service-name.js.map +0 -1
- package/.dist/common/naming/index.d.ts +0 -8
- package/.dist/common/naming/index.d.ts.map +0 -1
- package/.dist/common/naming/index.js +0 -24
- package/.dist/common/naming/index.js.map +0 -1
- package/.dist/common/naming/string-parser.d.ts +0 -4
- package/.dist/common/naming/string-parser.d.ts.map +0 -1
- package/.dist/common/naming/string-parser.js +0 -22
- package/.dist/common/naming/string-parser.js.map +0 -1
- package/.dist/common/service.d.ts +0 -21
- package/.dist/common/service.d.ts.map +0 -1
- package/.dist/common/service.js +0 -28
- package/.dist/common/service.js.map +0 -1
- package/.dist/common/synth/account-mapping.d.ts +0 -2
- package/.dist/common/synth/account-mapping.d.ts.map +0 -1
- package/.dist/common/synth/account-mapping.js +0 -18
- package/.dist/common/synth/account-mapping.js.map +0 -1
- package/.dist/common/synth/assume-role.d.ts +0 -17
- package/.dist/common/synth/assume-role.d.ts.map +0 -1
- package/.dist/common/synth/assume-role.js +0 -25
- package/.dist/common/synth/assume-role.js.map +0 -1
- package/.dist/common/synth/get-global-props.d.ts +0 -4
- package/.dist/common/synth/get-global-props.d.ts.map +0 -1
- package/.dist/common/synth/get-global-props.js +0 -34
- package/.dist/common/synth/get-global-props.js.map +0 -1
- package/.dist/common/synth/get-service-props.d.ts +0 -3
- package/.dist/common/synth/get-service-props.d.ts.map +0 -1
- package/.dist/common/synth/get-service-props.js +0 -12
- package/.dist/common/synth/get-service-props.js.map +0 -1
- package/.dist/common/synth/index.d.ts +0 -8
- package/.dist/common/synth/index.d.ts.map +0 -1
- package/.dist/common/synth/index.js +0 -24
- package/.dist/common/synth/index.js.map +0 -1
- package/.dist/common/synth/pre-script.d.ts +0 -21
- package/.dist/common/synth/pre-script.d.ts.map +0 -1
- package/.dist/common/synth/pre-script.js +0 -74
- package/.dist/common/synth/pre-script.js.map +0 -1
- package/.dist/common/synth/props-types.d.ts +0 -41
- package/.dist/common/synth/props-types.d.ts.map +0 -1
- package/.dist/common/synth/props-types.js.map +0 -1
- package/.dist/common/synth/synth-error.d.ts +0 -7
- package/.dist/common/synth/synth-error.d.ts.map +0 -1
- package/.dist/common/synth/synth-error.js +0 -17
- package/.dist/common/synth/synth-error.js.map +0 -1
- package/.dist/index.d.ts +0 -4
- package/.dist/package.json +0 -43
- package/.dist/prefab/analytics/events/handlers/ingestion-transform/handler.d.ts +0 -3
- package/.dist/prefab/analytics/events/handlers/ingestion-transform/handler.d.ts.map +0 -1
- package/.dist/prefab/analytics/events/handlers/ingestion-transform/handler.js +0 -34
- package/.dist/prefab/analytics/events/handlers/ingestion-transform/handler.js.map +0 -1
- package/.dist/prefab/analytics/events/index.d.ts +0 -28
- package/.dist/prefab/analytics/events/index.d.ts.map +0 -1
- package/.dist/prefab/analytics/events/index.js +0 -163
- package/.dist/prefab/analytics/events/index.js.map +0 -1
- package/.dist/prefab/analytics/index.d.ts +0 -2
- package/.dist/prefab/analytics/index.d.ts.map +0 -1
- package/.dist/prefab/analytics/index.js.map +0 -1
- package/.dist/prefab/auth/cognito-pool/index.d.ts +0 -57
- package/.dist/prefab/auth/cognito-pool/index.d.ts.map +0 -1
- package/.dist/prefab/auth/cognito-pool/index.js.map +0 -1
- package/.dist/prefab/auth/index.d.ts +0 -2
- package/.dist/prefab/auth/index.d.ts.map +0 -1
- package/.dist/prefab/cdn/cdn-api/index.d.ts +0 -34
- package/.dist/prefab/cdn/cdn-api/index.d.ts.map +0 -1
- package/.dist/prefab/cdn/cdn-api/index.js.map +0 -1
- package/.dist/prefab/cdn/cdn-asset/index.d.ts +0 -24
- package/.dist/prefab/cdn/cdn-asset/index.d.ts.map +0 -1
- package/.dist/prefab/cdn/cdn-asset/index.js +0 -96
- package/.dist/prefab/cdn/cdn-asset/index.js.map +0 -1
- package/.dist/prefab/cdn/cdn-spa/index.d.ts +0 -24
- package/.dist/prefab/cdn/cdn-spa/index.d.ts.map +0 -1
- package/.dist/prefab/cdn/cdn-spa/index.js +0 -138
- package/.dist/prefab/cdn/cdn-spa/index.js.map +0 -1
- package/.dist/prefab/cdn/cdn-ssr/index.d.ts +0 -33
- package/.dist/prefab/cdn/cdn-ssr/index.d.ts.map +0 -1
- package/.dist/prefab/cdn/cdn-ssr/index.js +0 -271
- package/.dist/prefab/cdn/cdn-ssr/index.js.map +0 -1
- package/.dist/prefab/cdn/index.d.ts +0 -5
- package/.dist/prefab/cdn/index.d.ts.map +0 -1
- package/.dist/prefab/compute/fargate/cluster.d.ts +0 -13
- package/.dist/prefab/compute/fargate/cluster.d.ts.map +0 -1
- package/.dist/prefab/compute/fargate/cluster.js +0 -42
- package/.dist/prefab/compute/fargate/cluster.js.map +0 -1
- package/.dist/prefab/compute/fargate/index.d.ts.map +0 -1
- package/.dist/prefab/compute/fargate/index.js.map +0 -1
- package/.dist/prefab/compute/fargate/service.d.ts +0 -45
- package/.dist/prefab/compute/fargate/service.d.ts.map +0 -1
- package/.dist/prefab/compute/fargate/service.js +0 -109
- package/.dist/prefab/compute/fargate/service.js.map +0 -1
- package/.dist/prefab/compute/function/api-function/api-aggregate.d.ts +0 -31
- package/.dist/prefab/compute/function/api-function/api-aggregate.d.ts.map +0 -1
- package/.dist/prefab/compute/function/api-function/api-aggregate.js +0 -53
- package/.dist/prefab/compute/function/api-function/api-aggregate.js.map +0 -1
- package/.dist/prefab/compute/function/api-function/api-function.d.ts +0 -22
- package/.dist/prefab/compute/function/api-function/api-function.d.ts.map +0 -1
- package/.dist/prefab/compute/function/api-function/api-function.js +0 -44
- package/.dist/prefab/compute/function/api-function/api-function.js.map +0 -1
- package/.dist/prefab/compute/function/api-function/index.d.ts +0 -3
- package/.dist/prefab/compute/function/api-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/api-function/index.js.map +0 -1
- package/.dist/prefab/compute/function/base-function/index.d.ts +0 -33
- package/.dist/prefab/compute/function/base-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/base-function/index.js +0 -70
- package/.dist/prefab/compute/function/base-function/index.js.map +0 -1
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.d.ts +0 -15
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.d.ts.map +0 -1
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.js +0 -22
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.js.map +0 -1
- package/.dist/prefab/compute/function/cognito-function/cognito-function.d.ts +0 -17
- package/.dist/prefab/compute/function/cognito-function/cognito-function.d.ts.map +0 -1
- package/.dist/prefab/compute/function/cognito-function/cognito-function.js +0 -24
- package/.dist/prefab/compute/function/cognito-function/cognito-function.js.map +0 -1
- package/.dist/prefab/compute/function/cognito-function/index.d.ts +0 -3
- package/.dist/prefab/compute/function/cognito-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/cognito-function/index.js +0 -19
- package/.dist/prefab/compute/function/cognito-function/index.js.map +0 -1
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.d.ts +0 -14
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.d.ts.map +0 -1
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.js +0 -22
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.js.map +0 -1
- package/.dist/prefab/compute/function/cron-function/cron-function.d.ts +0 -15
- package/.dist/prefab/compute/function/cron-function/cron-function.d.ts.map +0 -1
- package/.dist/prefab/compute/function/cron-function/cron-function.js +0 -24
- package/.dist/prefab/compute/function/cron-function/cron-function.js.map +0 -1
- package/.dist/prefab/compute/function/cron-function/index.d.ts +0 -3
- package/.dist/prefab/compute/function/cron-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/cron-function/index.js +0 -19
- package/.dist/prefab/compute/function/cron-function/index.js.map +0 -1
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.d.ts +0 -9
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.d.ts.map +0 -1
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.js +0 -3
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.js.map +0 -1
- package/.dist/prefab/compute/function/event-function/event-aggregate.d.ts +0 -16
- package/.dist/prefab/compute/function/event-function/event-aggregate.d.ts.map +0 -1
- package/.dist/prefab/compute/function/event-function/event-aggregate.js +0 -25
- package/.dist/prefab/compute/function/event-function/event-aggregate.js.map +0 -1
- package/.dist/prefab/compute/function/event-function/event-function.d.ts +0 -14
- package/.dist/prefab/compute/function/event-function/event-function.d.ts.map +0 -1
- package/.dist/prefab/compute/function/event-function/event-function.js +0 -33
- package/.dist/prefab/compute/function/event-function/event-function.js.map +0 -1
- package/.dist/prefab/compute/function/event-function/index.d.ts +0 -3
- package/.dist/prefab/compute/function/event-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/event-function/index.js +0 -19
- package/.dist/prefab/compute/function/event-function/index.js.map +0 -1
- package/.dist/prefab/compute/function/index.d.ts +0 -8
- package/.dist/prefab/compute/function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/index.js +0 -24
- package/.dist/prefab/compute/function/queue-function/index.d.ts +0 -22
- package/.dist/prefab/compute/function/queue-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/queue-function/index.js +0 -46
- package/.dist/prefab/compute/function/queue-function/index.js.map +0 -1
- package/.dist/prefab/compute/function/topic-function/index.d.ts +0 -20
- package/.dist/prefab/compute/function/topic-function/index.d.ts.map +0 -1
- package/.dist/prefab/compute/function/topic-function/index.js +0 -23
- package/.dist/prefab/compute/function/topic-function/index.js.map +0 -1
- package/.dist/prefab/compute/index.d.ts +0 -3
- package/.dist/prefab/compute/index.d.ts.map +0 -1
- package/.dist/prefab/database/dynamo/index.d.ts +0 -13
- package/.dist/prefab/database/dynamo/index.d.ts.map +0 -1
- package/.dist/prefab/database/dynamo/index.js +0 -106
- package/.dist/prefab/database/dynamo/index.js.map +0 -1
- package/.dist/prefab/database/rds/index.d.ts +0 -51
- package/.dist/prefab/database/rds/index.d.ts.map +0 -1
- package/.dist/prefab/database/rds/index.js +0 -223
- package/.dist/prefab/database/rds/index.js.map +0 -1
- package/.dist/prefab/database/timestream/timestream-database.d.ts +0 -11
- package/.dist/prefab/database/timestream/timestream-database.d.ts.map +0 -1
- package/.dist/prefab/database/timestream/timestream-database.js.map +0 -1
- package/.dist/prefab/database/timestream/timestream-table.d.ts +0 -21
- package/.dist/prefab/database/timestream/timestream-table.d.ts.map +0 -1
- package/.dist/prefab/database/timestream/timestream-table.js.map +0 -1
- package/.dist/prefab/gateway/alb-public/index.d.ts +0 -41
- package/.dist/prefab/gateway/alb-public/index.d.ts.map +0 -1
- package/.dist/prefab/gateway/alb-public/index.js +0 -116
- package/.dist/prefab/gateway/alb-public/index.js.map +0 -1
- package/.dist/prefab/gateway/api-gateway/api-http.d.ts +0 -27
- package/.dist/prefab/gateway/api-gateway/api-http.d.ts.map +0 -1
- package/.dist/prefab/gateway/api-gateway/api-http.js +0 -48
- package/.dist/prefab/gateway/api-gateway/api-http.js.map +0 -1
- package/.dist/prefab/gateway/api-gateway/api-rest.d.ts +0 -23
- package/.dist/prefab/gateway/api-gateway/api-rest.d.ts.map +0 -1
- package/.dist/prefab/gateway/api-gateway/api-rest.js +0 -90
- package/.dist/prefab/gateway/api-gateway/api-rest.js.map +0 -1
- package/.dist/prefab/gateway/app-sync/index.d.ts +0 -31
- package/.dist/prefab/gateway/app-sync/index.d.ts.map +0 -1
- package/.dist/prefab/gateway/app-sync/index.js +0 -114
- package/.dist/prefab/gateway/app-sync/index.js.map +0 -1
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.d.ts +0 -33
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.d.ts.map +0 -1
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.js +0 -125
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.js.map +0 -1
- package/.dist/prefab/gateway/app-sync/types.d.ts +0 -29
- package/.dist/prefab/gateway/app-sync/types.d.ts.map +0 -1
- package/.dist/prefab/gateway/app-sync/types.js.map +0 -1
- package/.dist/prefab/gateway/index.d.ts +0 -4
- package/.dist/prefab/index.d.ts.map +0 -1
- package/.dist/prefab/index.js.map +0 -1
- package/.dist/prefab/integration/event-bus/index.d.ts +0 -18
- package/.dist/prefab/integration/event-bus/index.d.ts.map +0 -1
- package/.dist/prefab/integration/event-bus/index.js +0 -46
- package/.dist/prefab/integration/event-bus/index.js.map +0 -1
- package/.dist/prefab/integration/queue/index.d.ts +0 -29
- package/.dist/prefab/integration/queue/index.d.ts.map +0 -1
- package/.dist/prefab/integration/queue/index.js +0 -70
- package/.dist/prefab/integration/queue/index.js.map +0 -1
- package/.dist/prefab/integration/topic/index.d.ts +0 -19
- package/.dist/prefab/integration/topic/index.d.ts.map +0 -1
- package/.dist/prefab/integration/topic/index.js +0 -48
- package/.dist/prefab/integration/topic/index.js.map +0 -1
- package/.dist/prefab/networking/dns-domain-ref/index.d.ts +0 -14
- package/.dist/prefab/networking/dns-domain-ref/index.d.ts.map +0 -1
- package/.dist/prefab/networking/dns-domain-ref/index.js +0 -28
- package/.dist/prefab/networking/dns-domain-ref/index.js.map +0 -1
- package/.dist/prefab/networking/dns-subdomain-certificate/index.d.ts +0 -11
- package/.dist/prefab/networking/dns-subdomain-certificate/index.d.ts.map +0 -1
- package/.dist/prefab/networking/dns-subdomain-certificate/index.js +0 -28
- package/.dist/prefab/networking/dns-subdomain-certificate/index.js.map +0 -1
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.d.ts +0 -10
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.d.ts.map +0 -1
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.js +0 -27
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.js.map +0 -1
- package/.dist/prefab/networking/index.d.ts +0 -6
- package/.dist/prefab/networking/vpc/index.d.ts +0 -18
- package/.dist/prefab/networking/vpc/index.d.ts.map +0 -1
- package/.dist/prefab/networking/vpc/index.js +0 -28
- package/.dist/prefab/networking/vpc/index.js.map +0 -1
- package/.dist/prefab/networking/waf/index.d.ts +0 -12
- package/.dist/prefab/networking/waf/index.d.ts.map +0 -1
- package/.dist/prefab/networking/waf/index.js.map +0 -1
- package/.dist/prefab/storage/bucket/asset-bucket.d.ts +0 -10
- package/.dist/prefab/storage/bucket/asset-bucket.d.ts.map +0 -1
- package/.dist/prefab/storage/bucket/asset-bucket.js +0 -19
- package/.dist/prefab/storage/bucket/asset-bucket.js.map +0 -1
- package/.dist/prefab/storage/bucket/index.d.ts +0 -3
- package/.dist/prefab/storage/bucket/index.d.ts.map +0 -1
- package/.dist/prefab/storage/bucket/index.js +0 -19
- package/.dist/prefab/storage/bucket/index.js.map +0 -1
- package/.dist/prefab/storage/bucket/private-bucket.d.ts +0 -32
- package/.dist/prefab/storage/bucket/private-bucket.d.ts.map +0 -1
- package/.dist/prefab/storage/bucket/private-bucket.js +0 -82
- package/.dist/prefab/storage/bucket/private-bucket.js.map +0 -1
- package/.dist/prefab/utils/config/frontend-env-builder.d.ts +0 -12
- package/.dist/prefab/utils/config/frontend-env-builder.d.ts.map +0 -1
- package/.dist/prefab/utils/config/frontend-env-builder.js +0 -25
- package/.dist/prefab/utils/config/frontend-env-builder.js.map +0 -1
- package/.dist/prefab/utils/config/index.d.ts +0 -4
- package/.dist/prefab/utils/config/index.d.ts.map +0 -1
- package/.dist/prefab/utils/config/index.js +0 -20
- package/.dist/prefab/utils/config/index.js.map +0 -1
- package/.dist/prefab/utils/config/parameter-secret.d.ts +0 -19
- package/.dist/prefab/utils/config/parameter-secret.d.ts.map +0 -1
- package/.dist/prefab/utils/config/parameter-secret.js +0 -42
- package/.dist/prefab/utils/config/parameter-secret.js.map +0 -1
- package/.dist/prefab/utils/config/runtime-secret.d.ts +0 -20
- package/.dist/prefab/utils/config/runtime-secret.d.ts.map +0 -1
- package/.dist/prefab/utils/config/runtime-secret.js +0 -37
- package/.dist/prefab/utils/config/runtime-secret.js.map +0 -1
- package/.dist/prefab/utils/deploy-pipeline/catalog/integrations/slack.d.ts.map +0 -1
- package/.dist/prefab/utils/deploy-pipeline/index.d.ts +0 -13
- package/.dist/prefab/utils/deploy-pipeline/index.d.ts.map +0 -1
- package/.dist/prefab/utils/deploy-pipeline/index.js +0 -173
- package/.dist/prefab/utils/deploy-pipeline/index.js.map +0 -1
- package/.dist/prefab/utils/deploy-pipeline/platform/get-slack-payload.js.map +0 -1
- package/.dist/prefab/utils/deploy-pipeline/platform/send-to-slack.js.map +0 -1
- package/.dist/prefab/utils/duration.d.ts +0 -2
- package/.dist/prefab/utils/duration.d.ts.map +0 -1
- package/.dist/prefab/utils/duration.js +0 -6
- package/.dist/prefab/utils/duration.js.map +0 -1
- package/.dist/prefab/utils/index.d.ts +0 -5
- package/.dist/prefab/utils/index.d.ts.map +0 -1
- package/.dist/prefab/utils/ses/index.d.ts +0 -20
- package/.dist/prefab/utils/ses/index.d.ts.map +0 -1
- package/.dist/prefab/utils/ses/index.js.map +0 -1
- package/.dist/script/config-command/bootstrap.d.ts +0 -3
- package/.dist/script/config-command/bootstrap.d.ts.map +0 -1
- package/.dist/script/config-command/bootstrap.js +0 -65
- package/.dist/script/config-command/bootstrap.js.map +0 -1
- package/.dist/script/config-command/deploy-spa.d.ts +0 -3
- package/.dist/script/config-command/deploy-spa.d.ts.map +0 -1
- package/.dist/script/config-command/deploy-spa.js +0 -82
- package/.dist/script/config-command/deploy-spa.js.map +0 -1
- package/.dist/script/config-command/deploy.d.ts +0 -3
- package/.dist/script/config-command/deploy.d.ts.map +0 -1
- package/.dist/script/config-command/deploy.js +0 -26
- package/.dist/script/config-command/deploy.js.map +0 -1
- package/.dist/script/config-command/destroy.d.ts +0 -3
- package/.dist/script/config-command/destroy.d.ts.map +0 -1
- package/.dist/script/config-command/destroy.js +0 -26
- package/.dist/script/config-command/destroy.js.map +0 -1
- package/.dist/script/config-command/env-ssr.d.ts +0 -3
- package/.dist/script/config-command/env-ssr.d.ts.map +0 -1
- package/.dist/script/config-command/env-ssr.js +0 -49
- package/.dist/script/config-command/env-ssr.js.map +0 -1
- package/.dist/script/config-command/invalidation-ssr.d.ts +0 -3
- package/.dist/script/config-command/invalidation-ssr.d.ts.map +0 -1
- package/.dist/script/config-command/invalidation-ssr.js +0 -53
- package/.dist/script/config-command/invalidation-ssr.js.map +0 -1
- package/.dist/script/config-command/rds-migration.d.ts +0 -5
- package/.dist/script/config-command/rds-migration.d.ts.map +0 -1
- package/.dist/script/config-command/rds-migration.js +0 -125
- package/.dist/script/config-command/rds-migration.js.map +0 -1
- package/.dist/script/config-command/rds-sync.d.ts +0 -3
- package/.dist/script/config-command/rds-sync.d.ts.map +0 -1
- package/.dist/script/config-command/rds-sync.js +0 -66
- package/.dist/script/config-command/rds-sync.js.map +0 -1
- package/.dist/script/config-command/ssm-connect.d.ts +0 -3
- package/.dist/script/config-command/ssm-connect.d.ts.map +0 -1
- package/.dist/script/config-command/ssm-connect.js +0 -86
- package/.dist/script/config-command/ssm-connect.js.map +0 -1
- package/.dist/script/config-command/start-spa.d.ts +0 -3
- package/.dist/script/config-command/start-spa.d.ts.map +0 -1
- package/.dist/script/config-command/start-spa.js +0 -53
- package/.dist/script/config-command/start-spa.js.map +0 -1
- package/.dist/script/config-command/start-ssr.d.ts +0 -3
- package/.dist/script/config-command/start-ssr.d.ts.map +0 -1
- package/.dist/script/config-command/start-ssr.js +0 -53
- package/.dist/script/config-command/start-ssr.js.map +0 -1
- package/.dist/script/config-command/synth.d.ts +0 -3
- package/.dist/script/config-command/synth.d.ts.map +0 -1
- package/.dist/script/config-command/synth.js +0 -26
- package/.dist/script/config-command/synth.js.map +0 -1
- package/.dist/script/index.d.ts +0 -7
- package/.dist/script/index.d.ts.map +0 -1
- package/.dist/script/index.js +0 -70
- package/.dist/script/index.js.map +0 -1
- package/.dist/script/output-command/create-user.d.ts +0 -9
- package/.dist/script/output-command/create-user.d.ts.map +0 -1
- package/.dist/script/output-command/create-user.js +0 -61
- package/.dist/script/output-command/create-user.js.map +0 -1
- package/.dist/script/output-command/gen-postman-env.d.ts +0 -9
- package/.dist/script/output-command/gen-postman-env.d.ts.map +0 -1
- package/.dist/script/output-command/gen-postman-env.js +0 -55
- package/.dist/script/output-command/gen-postman-env.js.map +0 -1
- package/.dist/tsconfig.tsbuildinfo +0 -1
- package/.prettierignore +0 -10
- package/.prettierrc.json +0 -12
- package/.turbo/turbo-build.log +0 -5
- package/.turbo/turbo-release.log +0 -7
- package/CHANGELOG.md +0 -8
- package/common/coordinator.ts +0 -103
- package/common/index.ts +0 -5
- package/common/modifier.ts +0 -11
- package/common/naming/get-deploy-config.ts +0 -5
- package/common/naming/get-domain.ts +0 -14
- package/common/naming/get-function-entry.ts +0 -11
- package/common/naming/get-logical-name.ts +0 -3
- package/common/naming/get-resource-name.ts +0 -77
- package/common/naming/get-service-name.ts +0 -13
- package/common/naming/index.ts +0 -7
- package/common/naming/string-parser.ts +0 -17
- package/common/service.ts +0 -48
- package/common/synth/account-mapping.ts +0 -16
- package/common/synth/assume-role.ts +0 -39
- package/common/synth/get-global-props.ts +0 -46
- package/common/synth/get-service-props.ts +0 -16
- package/common/synth/index.ts +0 -7
- package/common/synth/pre-script.ts +0 -103
- package/common/synth/props-types.ts +0 -79
- package/common/synth/synth-error.ts +0 -13
- package/prefab/analytics/events/handlers/ingestion-transform/handler.ts +0 -35
- package/prefab/analytics/events/index.ts +0 -192
- package/prefab/analytics/index.ts +0 -1
- package/prefab/auth/cognito-pool/index.ts +0 -263
- package/prefab/auth/index.ts +0 -1
- package/prefab/cdn/cdn-api/index.ts +0 -169
- package/prefab/cdn/cdn-asset/index.ts +0 -89
- package/prefab/cdn/cdn-spa/index.ts +0 -136
- package/prefab/cdn/cdn-ssr/index.ts +0 -288
- package/prefab/cdn/index.ts +0 -4
- package/prefab/compute/fargate/cluster.ts +0 -24
- package/prefab/compute/fargate/index.ts +0 -2
- package/prefab/compute/fargate/service.ts +0 -130
- package/prefab/compute/function/api-function/api-aggregate.ts +0 -73
- package/prefab/compute/function/api-function/api-function.ts +0 -63
- package/prefab/compute/function/api-function/index.ts +0 -2
- package/prefab/compute/function/base-function/index.ts +0 -102
- package/prefab/compute/function/cognito-function/cognito-aggregate.ts +0 -29
- package/prefab/compute/function/cognito-function/cognito-function.ts +0 -36
- package/prefab/compute/function/cognito-function/index.ts +0 -2
- package/prefab/compute/function/cron-function/cron-aggregate.ts +0 -28
- package/prefab/compute/function/cron-function/cron-function.ts +0 -32
- package/prefab/compute/function/cron-function/index.ts +0 -2
- package/prefab/compute/function/event-function/EventAggregateParams.ts +0 -9
- package/prefab/compute/function/event-function/event-aggregate.ts +0 -33
- package/prefab/compute/function/event-function/event-function.ts +0 -42
- package/prefab/compute/function/event-function/index.ts +0 -2
- package/prefab/compute/function/index.ts +0 -7
- package/prefab/compute/function/queue-function/index.ts +0 -67
- package/prefab/compute/function/topic-function/index.ts +0 -36
- package/prefab/compute/index.ts +0 -2
- package/prefab/database/dynamo/index.ts +0 -113
- package/prefab/database/index.ts +0 -3
- package/prefab/database/rds/handlers/start-cluster/handler.ts +0 -7
- package/prefab/database/rds/handlers/stop-cluster/handler.ts +0 -7
- package/prefab/database/rds/index.ts +0 -248
- package/prefab/database/timestream/index.ts +0 -2
- package/prefab/database/timestream/timestream-database.ts +0 -24
- package/prefab/database/timestream/timestream-table.ts +0 -76
- package/prefab/gateway/alb-public/index.ts +0 -124
- package/prefab/gateway/api-gateway/api-http.ts +0 -71
- package/prefab/gateway/api-gateway/api-rest.ts +0 -93
- package/prefab/gateway/api-gateway/index.ts +0 -2
- package/prefab/gateway/app-sync/index.ts +0 -117
- package/prefab/gateway/app-sync/resolver-aggregate.ts +0 -138
- package/prefab/gateway/app-sync/types.ts +0 -29
- package/prefab/index.ts +0 -10
- package/prefab/integration/event-bus/index.ts +0 -52
- package/prefab/integration/index.ts +0 -3
- package/prefab/integration/queue/index.ts +0 -94
- package/prefab/integration/topic/index.ts +0 -57
- package/prefab/networking/dns-domain-ref/index.ts +0 -32
- package/prefab/networking/dns-subdomain-certificate/index.ts +0 -30
- package/prefab/networking/dns-subdomain-hosted-zone/index.ts +0 -30
- package/prefab/networking/index.ts +0 -5
- package/prefab/networking/vpc/index.ts +0 -39
- package/prefab/networking/waf/index.ts +0 -49
- package/prefab/storage/bucket/asset-bucket.ts +0 -24
- package/prefab/storage/bucket/index.ts +0 -2
- package/prefab/storage/bucket/private-bucket.ts +0 -74
- package/prefab/storage/index.ts +0 -1
- package/prefab/utils/config/frontend-env-builder.ts +0 -30
- package/prefab/utils/config/index.ts +0 -3
- package/prefab/utils/config/parameter-secret.ts +0 -52
- package/prefab/utils/config/runtime-secret.ts +0 -48
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.ts +0 -1
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.ts +0 -23
- package/prefab/utils/deploy-pipeline/entities/index.ts +0 -23
- package/prefab/utils/deploy-pipeline/handlers/send-to-slack/handler.ts +0 -32
- package/prefab/utils/deploy-pipeline/index.ts +0 -172
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.ts +0 -31
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.ts +0 -38
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.ts +0 -16
- package/prefab/utils/duration.ts +0 -1
- package/prefab/utils/index.ts +0 -4
- package/prefab/utils/ses/index.ts +0 -134
- package/script/config-command/bootstrap.ts +0 -108
- package/script/config-command/deploy-spa.ts +0 -126
- package/script/config-command/deploy.ts +0 -50
- package/script/config-command/destroy.ts +0 -49
- package/script/config-command/env-ssr.ts +0 -85
- package/script/config-command/invalidation-ssr.ts +0 -88
- package/script/config-command/rds-migration.ts +0 -177
- package/script/config-command/rds-sync.ts +0 -108
- package/script/config-command/ssm-connect.ts +0 -129
- package/script/config-command/start-spa.ts +0 -93
- package/script/config-command/start-ssr.ts +0 -91
- package/script/config-command/synth.ts +0 -50
- package/script/index.ts +0 -86
- package/script/output-command/create-user.ts +0 -89
- package/script/output-command/gen-postman-env.ts +0 -75
- package/tsconfig.json +0 -26
- /package/{.dist/prefab/gateway/app-sync → common/helpers}/types.js +0 -0
- /package/{.dist/prefab/compute/fargate → prefab/compute/ecs}/index.d.ts +0 -0
- /package/{.dist/prefab/compute/fargate → prefab/compute/ecs}/index.js +0 -0
- /package/{.dist/prefab → prefab}/database/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/database/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/database/index.js +0 -0
- /package/{.dist/prefab → prefab}/database/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/start-cluster/handler.d.ts +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/start-cluster/handler.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/start-cluster/handler.js +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/start-cluster/handler.js.map +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/stop-cluster/handler.d.ts +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/stop-cluster/handler.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/stop-cluster/handler.js +0 -0
- /package/{.dist/prefab → prefab}/database/rds/handlers/stop-cluster/handler.js.map +0 -0
- /package/{.dist/prefab → prefab}/database/timestream/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/database/timestream/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/database/timestream/index.js +0 -0
- /package/{.dist/prefab → prefab}/database/timestream/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/gateway/api-gateway/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/gateway/api-gateway/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/gateway/api-gateway/index.js +0 -0
- /package/{.dist/prefab → prefab}/gateway/api-gateway/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/integration/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/integration/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/integration/index.js +0 -0
- /package/{.dist/prefab → prefab}/integration/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/storage/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/storage/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/storage/index.js +0 -0
- /package/{.dist/prefab → prefab}/storage/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/index.js +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/slack.js +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/catalog/integrations/slack.js.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/entities/index.d.ts +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/entities/index.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/entities/index.js +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/entities/index.js.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.d.ts +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.js +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.js.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.js +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.js.map +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-slack-payload.d.ts +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/get-slack-payload.js +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/send-to-slack.d.ts +0 -0
- /package/{.dist/prefab → prefab}/utils/deploy-pipeline/platform/send-to-slack.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-function.js","sourceRoot":"","sources":["../../../../../prefab/compute/function/event-function/event-function.ts"],"names":[],"mappings":";;;AAAA,uDAA8C;AAC9C,uEAAgE;AAEhE,2CAAuC;AAIvC,+CAAwF;AACxF,oDAAwF;AAOxF,MAAa,aAAc,SAAQ,sBAAS;IA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C,CAAC,CAAC,EAAE,CAAC;gBAC3D,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACxE;YACD,OAAO,EAAE,CAAC,IAAI,mCAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnD,CAAC,CAAC;IACL,CAAC;CACF;AA1BD,sCA0BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../prefab/compute/function/event-function/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./event-aggregate"), exports);
|
|
18
|
-
__exportStar(require("./event-function"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../prefab/compute/function/event-function/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './api-function';
|
|
2
|
-
export * from './base-function';
|
|
3
|
-
export * from './cognito-function';
|
|
4
|
-
export * from './cron-function';
|
|
5
|
-
export * from './event-function';
|
|
6
|
-
export * from './queue-function';
|
|
7
|
-
export * from './topic-function';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../prefab/compute/function/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./api-function"), exports);
|
|
18
|
-
__exportStar(require("./base-function"), exports);
|
|
19
|
-
__exportStar(require("./cognito-function"), exports);
|
|
20
|
-
__exportStar(require("./cron-function"), exports);
|
|
21
|
-
__exportStar(require("./event-function"), exports);
|
|
22
|
-
__exportStar(require("./queue-function"), exports);
|
|
23
|
-
__exportStar(require("./topic-function"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Duration } from 'aws-cdk-lib';
|
|
2
|
-
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
3
|
-
import { Construct } from 'constructs';
|
|
4
|
-
import { ServiceStack } from '../../../../common';
|
|
5
|
-
import { QueuePrefab, QueuePrefabParams } from '../../../integration';
|
|
6
|
-
import { BaseAggregateParams } from '../base-function';
|
|
7
|
-
import { BaseHandlerParams } from '../base-function';
|
|
8
|
-
export type QueueHandlerParams = BaseHandlerParams & {
|
|
9
|
-
queuePrefab?: QueuePrefab;
|
|
10
|
-
queuePrefabParams?: Partial<QueuePrefabParams>;
|
|
11
|
-
maxConcurrency?: number;
|
|
12
|
-
batchSize?: number;
|
|
13
|
-
batchWindow?: Duration;
|
|
14
|
-
visibilityTimeoutRatio?: number;
|
|
15
|
-
};
|
|
16
|
-
export type QueueFunctionParams = BaseAggregateParams;
|
|
17
|
-
export declare class QueueFunction extends Construct {
|
|
18
|
-
readonly lambdaFunction: NodejsFunction;
|
|
19
|
-
readonly queuePrefab: QueuePrefab;
|
|
20
|
-
constructor(service: ServiceStack, params: QueueFunctionParams & QueueHandlerParams);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../prefab/compute/function/queue-function/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,YAAY,EAA8B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAgB,iBAAiB,EAA4B,MAAM,kBAAkB,CAAC;AAE7F,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEtD,qBAAa,aAAc,SAAQ,SAAS;IAC1C,SAAgB,cAAc,EAAE,cAAc,CAAC;IAC/C,SAAgB,WAAW,EAAE,WAAW,CAAC;gBAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,GAAG,kBAAkB;CAyCpF"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QueueFunction = void 0;
|
|
4
|
-
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
-
const aws_lambda_event_sources_1 = require("aws-cdk-lib/aws-lambda-event-sources");
|
|
6
|
-
const constructs_1 = require("constructs");
|
|
7
|
-
const common_1 = require("../../../../common");
|
|
8
|
-
const integration_1 = require("../../../integration");
|
|
9
|
-
const base_function_1 = require("../base-function");
|
|
10
|
-
class QueueFunction extends constructs_1.Construct {
|
|
11
|
-
lambdaFunction;
|
|
12
|
-
queuePrefab;
|
|
13
|
-
constructor(service, params) {
|
|
14
|
-
super(service, (0, common_1.getLogicalName)(QueueFunction.name, params.name));
|
|
15
|
-
if (params.visibilityTimeoutRatio && params.visibilityTimeoutRatio < 1) {
|
|
16
|
-
throw new common_1.SynthError('Visibility timeout ratio must be greater than or equal to 1', service.props);
|
|
17
|
-
}
|
|
18
|
-
// Visibility timeout is declared, must be greater than or equal to the timeout
|
|
19
|
-
if (params.queuePrefabParams?.visibilityTimeout &&
|
|
20
|
-
(params.timeout?.toSeconds() || base_function_1.FUNCTION_DEFAULT_TIMEOUT) > params.queuePrefabParams?.visibilityTimeout.toSeconds()) {
|
|
21
|
-
throw new common_1.SynthError('Visibility timeout must be greater than or equal to the function timeout', service.props);
|
|
22
|
-
}
|
|
23
|
-
this.queuePrefab =
|
|
24
|
-
params.queuePrefab ||
|
|
25
|
-
new integration_1.QueuePrefab(service, {
|
|
26
|
-
name: params.name,
|
|
27
|
-
visibilityTimeout: aws_cdk_lib_1.Duration.seconds((params.timeout?.toSeconds() || 6) * (params.visibilityTimeoutRatio || 2)),
|
|
28
|
-
...params.queuePrefabParams,
|
|
29
|
-
});
|
|
30
|
-
this.lambdaFunction = new base_function_1.BaseFunction(service, {
|
|
31
|
-
...params,
|
|
32
|
-
environment: { ...params.environment, CC_FUNCTION_TYPE: 'QUEUE' },
|
|
33
|
-
}).lambdaFunction;
|
|
34
|
-
this.lambdaFunction.addEventSource(new aws_lambda_event_sources_1.SqsEventSource(this.queuePrefab.queue, {
|
|
35
|
-
...(params.maxConcurrency ? { maxConcurrency: params.maxConcurrency } : {}),
|
|
36
|
-
batchSize: params.batchSize || 10,
|
|
37
|
-
maxBatchingWindow: params.batchWindow,
|
|
38
|
-
reportBatchItemFailures: true,
|
|
39
|
-
}));
|
|
40
|
-
// In case the lambda function needs to operate on the queue manually
|
|
41
|
-
this.lambdaFunction.addEnvironment('ORIGIN_QUEUE', this.queuePrefab.queue.queueUrl);
|
|
42
|
-
this.queuePrefab.queue.grantConsumeMessages(this.lambdaFunction);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.QueueFunction = QueueFunction;
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../prefab/compute/function/queue-function/index.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AACvC,mFAAsE;AAEtE,2CAAuC;AAEvC,+CAA8E;AAC9E,sDAAsE;AAEtE,oDAA6F;AAa7F,MAAa,aAAc,SAAQ,sBAAS;IAC1B,cAAc,CAAiB;IAC/B,WAAW,CAAc;IAEzC,YAAY,OAAqB,EAAE,MAAgD;QACjF,KAAK,CAAC,OAAO,EAAE,IAAA,uBAAc,EAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAEhE,IAAI,MAAM,CAAC,sBAAsB,IAAI,MAAM,CAAC,sBAAsB,GAAG,CAAC,EAAE,CAAC;YACvE,MAAM,IAAI,mBAAU,CAAC,6DAA6D,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACrG,CAAC;QAED,+EAA+E;QAC/E,IACE,MAAM,CAAC,iBAAiB,EAAE,iBAAiB;YAC3C,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,wCAAwB,CAAC,GAAG,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,SAAS,EAAE,EACnH,CAAC;YACD,MAAM,IAAI,mBAAU,CAAC,0EAA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Duration } from 'aws-cdk-lib';
|
|
2
|
-
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
3
|
-
import { Construct } from 'constructs';
|
|
4
|
-
import { ServiceStack } from '../../../../common';
|
|
5
|
-
import { CustomTopicParams, TopicPrefab } from '../../../integration';
|
|
6
|
-
import { BaseAggregateParams } from '../base-function';
|
|
7
|
-
import { BaseHandlerParams } from '../base-function';
|
|
8
|
-
export type TopicHandlerParams = BaseHandlerParams & {
|
|
9
|
-
topic?: TopicPrefab;
|
|
10
|
-
customTopicParams?: CustomTopicParams;
|
|
11
|
-
batchSize?: number;
|
|
12
|
-
batchWindow?: Duration;
|
|
13
|
-
};
|
|
14
|
-
export type TopicFunctionParams = BaseAggregateParams;
|
|
15
|
-
export declare class TopicFunction extends Construct {
|
|
16
|
-
readonly lambdaFunction: NodejsFunction;
|
|
17
|
-
readonly customTopic: TopicPrefab;
|
|
18
|
-
constructor(service: ServiceStack, params: TopicFunctionParams & TopicHandlerParams);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../prefab/compute/function/topic-function/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAkB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAgB,MAAM,kBAAkB,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEtD,qBAAa,aAAc,SAAQ,SAAS;IAC1C,SAAgB,cAAc,EAAE,cAAc,CAAC;IAC/C,SAAgB,WAAW,EAAE,WAAW,CAAC;gBAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,GAAG,kBAAkB;CAYpF"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TopicFunction = void 0;
|
|
4
|
-
const aws_lambda_event_sources_1 = require("aws-cdk-lib/aws-lambda-event-sources");
|
|
5
|
-
const constructs_1 = require("constructs");
|
|
6
|
-
const common_1 = require("../../../../common");
|
|
7
|
-
const integration_1 = require("../../../integration");
|
|
8
|
-
const base_function_1 = require("../base-function");
|
|
9
|
-
class TopicFunction extends constructs_1.Construct {
|
|
10
|
-
lambdaFunction;
|
|
11
|
-
customTopic;
|
|
12
|
-
constructor(service, params) {
|
|
13
|
-
super(service, (0, common_1.getLogicalName)(TopicFunction.name, params.name));
|
|
14
|
-
this.customTopic = params.topic || new integration_1.TopicPrefab(service, { name: params.name, ...params.customTopicParams });
|
|
15
|
-
this.lambdaFunction = new base_function_1.BaseFunction(service, {
|
|
16
|
-
...params,
|
|
17
|
-
environment: { ...params.environment, CC_FUNCTION_TYPE: 'TOPIC' },
|
|
18
|
-
}).lambdaFunction;
|
|
19
|
-
this.lambdaFunction.addEventSource(new aws_lambda_event_sources_1.SnsEventSource(this.customTopic.topic));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.TopicFunction = TopicFunction;
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../prefab/compute/function/topic-function/index.ts"],"names":[],"mappings":";;;AACA,mFAAsE;AAEtE,2CAAuC;AAEvC,+CAAkE;AAClE,sDAAsE;AAEtE,oDAAmE;AAWnE,MAAa,aAAc,SAAQ,sBAAS;IAC1B,cAAc,CAAiB;IAC/B,WAAW,CAAc;IAEzC,YAAY,OAAqB,EAAE,MAAgD;QACjF,KAAK,CAAC,OAAO,EAAE,IAAA,uBAAc,EAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAEhE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,yBAAW,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAEhH,IAAI,CAAC,cAAc,GAAG,IAAI,4BAAY,CAAC,OAAO,EAAE;YAC9C,GAAG,MAAM;YACT,WAAW,EAAE,EAAE,GAAG,MAAM,CAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE;SAClE,CAAC,CAAC,cAAc,CAAC;QAElB,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,yCAAc,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IACjF,CAAC;CACF;AAhBD,sCAgBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../prefab/compute/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Table } from 'aws-cdk-lib/aws-dynamodb';
|
|
2
|
-
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
3
|
-
import { Construct } from 'constructs';
|
|
4
|
-
import { TableStoreBuilder, TablePermission } from '@takumi-stack/sdk';
|
|
5
|
-
import { ServiceStack } from '../../../common';
|
|
6
|
-
export declare class DynamoTablePrefab extends Construct {
|
|
7
|
-
readonly table: Table;
|
|
8
|
-
readonly tableName: string;
|
|
9
|
-
readonly dynamoTableNameEnvVar: string;
|
|
10
|
-
constructor(service: ServiceStack, params: typeof TableStoreBuilder<any>);
|
|
11
|
-
static addTable(lambdaFunction: NodejsFunction, tablePrefab?: DynamoTablePrefab, tablePermission?: TablePermission): void;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../prefab/database/dynamo/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,YAAY,EAA+C,MAAM,iBAAiB,CAAC;AAE5F,qBAAa,iBAAkB,SAAQ,SAAS;IAC9C,SAAgB,KAAK,EAAE,KAAK,CAAC;IAC7B,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,qBAAqB,EAAE,MAAM,CAAC;gBAElC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,iBAAiB,CAAC,GAAG,CAAC;WAkF1D,QAAQ,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,iBAAiB,EAAE,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI;CAajI"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DynamoTablePrefab = void 0;
|
|
4
|
-
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
-
const aws_dynamodb_1 = require("aws-cdk-lib/aws-dynamodb");
|
|
6
|
-
const constructs_1 = require("constructs");
|
|
7
|
-
const common_1 = require("../../../common");
|
|
8
|
-
class DynamoTablePrefab extends constructs_1.Construct {
|
|
9
|
-
table;
|
|
10
|
-
tableName;
|
|
11
|
-
dynamoTableNameEnvVar;
|
|
12
|
-
constructor(service, params) {
|
|
13
|
-
super(service, (0, common_1.getLogicalName)(DynamoTablePrefab.name, new params().tableName));
|
|
14
|
-
const definition = new params();
|
|
15
|
-
if (!definition.tableName)
|
|
16
|
-
throw new common_1.SynthError('Bad implementation of TableStoreBuilder (remember use implements instead of extends in you class)', service.props);
|
|
17
|
-
this.dynamoTableNameEnvVar = definition.dynamoTableNameEnvVar || parseTableName(definition.tableName);
|
|
18
|
-
this.tableName = definition.tableName;
|
|
19
|
-
if (definition.keyMapping.PK !== 'PK') {
|
|
20
|
-
throw new common_1.SynthError('Bad implementation of TableStoreBuilder (PK must be PK)', service.props);
|
|
21
|
-
}
|
|
22
|
-
if (definition.keyMapping.SK && definition.keyMapping.SK !== 'SK') {
|
|
23
|
-
throw new common_1.SynthError('Bad implementation of TableStoreBuilder (SK must be SK)', service.props);
|
|
24
|
-
}
|
|
25
|
-
this.table = new aws_dynamodb_1.Table(this, definition.tableName, {
|
|
26
|
-
tableName: (0, common_1.getResourceName)(definition.tableName, service.props),
|
|
27
|
-
billingMode: aws_dynamodb_1.BillingMode.PAY_PER_REQUEST,
|
|
28
|
-
partitionKey: { name: 'PK', type: aws_dynamodb_1.AttributeType.STRING },
|
|
29
|
-
timeToLiveAttribute: 'deleteTTL',
|
|
30
|
-
...(definition.keyMapping.SK ? { sortKey: { name: 'SK', type: aws_dynamodb_1.AttributeType.STRING } } : {}),
|
|
31
|
-
// stream: params.stream,
|
|
32
|
-
});
|
|
33
|
-
const indexes = { ...definition.attIndexes, ...definition.genericIndexes };
|
|
34
|
-
if (indexes) {
|
|
35
|
-
const indexKeys = Object.keys(indexes);
|
|
36
|
-
indexKeys.forEach((indexKey) => {
|
|
37
|
-
const index = indexes[indexKey];
|
|
38
|
-
if (index) {
|
|
39
|
-
this.table.addGlobalSecondaryIndex({
|
|
40
|
-
indexName: indexKey,
|
|
41
|
-
partitionKey: { name: index.PK, type: aws_dynamodb_1.AttributeType.STRING },
|
|
42
|
-
...(index.SK ? { sortKey: { name: index.SK, type: aws_dynamodb_1.AttributeType.STRING } } : {}),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
this.table.applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.DESTROY);
|
|
48
|
-
if (service.props.envName === 'prod')
|
|
49
|
-
this.table.applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.RETAIN);
|
|
50
|
-
}
|
|
51
|
-
// public useMod(variableName = 'TABLE', mods: ((table: Table) => any)[]): Modifier {
|
|
52
|
-
// return (lambda: NodejsFunction): void => {
|
|
53
|
-
// lambda.addEnvironment(variableName, this.table.tableName);
|
|
54
|
-
// mods.map((fn) => fn(this.table)(lambda));
|
|
55
|
-
// };
|
|
56
|
-
// }
|
|
57
|
-
// public useModPermission(variableName = 'TABLE', tablePermission: TablePermission): Modifier {
|
|
58
|
-
// return (lambda: NodejsFunction): void => {
|
|
59
|
-
// lambda.addEnvironment(variableName, this.table.tableName);
|
|
60
|
-
// DynamoTablePrefab.modifier.permission(this.table, tablePermission)(lambda);
|
|
61
|
-
// };
|
|
62
|
-
// }
|
|
63
|
-
// public static modifier = {
|
|
64
|
-
// permission: (table: Table, tablePermission: TablePermission): ((lambda: NodejsFunction) => void) => {
|
|
65
|
-
// return (lambda: NodejsFunction): void => {
|
|
66
|
-
// if (tablePermission === 'none') return;
|
|
67
|
-
// const permissionMapper = {
|
|
68
|
-
// read: () => table.grantReadData(lambda),
|
|
69
|
-
// write: () => table.grantWriteData(lambda),
|
|
70
|
-
// readWrite: () => table.grantReadWriteData(lambda),
|
|
71
|
-
// };
|
|
72
|
-
// permissionMapper[tablePermission]();
|
|
73
|
-
// };
|
|
74
|
-
// },
|
|
75
|
-
// writer: (table: Table): ((lambda: NodejsFunction) => void) => {
|
|
76
|
-
// return (lambda: NodejsFunction): void => {
|
|
77
|
-
// table.grantWriteData(lambda);
|
|
78
|
-
// };
|
|
79
|
-
// },
|
|
80
|
-
// reader: (table: Table): ((lambda: NodejsFunction) => void) => {
|
|
81
|
-
// return (lambda: NodejsFunction): void => {
|
|
82
|
-
// table.grantReadData(lambda);
|
|
83
|
-
// };
|
|
84
|
-
// },
|
|
85
|
-
// };
|
|
86
|
-
static addTable(lambdaFunction, tablePrefab, tablePermission) {
|
|
87
|
-
if (tablePrefab instanceof DynamoTablePrefab) {
|
|
88
|
-
if (!tablePermission)
|
|
89
|
-
throw new Error('tablePermission is required when table is used');
|
|
90
|
-
lambdaFunction.addEnvironment(tablePrefab.dynamoTableNameEnvVar, tablePrefab.table.tableName);
|
|
91
|
-
if (tablePermission === 'none')
|
|
92
|
-
return;
|
|
93
|
-
const permissionMapper = {
|
|
94
|
-
read: () => tablePrefab.table.grantReadData(lambdaFunction),
|
|
95
|
-
write: () => tablePrefab.table.grantWriteData(lambdaFunction),
|
|
96
|
-
readWrite: () => tablePrefab.table.grantReadWriteData(lambdaFunction),
|
|
97
|
-
};
|
|
98
|
-
permissionMapper[tablePermission]();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.DynamoTablePrefab = DynamoTablePrefab;
|
|
103
|
-
function parseTableName(tableName) {
|
|
104
|
-
throw new Error('Function not implemented.');
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../prefab/database/dynamo/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2DAA6E;AAE7E,2CAAuC;AAIvC,4CAA4F;AAE5F,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;AAC/C,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import * as awsEc2 from 'aws-cdk-lib/aws-ec2';
|
|
2
|
-
import * as awsRds from 'aws-cdk-lib/aws-rds';
|
|
3
|
-
import { CronOptions } from 'aws-cdk-lib/aws-events';
|
|
4
|
-
import { Role } from 'aws-cdk-lib/aws-iam';
|
|
5
|
-
import { ISecret } from 'aws-cdk-lib/aws-secretsmanager';
|
|
6
|
-
import { Construct } from 'constructs';
|
|
7
|
-
import { Modifier, ServiceStack } from '../../../common';
|
|
8
|
-
import { CronAggregate, BaseAggregateParams } from '../../compute';
|
|
9
|
-
import { VpcPrefab } from '../../networking';
|
|
10
|
-
export type AuroraPerformanceTuning = {
|
|
11
|
-
writeInstanceProps?: awsRds.ServerlessV2ClusterInstanceProps;
|
|
12
|
-
readInstanceProps?: awsRds.ServerlessV2ClusterInstanceProps;
|
|
13
|
-
readInstances?: number;
|
|
14
|
-
readers?: awsRds.IClusterInstance[];
|
|
15
|
-
minCapacity?: number;
|
|
16
|
-
maxCapacity?: number;
|
|
17
|
-
};
|
|
18
|
-
export type AuroraServerlessV2PrefabParams = {
|
|
19
|
-
clusterName: string;
|
|
20
|
-
vpcPrefab: VpcPrefab;
|
|
21
|
-
performanceTuning: AuroraPerformanceTuning;
|
|
22
|
-
port?: number;
|
|
23
|
-
engine?: awsRds.IClusterEngine;
|
|
24
|
-
publicAccess: boolean;
|
|
25
|
-
baseDir?: string;
|
|
26
|
-
scheduledPause?: {
|
|
27
|
-
startCron: CronOptions;
|
|
28
|
-
stopCron: CronOptions;
|
|
29
|
-
};
|
|
30
|
-
vpcSubnets?: awsEc2.SubnetSelection;
|
|
31
|
-
securityGroupProps?: Partial<awsEc2.SecurityGroupProps>;
|
|
32
|
-
databaseClusterProps?: Partial<awsRds.DatabaseClusterProps>;
|
|
33
|
-
databaseProxyProps?: Partial<awsRds.DatabaseProxyProps>;
|
|
34
|
-
};
|
|
35
|
-
export declare class RdsClusterPrefab extends Construct {
|
|
36
|
-
readonly cluster: awsRds.DatabaseCluster;
|
|
37
|
-
readonly securityGroupForLambda: awsEc2.SecurityGroup;
|
|
38
|
-
readonly securityGroup: awsEc2.SecurityGroup;
|
|
39
|
-
readonly securityGroupBastion: awsEc2.SecurityGroup;
|
|
40
|
-
readonly roleBastion: Role;
|
|
41
|
-
readonly ec2Bastion: awsEc2.Instance;
|
|
42
|
-
readonly vpcSubnets?: awsEc2.SubnetSelection;
|
|
43
|
-
readonly proxy: awsRds.DatabaseProxy;
|
|
44
|
-
readonly secret: ISecret;
|
|
45
|
-
readonly cronAggregate: CronAggregate;
|
|
46
|
-
readonly readonlyRdsProxyEndpoint: awsRds.CfnDBProxyEndpoint;
|
|
47
|
-
constructor(service: ServiceStack, params: AuroraServerlessV2PrefabParams);
|
|
48
|
-
useClusterVpcGlobalConfigs(): BaseAggregateParams['globalConfigs'];
|
|
49
|
-
useModAccess(access?: 'readWrite' | 'readOnly', variableName?: string): Modifier;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../prefab/database/rds/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAkC,IAAI,EAAoB,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAqE,MAAM,iBAAiB,CAAC;AAC5H,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,kB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B,WAAW,EAAG,IAAI,CAAC;IACnC,SAAgB,UAAU,EAAG,MAAM,CAAC,QAAQ,CAAC;IAC7C,SAAgB,UAAU,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC;IACpD,SAAgB,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC;IAC5C,SAAgB,MAAM,EAAE,OAAO,CAAC;IAChC,SAAgB,aAAa,EAAG,aAAa,CAAC;IAC9C,SAAgB,wBAAwB,EAAG,MAAM,CAAC,kBAAkB,CAAC;gBAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,8BAA8B;IA4KlE,0BAA0B,IAAI,mBAAmB,CAAC,eAAe,CAAC;IAOlE,YAAY,CAAC,MAAM,GAAE,WAAW,GAAG,UAAwB,EAAE,YAAY,SAAO,GAAG,QAAQ;CAenG"}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.RdsClusterPrefab = void 0;
|
|
27
|
-
const awsEc2 = __importStar(require("aws-cdk-lib/aws-ec2"));
|
|
28
|
-
const awsRds = __importStar(require("aws-cdk-lib/aws-rds"));
|
|
29
|
-
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
30
|
-
const aws_iam_1 = require("aws-cdk-lib/aws-iam");
|
|
31
|
-
const aws_ssm_1 = require("aws-cdk-lib/aws-ssm");
|
|
32
|
-
const constructs_1 = require("constructs");
|
|
33
|
-
const common_1 = require("../../../common");
|
|
34
|
-
const compute_1 = require("../../compute");
|
|
35
|
-
class RdsClusterPrefab extends constructs_1.Construct {
|
|
36
|
-
cluster;
|
|
37
|
-
securityGroupForLambda;
|
|
38
|
-
securityGroup;
|
|
39
|
-
securityGroupBastion;
|
|
40
|
-
roleBastion;
|
|
41
|
-
ec2Bastion;
|
|
42
|
-
vpcSubnets;
|
|
43
|
-
proxy;
|
|
44
|
-
secret;
|
|
45
|
-
cronAggregate;
|
|
46
|
-
readonlyRdsProxyEndpoint;
|
|
47
|
-
constructor(service, params) {
|
|
48
|
-
super(service, (0, common_1.getLogicalName)(RdsClusterPrefab.name, params.clusterName));
|
|
49
|
-
if (!params.publicAccess) {
|
|
50
|
-
// Create SG for EC2 Bastion
|
|
51
|
-
this.securityGroupBastion = new awsEc2.SecurityGroup(this, 'BastionSecurityGroup', {
|
|
52
|
-
securityGroupName: (0, common_1.getResourceName)('ec2Bastion', service.props),
|
|
53
|
-
vpc: params.vpcPrefab.vpc,
|
|
54
|
-
allowAllOutbound: false,
|
|
55
|
-
});
|
|
56
|
-
this.securityGroupBastion.addEgressRule(awsEc2.Peer.anyIpv4(), awsEc2.Port.tcp(params.port || 5432), 'RdsBastionPort');
|
|
57
|
-
this.securityGroupBastion.addEgressRule(awsEc2.Peer.anyIpv4(), awsEc2.Port.tcp(params.port || 443), 'HttpsBastionPort');
|
|
58
|
-
// Create Role for EC2 to allow use SSMManagedInstance
|
|
59
|
-
this.roleBastion = new aws_iam_1.Role(this, (0, common_1.getLogicalName)('role', 'ec2Bastion'), {
|
|
60
|
-
assumedBy: new aws_iam_1.ServicePrincipal('ec2.amazonaws.com'),
|
|
61
|
-
roleName: (0, common_1.getShortResourceName)('ec2BastionSSM', service.props),
|
|
62
|
-
});
|
|
63
|
-
this.roleBastion.addManagedPolicy(aws_iam_1.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore'));
|
|
64
|
-
}
|
|
65
|
-
this.securityGroupForLambda = new awsEc2.SecurityGroup(this, 'LambdaSecurityGroup', {
|
|
66
|
-
securityGroupName: (0, common_1.getResourceName)(`LambdaToCluster${params.clusterName}`, service.props),
|
|
67
|
-
vpc: params.vpcPrefab.vpc,
|
|
68
|
-
allowAllOutbound: true,
|
|
69
|
-
});
|
|
70
|
-
this.securityGroup = new awsEc2.SecurityGroup(this, 'ClusterSecurityGroup', {
|
|
71
|
-
securityGroupName: (0, common_1.getResourceName)(params.clusterName, service.props),
|
|
72
|
-
vpc: params.vpcPrefab.vpc,
|
|
73
|
-
allowAllOutbound: true,
|
|
74
|
-
...params.securityGroupProps,
|
|
75
|
-
});
|
|
76
|
-
this.securityGroup.addIngressRule(awsEc2.Peer.anyIpv4(), awsEc2.Port.tcp(params.port || 5432), 'DefaultClusterPort');
|
|
77
|
-
// Allow SG EC2 in Inbound Rules SG RDS
|
|
78
|
-
if (!params.publicAccess)
|
|
79
|
-
this.securityGroup.connections.allowFrom(this.securityGroupBastion, awsEc2.Port.tcp(params.port || 5432), 'BastionInboundRule');
|
|
80
|
-
this.cluster = new awsRds.DatabaseCluster(this, 'Cluster', {
|
|
81
|
-
port: params.port || 5432, // Default port for postgres
|
|
82
|
-
clusterIdentifier: (0, common_1.getResourceName)(params.clusterName, service.props),
|
|
83
|
-
vpc: params.vpcPrefab.vpc,
|
|
84
|
-
...(params.vpcSubnets || params.publicAccess ? { vpcSubnets: { subnetType: awsEc2.SubnetType.PUBLIC } } : {}),
|
|
85
|
-
securityGroups: [this.securityGroup],
|
|
86
|
-
engine: params.engine ||
|
|
87
|
-
awsRds.DatabaseClusterEngine.auroraPostgres({
|
|
88
|
-
version: awsRds.AuroraPostgresEngineVersion.VER_15_2,
|
|
89
|
-
}),
|
|
90
|
-
credentials: awsRds.Credentials.fromGeneratedSecret('postgres', {
|
|
91
|
-
secretName: (0, common_1.getResourceName)(params.clusterName, service.props),
|
|
92
|
-
}),
|
|
93
|
-
writer: awsRds.ClusterInstance.serverlessV2('writer', {
|
|
94
|
-
instanceIdentifier: (0, common_1.getResourceName)('writer-master', service.props),
|
|
95
|
-
publiclyAccessible: params.publicAccess,
|
|
96
|
-
caCertificate: awsRds.CaCertificate.RDS_CA_RDS2048_G1,
|
|
97
|
-
...params.performanceTuning.writeInstanceProps,
|
|
98
|
-
}),
|
|
99
|
-
readers: params.performanceTuning.readers ||
|
|
100
|
-
[...Array(params.performanceTuning.readInstances).keys()].map((i) => awsRds.ClusterInstance.serverlessV2(`reader-${i}`, {
|
|
101
|
-
instanceIdentifier: (0, common_1.getResourceName)(`reader-${i}`, service.props),
|
|
102
|
-
publiclyAccessible: params.publicAccess,
|
|
103
|
-
caCertificate: awsRds.CaCertificate.RDS_CA_RDS2048_G1,
|
|
104
|
-
...params.performanceTuning.readInstanceProps,
|
|
105
|
-
...(params.performanceTuning.readInstanceProps?.scaleWithWriter === undefined
|
|
106
|
-
? { scaleWithWriter: true }
|
|
107
|
-
: { scaleWithWriter: params.performanceTuning.readInstanceProps?.scaleWithWriter }),
|
|
108
|
-
})),
|
|
109
|
-
serverlessV2MinCapacity: params.performanceTuning.minCapacity,
|
|
110
|
-
serverlessV2MaxCapacity: params.performanceTuning.maxCapacity,
|
|
111
|
-
...params.databaseClusterProps,
|
|
112
|
-
});
|
|
113
|
-
if (!params.publicAccess) {
|
|
114
|
-
// Create EC2 Instance
|
|
115
|
-
this.ec2Bastion = new awsEc2.Instance(this, 'EC2BastionInstance', {
|
|
116
|
-
vpc: params.vpcPrefab.vpc,
|
|
117
|
-
vpcSubnets: this.cluster.vpcSubnets,
|
|
118
|
-
role: this.roleBastion,
|
|
119
|
-
securityGroup: this.securityGroupBastion,
|
|
120
|
-
instanceType: awsEc2.InstanceType.of(awsEc2.InstanceClass.T2, awsEc2.InstanceSize.MICRO),
|
|
121
|
-
machineImage: new awsEc2.AmazonLinuxImage({
|
|
122
|
-
generation: awsEc2.AmazonLinuxGeneration.AMAZON_LINUX_2,
|
|
123
|
-
}),
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
this.vpcSubnets = this.cluster.vpcSubnets;
|
|
127
|
-
// RDS Proxy
|
|
128
|
-
const rdsRole = new aws_iam_1.Role(this, 'ProxyRole', {
|
|
129
|
-
roleName: (0, common_1.getResourceName)('proxy', service.props),
|
|
130
|
-
assumedBy: new aws_iam_1.ServicePrincipal('rds.amazonaws.com'),
|
|
131
|
-
});
|
|
132
|
-
this.proxy = new awsRds.DatabaseProxy(this, 'Proxy', {
|
|
133
|
-
dbProxyName: (0, common_1.getResourceName)('proxy', service.props),
|
|
134
|
-
proxyTarget: awsRds.ProxyTarget.fromCluster(this.cluster),
|
|
135
|
-
secrets: [this.cluster.secret],
|
|
136
|
-
iamAuth: true,
|
|
137
|
-
vpc: params.vpcPrefab.vpc,
|
|
138
|
-
securityGroups: [this.securityGroup],
|
|
139
|
-
role: rdsRole,
|
|
140
|
-
...params.databaseProxyProps,
|
|
141
|
-
});
|
|
142
|
-
// Read-only endpoint
|
|
143
|
-
if ((params.performanceTuning?.readInstances || params.performanceTuning?.readers?.length || 0) > 0) {
|
|
144
|
-
this.readonlyRdsProxyEndpoint = new awsRds.CfnDBProxyEndpoint(this, 'ReadReplicaEndpoint', {
|
|
145
|
-
dbProxyName: this.proxy.dbProxyName,
|
|
146
|
-
dbProxyEndpointName: this.proxy.dbProxyName + '-read-replica',
|
|
147
|
-
vpcSubnetIds: params.vpcPrefab.vpc.selectSubnets(this.cluster.vpcSubnets).subnetIds,
|
|
148
|
-
vpcSecurityGroupIds: [this.securityGroup.securityGroupId],
|
|
149
|
-
targetRole: 'READ_ONLY',
|
|
150
|
-
});
|
|
151
|
-
this.readonlyRdsProxyEndpoint.node.addDependency(this.proxy);
|
|
152
|
-
}
|
|
153
|
-
// Command Execution Parameter
|
|
154
|
-
this.secret = this.cluster.secret;
|
|
155
|
-
new aws_ssm_1.StringParameter(this, 'Config', {
|
|
156
|
-
simpleName: true,
|
|
157
|
-
parameterName: (0, common_1.getResourceName)('config', service.props),
|
|
158
|
-
stringValue: JSON.stringify({
|
|
159
|
-
baseDir: params.baseDir || `support/${service.props.serviceName}`.toLowerCase(),
|
|
160
|
-
clusterSecretArn: this.cluster.secret?.secretArn,
|
|
161
|
-
publicAccess: params.publicAccess,
|
|
162
|
-
...(!params.publicAccess ? { ec2InstanceId: this.ec2Bastion.instanceId } : {}),
|
|
163
|
-
}),
|
|
164
|
-
});
|
|
165
|
-
this.cluster.applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.DESTROY);
|
|
166
|
-
if (service.props.envName === 'prod')
|
|
167
|
-
this.cluster.applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.RETAIN);
|
|
168
|
-
// Scheduled Pause
|
|
169
|
-
if (params.scheduledPause) {
|
|
170
|
-
this.cronAggregate = new compute_1.CronAggregate(service, {
|
|
171
|
-
baseFunctionFolder: __dirname,
|
|
172
|
-
...(service.props.isDemoProject ? {} : { compiled: true }),
|
|
173
|
-
handlers: {
|
|
174
|
-
start: {
|
|
175
|
-
name: 'start-cluster',
|
|
176
|
-
cronOptions: params.scheduledPause.startCron,
|
|
177
|
-
environment: { DB_CLUSTER_NAME: this.cluster.clusterIdentifier },
|
|
178
|
-
},
|
|
179
|
-
stop: {
|
|
180
|
-
name: 'stop-cluster',
|
|
181
|
-
cronOptions: params.scheduledPause.stopCron,
|
|
182
|
-
environment: { DB_CLUSTER_NAME: this.cluster.clusterIdentifier },
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
});
|
|
186
|
-
if (this.cronAggregate.handlers?.start?.role) {
|
|
187
|
-
this.cronAggregate.handlers.start.role.addToPrincipalPolicy(new aws_iam_1.PolicyStatement({
|
|
188
|
-
actions: ['rds:StartDBCluster'],
|
|
189
|
-
resources: [aws_cdk_lib_1.Fn.join('', [`arn:aws:rds:${service.props.regionName}:${service.account}:cluster:`, this.cluster.clusterIdentifier])],
|
|
190
|
-
}));
|
|
191
|
-
}
|
|
192
|
-
if (this.cronAggregate.handlers.stop?.role) {
|
|
193
|
-
this.cronAggregate.handlers.stop.role.addToPrincipalPolicy(new aws_iam_1.PolicyStatement({
|
|
194
|
-
actions: ['rds:StopDBCluster'],
|
|
195
|
-
resources: [aws_cdk_lib_1.Fn.join('', [`arn:aws:rds:${service.props.regionName}:${service.account}:cluster:`, this.cluster.clusterIdentifier])],
|
|
196
|
-
}));
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
useClusterVpcGlobalConfigs() {
|
|
201
|
-
return {
|
|
202
|
-
vpc: this.cluster.vpc,
|
|
203
|
-
securityGroups: [this.securityGroupForLambda],
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
useModAccess(access = 'readWrite', variableName = 'DB') {
|
|
207
|
-
return (lambda) => {
|
|
208
|
-
if (!lambda.isBoundToVpc) {
|
|
209
|
-
throw new common_1.SynthError('Your lambda must run in the same VPC you passed to this RDSClusterPrefab');
|
|
210
|
-
}
|
|
211
|
-
this.proxy.grantConnect(lambda);
|
|
212
|
-
this.secret.grantRead(lambda);
|
|
213
|
-
if (access === 'readOnly' && this.readonlyRdsProxyEndpoint) {
|
|
214
|
-
lambda.addEnvironment(variableName, this.readonlyRdsProxyEndpoint.attrEndpoint);
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
lambda.addEnvironment(variableName, this.proxy.endpoint);
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
exports.RdsClusterPrefab = RdsClusterPrefab;
|
|
223
|
-
//# sourceMappingURL=index.js.map
|