@gradientedge/cdk-utils 8.118.0 → 8.120.0
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/app/api-destined-function/package.json +1 -1
- package/dist/src/lib/common/construct.d.ts +32 -32
- package/dist/src/lib/common/construct.js +36 -59
- package/dist/src/lib/common/stack.d.ts +8 -7
- package/dist/src/lib/common/stack.js +17 -37
- package/dist/src/lib/common/types.d.ts +2 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
- package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
- package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
- package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
- package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
- package/dist/src/lib/construct/application-configuration/main.js +17 -41
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
- package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
- package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
- package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
- package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
- package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
- package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
- package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
- package/dist/src/lib/construct/static-site/main.d.ts +15 -15
- package/dist/src/lib/construct/static-site/main.js +4 -27
- package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.d.ts +10 -10
- package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.js +21 -44
- package/dist/src/lib/services/api-gateway/types.d.ts +7 -0
- package/dist/src/lib/services/{aws/appconfig → appconfig}/main.d.ts +7 -7
- package/dist/src/lib/services/{aws/appconfig → appconfig}/main.js +14 -37
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.d.ts +2 -2
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.d.ts +19 -19
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.js +47 -46
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.d.ts +3 -4
- package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.d.ts +6 -6
- package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.js +5 -28
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.d.ts +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.js +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.d.ts +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.js +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/codebuild → codebuild}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/codebuild → codebuild}/main.js +7 -30
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.js +8 -31
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.d.ts +3 -3
- package/dist/src/lib/services/elastic-container-registry/main.js +37 -0
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.d.ts +11 -11
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.js +27 -50
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.d.ts +4 -4
- package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.js +12 -35
- package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.js +8 -31
- package/dist/src/lib/services/{aws/elasticache → elasticache}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/elasticache → elasticache}/main.js +10 -33
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.d.ts +14 -14
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.js +26 -49
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.d.ts +11 -11
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.js +6 -29
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/evidently → evidently}/main.d.ts +8 -8
- package/dist/src/lib/services/{aws/evidently → evidently}/main.js +18 -41
- package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.d.ts +49 -50
- package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.js +110 -133
- package/dist/src/lib/services/index.d.ts +28 -1
- package/dist/src/lib/services/index.js +28 -1
- package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.d.ts +3 -3
- package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.js +5 -28
- package/dist/src/lib/services/{aws/lambda → lambda}/main.d.ts +12 -14
- package/dist/src/lib/services/{aws/lambda → lambda}/main.js +32 -59
- package/dist/src/lib/services/{aws/lambda → lambda}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/route53 → route53}/main.d.ts +10 -10
- package/dist/src/lib/services/{aws/route53 → route53}/main.js +21 -44
- package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.d.ts +6 -7
- package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.js +11 -34
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.d.ts +7 -8
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.js +15 -38
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.d.ts +10 -11
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.js +31 -54
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/step-function → step-function}/main.d.ts +32 -33
- package/dist/src/lib/services/{aws/step-function → step-function}/main.js +33 -57
- package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.d.ts +6 -7
- package/dist/src/lib/services/virtual-private-cloud/main.js +70 -0
- package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.js +8 -31
- package/dist/src/lib/utils/aws/index.d.ts +6 -3
- package/dist/src/lib/utils/aws/index.js +9 -26
- package/package.json +15 -15
- package/src/lib/common/construct.ts +97 -67
- package/src/lib/common/stack.ts +12 -12
- package/src/lib/common/types.ts +2 -2
- package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
- package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
- package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
- package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
- package/src/lib/construct/application-configuration/main.ts +31 -24
- package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
- package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
- package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
- package/src/lib/construct/rest-api-lambda/main.ts +21 -21
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
- package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
- package/src/lib/construct/static-asset-deployment/main.ts +6 -6
- package/src/lib/construct/static-site/main.ts +23 -17
- package/src/lib/services/{aws/api-gateway → api-gateway}/main.ts +42 -36
- package/src/lib/services/api-gateway/types.ts +8 -0
- package/src/lib/services/{aws/appconfig → appconfig}/main.ts +19 -19
- package/src/lib/services/{aws/certificate-manager → certificate-manager}/main.ts +14 -14
- package/src/lib/services/{aws/certificate-manager → certificate-manager}/types.ts +2 -2
- package/src/lib/services/{aws/cloudfront → cloudfront}/main.ts +89 -75
- package/src/lib/services/{aws/cloudfront → cloudfront}/types.ts +7 -4
- package/src/lib/services/{aws/cloudtrail → cloudtrail}/main.ts +12 -12
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.ts +2 -2
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/main.ts +2 -2
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/types.ts +1 -1
- package/src/lib/services/{aws/codebuild → codebuild}/main.ts +8 -8
- package/src/lib/services/{aws/dynamodb → dynamodb}/main.ts +9 -9
- package/src/lib/services/{aws/dynamodb → dynamodb}/types.ts +1 -1
- package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.ts +5 -5
- package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.ts +49 -38
- package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.ts +4 -4
- package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.ts +17 -17
- package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.ts +12 -12
- package/src/lib/services/{aws/elasticache → elasticache}/main.ts +11 -11
- package/src/lib/services/{aws/eventbridge → eventbridge}/main.ts +38 -38
- package/src/lib/services/{aws/eventbridge → eventbridge}/target.ts +15 -15
- package/src/lib/services/{aws/eventbridge → eventbridge}/types.ts +1 -1
- package/src/lib/services/{aws/evidently → evidently}/main.ts +19 -19
- package/src/lib/services/{aws/identity-access-management → identity-access-management}/main.ts +143 -135
- package/src/lib/services/index.ts +28 -1
- package/src/lib/services/{aws/key-management-service → key-management-service}/main.ts +6 -6
- package/src/lib/services/{aws/lambda → lambda}/main.ts +66 -60
- package/src/lib/services/{aws/lambda → lambda}/types.ts +1 -1
- package/src/lib/services/{aws/route53 → route53}/main.ts +32 -32
- package/src/lib/services/{aws/secrets-manager → secrets-manager}/main.ts +12 -16
- package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.ts +14 -14
- package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.ts +19 -19
- package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.ts +1 -1
- package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.ts +40 -40
- package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.ts +1 -1
- package/src/lib/services/{aws/step-function → step-function}/main.ts +78 -66
- package/src/lib/services/{aws/systems-manager → systems-manager}/main.ts +18 -13
- package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.ts +17 -17
- package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.ts +9 -9
- package/src/lib/utils/aws/index.ts +8 -5
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -7
- package/dist/src/lib/services/aws/elastic-container-registry/main.js +0 -60
- package/dist/src/lib/services/aws/index.d.ts +0 -28
- package/dist/src/lib/services/aws/index.js +0 -44
- package/dist/src/lib/services/aws/virtual-private-cloud/main.js +0 -93
- package/src/lib/services/aws/api-gateway/types.ts +0 -8
- package/src/lib/services/aws/index.ts +0 -28
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.js +0 -0
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/types.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.js +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.js +0 -0
- /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.js +0 -0
- /package/dist/src/lib/services/{aws/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/src/lib/services/{aws/constants.js → constants.js} +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.js +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.js +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.js +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.js +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/index.js +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/types.js +0 -0
- /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.js +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/index.js +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/types.js +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/index.js +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/types.js +0 -0
- /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/index.js +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/types.js +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.js +0 -0
- /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.js +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.js +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.js +0 -0
- /package/src/lib/services/{aws/api-gateway → api-gateway}/index.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/constants.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/index.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/types.ts +0 -0
- /package/src/lib/services/{aws/certificate-manager → certificate-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudfront → cloudfront}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudtrail → cloudtrail}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudtrail → cloudtrail}/types.ts +0 -0
- /package/src/lib/services/{aws/cloudwatch → cloudwatch}/index.ts +0 -0
- /package/src/lib/services/{aws/codebuild → codebuild}/index.ts +0 -0
- /package/src/lib/services/{aws/constants.ts → constants.ts} +0 -0
- /package/src/lib/services/{aws/dynamodb → dynamodb}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.ts +0 -0
- /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.ts +0 -0
- /package/src/lib/services/{aws/elasticache → elasticache}/index.ts +0 -0
- /package/src/lib/services/{aws/elasticache → elasticache}/types.ts +0 -0
- /package/src/lib/services/{aws/eventbridge → eventbridge}/index.ts +0 -0
- /package/src/lib/services/{aws/evidently → evidently}/index.ts +0 -0
- /package/src/lib/services/{aws/evidently → evidently}/types.ts +0 -0
- /package/src/lib/services/{aws/identity-access-management → identity-access-management}/index.ts +0 -0
- /package/src/lib/services/{aws/key-management-service → key-management-service}/index.ts +0 -0
- /package/src/lib/services/{aws/key-management-service → key-management-service}/types.ts +0 -0
- /package/src/lib/services/{aws/lambda → lambda}/index.ts +0 -0
- /package/src/lib/services/{aws/route53 → route53}/index.ts +0 -0
- /package/src/lib/services/{aws/route53 → route53}/types.ts +0 -0
- /package/src/lib/services/{aws/secrets-manager → secrets-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.ts +0 -0
- /package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.ts +0 -0
- /package/src/lib/services/{aws/step-function → step-function}/index.ts +0 -0
- /package/src/lib/services/{aws/step-function → step-function}/types.ts +0 -0
- /package/src/lib/services/{aws/systems-manager → systems-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/systems-manager → systems-manager}/types.ts +0 -0
- /package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.ts +0 -0
- /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.ts +0 -0
- /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.ts +0 -0
|
@@ -1,33 +1,10 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SecretsManager = void 0;
|
|
27
4
|
const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
5
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
6
|
+
const aws_secretsmanager_1 = require("aws-cdk-lib/aws-secretsmanager");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
31
8
|
/**
|
|
32
9
|
* @classdesc Provides operations on AWS Secrets Manager.
|
|
33
10
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -36,10 +13,10 @@ const utils = __importStar(require("../../../utils"));
|
|
|
36
13
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
37
14
|
*
|
|
38
15
|
* class CustomConstruct extends CommonConstruct {
|
|
39
|
-
* constructor(parent:
|
|
16
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
40
17
|
* super(parent, id, props)
|
|
41
18
|
* this.props = props
|
|
42
|
-
* this.
|
|
19
|
+
* this.loadSecret('MySecretName', 'eu-west-1')
|
|
43
20
|
* }
|
|
44
21
|
* }
|
|
45
22
|
* @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
|
|
@@ -52,12 +29,12 @@ class SecretsManager {
|
|
|
52
29
|
* @param props the secret properties
|
|
53
30
|
*/
|
|
54
31
|
createSecret(id, scope, props) {
|
|
55
|
-
const secret = new
|
|
32
|
+
const secret = new aws_secretsmanager_1.Secret(scope, `${id}`, {
|
|
56
33
|
...props,
|
|
57
34
|
secretName: `${props.secretName}-${scope.props.stage}`,
|
|
58
35
|
});
|
|
59
|
-
|
|
60
|
-
|
|
36
|
+
(0, utils_1.createCfnOutput)(`${id}-secretName`, scope, secret.secretName);
|
|
37
|
+
(0, utils_1.createCfnOutput)(`${id}-secretArn`, scope, secret.secretArn);
|
|
61
38
|
return secret;
|
|
62
39
|
}
|
|
63
40
|
/**
|
|
@@ -68,7 +45,7 @@ class SecretsManager {
|
|
|
68
45
|
* @param exportName
|
|
69
46
|
*/
|
|
70
47
|
retrieveSecretFromSecretsManager(id, scope, stackName, exportName) {
|
|
71
|
-
return
|
|
48
|
+
return aws_secretsmanager_1.Secret.fromSecretNameV2(scope, `${id}`, aws_cdk_lib_1.Fn.importValue(`${stackName}-${scope.props.stage}-${exportName}`));
|
|
72
49
|
}
|
|
73
50
|
/**
|
|
74
51
|
* @summary Method to resolve secret value from a secret using AWS SDK
|
|
@@ -78,7 +55,7 @@ class SecretsManager {
|
|
|
78
55
|
*/
|
|
79
56
|
async resolveSecretValue(region, secretId, secretKey) {
|
|
80
57
|
const client = new client_secrets_manager_1.SecretsManagerClient({
|
|
81
|
-
credentials:
|
|
58
|
+
credentials: (0, utils_1.determineCredentials)(),
|
|
82
59
|
region: region,
|
|
83
60
|
});
|
|
84
61
|
const command = new client_secrets_manager_1.GetSecretValueCommand({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { CommonConstruct } from '
|
|
1
|
+
import { IFunction } from 'aws-cdk-lib/aws-lambda';
|
|
2
|
+
import { Topic } from 'aws-cdk-lib/aws-sns';
|
|
3
|
+
import { CommonConstruct } from '../../common';
|
|
4
4
|
import { SubscriptionProps } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* @classdesc Provides operations on AWS Simple Notification Service.
|
|
@@ -26,7 +26,7 @@ export declare class SnsManager {
|
|
|
26
26
|
* @param props
|
|
27
27
|
* @param emails
|
|
28
28
|
*/
|
|
29
|
-
createEmailNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, emails: string[]):
|
|
29
|
+
createEmailNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, emails: string[]): Topic;
|
|
30
30
|
/**
|
|
31
31
|
* @summary Method to create a lambda notification service
|
|
32
32
|
* @param id scoped id of the resource
|
|
@@ -34,5 +34,5 @@ export declare class SnsManager {
|
|
|
34
34
|
* @param props
|
|
35
35
|
* @param lambdaFunction
|
|
36
36
|
*/
|
|
37
|
-
createLambdaNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, lambdaFunction:
|
|
37
|
+
createLambdaNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, lambdaFunction: IFunction): Topic;
|
|
38
38
|
}
|
|
@@ -1,32 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SnsManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
4
|
+
const aws_sns_1 = require("aws-cdk-lib/aws-sns");
|
|
5
|
+
const aws_sns_subscriptions_1 = require("aws-cdk-lib/aws-sns-subscriptions");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
30
7
|
/**
|
|
31
8
|
* @classdesc Provides operations on AWS Simple Notification Service.
|
|
32
9
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -54,16 +31,16 @@ class SnsManager {
|
|
|
54
31
|
createEmailNotificationService(id, scope, props, emails) {
|
|
55
32
|
if (!props)
|
|
56
33
|
throw `Subscription props undefined for ${id}`;
|
|
57
|
-
const topic = new
|
|
34
|
+
const topic = new aws_sns_1.Topic(scope, id, {
|
|
58
35
|
displayName: `${props.topicName}-${scope.props.stage}`,
|
|
59
36
|
fifo: props.fifo,
|
|
60
37
|
topicName: `${props.topicName}-${scope.props.stage}`,
|
|
61
38
|
});
|
|
62
39
|
if (emails && emails.length > 0) {
|
|
63
|
-
emails.forEach((email) => topic.addSubscription(new
|
|
40
|
+
emails.forEach((email) => topic.addSubscription(new aws_sns_subscriptions_1.EmailSubscription(email)));
|
|
64
41
|
}
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionArn`, scope, topic.topicArn);
|
|
43
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionName`, scope, topic.topicName);
|
|
67
44
|
return topic;
|
|
68
45
|
}
|
|
69
46
|
/**
|
|
@@ -76,14 +53,14 @@ class SnsManager {
|
|
|
76
53
|
createLambdaNotificationService(id, scope, props, lambdaFunction) {
|
|
77
54
|
if (!props)
|
|
78
55
|
throw `Subscription props undefined for ${id}`;
|
|
79
|
-
const topic = new
|
|
56
|
+
const topic = new aws_sns_1.Topic(scope, id, {
|
|
80
57
|
displayName: `${props.topicName}-${scope.props.stage}`,
|
|
81
58
|
fifo: props.fifo,
|
|
82
59
|
topicName: `${props.topicName}-${scope.props.stage}`,
|
|
83
60
|
});
|
|
84
|
-
topic.addSubscription(new
|
|
85
|
-
|
|
86
|
-
|
|
61
|
+
topic.addSubscription(new aws_sns_subscriptions_1.LambdaSubscription(lambdaFunction));
|
|
62
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionArn`, scope, topic.topicArn);
|
|
63
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionName`, scope, topic.topicName);
|
|
87
64
|
return topic;
|
|
88
65
|
}
|
|
89
66
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { CommonConstruct } from '../../../common';
|
|
4
|
-
import { QueueProps } from './types';
|
|
1
|
+
import { IQueue, Queue } from 'aws-cdk-lib/aws-sqs';
|
|
2
|
+
import { CommonConstruct } from '../../common';
|
|
5
3
|
import { LambdaProps } from '../lambda';
|
|
4
|
+
import { QueueProps } from './types';
|
|
6
5
|
/**
|
|
7
6
|
* @classdesc Provides operations on AWS Simple Queue Service.
|
|
8
7
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -11,7 +10,7 @@ import { LambdaProps } from '../lambda';
|
|
|
11
10
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
12
11
|
*
|
|
13
12
|
* class CustomConstruct extends CommonConstruct {
|
|
14
|
-
* constructor(parent:
|
|
13
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
15
14
|
* super(parent, id, props)
|
|
16
15
|
* this.props = props
|
|
17
16
|
* this.sqsManager.createQueue('MySqs', this, {...})
|
|
@@ -27,14 +26,14 @@ export declare class SqsManager {
|
|
|
27
26
|
* @param props
|
|
28
27
|
* @param deadLetterQueue
|
|
29
28
|
*/
|
|
30
|
-
createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?:
|
|
29
|
+
createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?: IQueue): Queue;
|
|
31
30
|
/**
|
|
32
31
|
* @summary Method to create a redrive queue for a lambda function
|
|
33
32
|
* @param id scoped id of the resource
|
|
34
33
|
* @param scope scope in which this resource is defined
|
|
35
34
|
* @param props the lambda properties
|
|
36
35
|
*/
|
|
37
|
-
createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps):
|
|
36
|
+
createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps): Queue;
|
|
38
37
|
/**
|
|
39
38
|
* @summary Method to create a dead letter queue for a lambda function
|
|
40
39
|
* @param id scoped id of the resource
|
|
@@ -42,5 +41,5 @@ export declare class SqsManager {
|
|
|
42
41
|
* @param props the lambda properties
|
|
43
42
|
* @param deadLetterQueue
|
|
44
43
|
*/
|
|
45
|
-
createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue:
|
|
44
|
+
createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue: IQueue): Queue;
|
|
46
45
|
}
|
|
@@ -1,32 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SqsManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
4
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
+
const aws_sqs_1 = require("aws-cdk-lib/aws-sqs");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
30
7
|
/**
|
|
31
8
|
* @classdesc Provides operations on AWS Simple Queue Service.
|
|
32
9
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -35,7 +12,7 @@ const utils = __importStar(require("../../../utils"));
|
|
|
35
12
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
36
13
|
*
|
|
37
14
|
* class CustomConstruct extends CommonConstruct {
|
|
38
|
-
* constructor(parent:
|
|
15
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
39
16
|
* super(parent, id, props)
|
|
40
17
|
* this.props = props
|
|
41
18
|
* this.sqsManager.createQueue('MySqs', this, {...})
|
|
@@ -54,9 +31,9 @@ class SqsManager {
|
|
|
54
31
|
createQueue(id, scope, props, deadLetterQueue) {
|
|
55
32
|
if (!props)
|
|
56
33
|
throw `Queue props undefined for ${id}`;
|
|
57
|
-
const queue = new
|
|
34
|
+
const queue = new aws_sqs_1.Queue(scope, id, {
|
|
58
35
|
contentBasedDeduplication: props.contentBasedDeduplication,
|
|
59
|
-
dataKeyReuse: props.dataKeyReuseInSecs ?
|
|
36
|
+
dataKeyReuse: props.dataKeyReuseInSecs ? aws_cdk_lib_1.Duration.seconds(props.dataKeyReuseInSecs) : props.dataKeyReuse,
|
|
60
37
|
deadLetterQueue: !deadLetterQueue
|
|
61
38
|
? undefined
|
|
62
39
|
: {
|
|
@@ -64,7 +41,7 @@ class SqsManager {
|
|
|
64
41
|
queue: deadLetterQueue,
|
|
65
42
|
},
|
|
66
43
|
deduplicationScope: props.deduplicationScope,
|
|
67
|
-
deliveryDelay: props.deliveryDelayInSecs ?
|
|
44
|
+
deliveryDelay: props.deliveryDelayInSecs ? aws_cdk_lib_1.Duration.seconds(props.deliveryDelayInSecs) : undefined,
|
|
68
45
|
encryption: props.encryption,
|
|
69
46
|
encryptionMasterKey: props.encryptionMasterKey,
|
|
70
47
|
fifo: props.fifo,
|
|
@@ -72,22 +49,22 @@ class SqsManager {
|
|
|
72
49
|
maxMessageSizeBytes: props.maxMessageSizeBytes,
|
|
73
50
|
queueName: props.queueName,
|
|
74
51
|
receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
|
|
75
|
-
?
|
|
52
|
+
? aws_cdk_lib_1.Duration.seconds(props.receiveMessageWaitTimeInSecs)
|
|
76
53
|
: props.receiveMessageWaitTime,
|
|
77
|
-
removalPolicy: props.removalPolicy ??
|
|
78
|
-
retentionPeriod: props.retentionInDays ?
|
|
54
|
+
removalPolicy: props.removalPolicy ?? aws_cdk_lib_1.RemovalPolicy.DESTROY,
|
|
55
|
+
retentionPeriod: props.retentionInDays ? aws_cdk_lib_1.Duration.days(props.retentionInDays) : aws_cdk_lib_1.Duration.days(7),
|
|
79
56
|
visibilityTimeout: props.visibilityTimeoutInSecs
|
|
80
|
-
?
|
|
57
|
+
? aws_cdk_lib_1.Duration.seconds(props.visibilityTimeoutInSecs)
|
|
81
58
|
: props.visibilityTimeout,
|
|
82
59
|
});
|
|
83
60
|
if (props.tags && props.tags.length > 0) {
|
|
84
61
|
props.tags.forEach(tag => {
|
|
85
|
-
|
|
62
|
+
aws_cdk_lib_1.Tags.of(queue).add(tag.key, tag.value);
|
|
86
63
|
});
|
|
87
64
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
(0, utils_1.createCfnOutput)(`${id}-queueArn`, scope, queue.queueArn);
|
|
66
|
+
(0, utils_1.createCfnOutput)(`${id}-queueName`, scope, queue.queueName);
|
|
67
|
+
(0, utils_1.createCfnOutput)(`${id}-queueUrl`, scope, queue.queueUrl);
|
|
91
68
|
return queue;
|
|
92
69
|
}
|
|
93
70
|
/**
|
package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.d.ts
RENAMED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { IDistribution } from 'aws-cdk-lib/aws-cloudfront';
|
|
2
|
+
import { CfnBucketPolicy, IBucket } from 'aws-cdk-lib/aws-s3';
|
|
3
|
+
import { ISource } from 'aws-cdk-lib/aws-s3-deployment';
|
|
4
|
+
import { CommonConstruct } from '../../common';
|
|
5
5
|
import { LifecycleRule, S3BucketProps } from './types';
|
|
6
|
-
import { CommonConstruct } from '../../../common';
|
|
7
6
|
/**
|
|
8
|
-
* @classdesc Provides operations on AWS S3
|
|
7
|
+
* @classdesc Provides operations on AWS S3
|
|
9
8
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
10
9
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
11
10
|
* @example
|
|
12
11
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
13
12
|
*
|
|
14
13
|
* class CustomConstruct extends CommonConstruct {
|
|
15
|
-
* constructor(parent:
|
|
14
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
16
15
|
* super(parent, id, props)
|
|
17
16
|
* this.props = props
|
|
18
17
|
* this.s3Manager.createS3Bucket('MyBucket', this)
|
|
@@ -50,14 +49,14 @@ export declare class S3Manager {
|
|
|
50
49
|
* @param scope scope in which this resource is defined
|
|
51
50
|
* @param props bucket properties
|
|
52
51
|
*/
|
|
53
|
-
createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps):
|
|
52
|
+
createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps): IBucket;
|
|
54
53
|
/**
|
|
55
54
|
* @summary Method to create an iam bucket policy for cloudtrail
|
|
56
55
|
* @param id scoped id of the resource
|
|
57
56
|
* @param scope scope in which this resource is defined
|
|
58
57
|
* @param bucket
|
|
59
58
|
*/
|
|
60
|
-
createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket:
|
|
59
|
+
createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket: IBucket): CfnBucketPolicy;
|
|
61
60
|
/**
|
|
62
61
|
* @summary Method to create a s3 bucket deployment
|
|
63
62
|
* @param id scoped id of the resource
|
|
@@ -68,7 +67,7 @@ export declare class S3Manager {
|
|
|
68
67
|
* @param prefix
|
|
69
68
|
* @param prune
|
|
70
69
|
*/
|
|
71
|
-
doBucketDeployment(id: string, scope: CommonConstruct, siteBucket:
|
|
70
|
+
doBucketDeployment(id: string, scope: CommonConstruct, siteBucket: IBucket, distribution: IDistribution, sources: ISource[], prefix: string, prune?: boolean): void;
|
|
72
71
|
/**
|
|
73
72
|
*
|
|
74
73
|
* @param id scoped id of the resource
|
|
@@ -76,5 +75,5 @@ export declare class S3Manager {
|
|
|
76
75
|
* @param bucket bucket to create the folders in
|
|
77
76
|
* @param folders list of folder names to be created in the bucket
|
|
78
77
|
*/
|
|
79
|
-
createBucketFolders(id: string, scope: CommonConstruct, bucket:
|
|
78
|
+
createBucketFolders(id: string, scope: CommonConstruct, bucket: IBucket, folders: string[]): void;
|
|
80
79
|
}
|
|
@@ -1,43 +1,20 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.S3Manager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
4
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
+
const aws_iam_1 = require("aws-cdk-lib/aws-iam");
|
|
6
|
+
const aws_s3_1 = require("aws-cdk-lib/aws-s3");
|
|
7
|
+
const aws_s3_deployment_1 = require("aws-cdk-lib/aws-s3-deployment");
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
32
9
|
/**
|
|
33
|
-
* @classdesc Provides operations on AWS S3
|
|
10
|
+
* @classdesc Provides operations on AWS S3
|
|
34
11
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
35
12
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
36
13
|
* @example
|
|
37
14
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
38
15
|
*
|
|
39
16
|
* class CustomConstruct extends CommonConstruct {
|
|
40
|
-
* constructor(parent:
|
|
17
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
41
18
|
* super(parent, id, props)
|
|
42
19
|
* this.props = props
|
|
43
20
|
* this.s3Manager.createS3Bucket('MyBucket', this)
|
|
@@ -58,12 +35,12 @@ class S3Manager {
|
|
|
58
35
|
bucketLifecycleRules.push({
|
|
59
36
|
abortIncompleteMultipartUploadAfter: lifecycleRule.abortIncompleteMultipartUploadAfter,
|
|
60
37
|
enabled: lifecycleRule.enabled,
|
|
61
|
-
expiration: lifecycleRule.expirationInDays ?
|
|
38
|
+
expiration: lifecycleRule.expirationInDays ? aws_cdk_lib_1.Duration.days(lifecycleRule.expirationInDays) : undefined,
|
|
62
39
|
expirationDate: lifecycleRule.expirationDate,
|
|
63
40
|
expiredObjectDeleteMarker: lifecycleRule.expiredObjectDeleteMarker,
|
|
64
41
|
id: lifecycleRule.id,
|
|
65
42
|
noncurrentVersionExpiration: lifecycleRule.noncurrentVersionExpirationInDays
|
|
66
|
-
?
|
|
43
|
+
? aws_cdk_lib_1.Duration.days(lifecycleRule.noncurrentVersionExpirationInDays)
|
|
67
44
|
: undefined,
|
|
68
45
|
noncurrentVersionTransitions: lifecycleRule.noncurrentVersionTransitions,
|
|
69
46
|
prefix: lifecycleRule.prefix,
|
|
@@ -79,7 +56,7 @@ class S3Manager {
|
|
|
79
56
|
* @param bucketName the bucket name
|
|
80
57
|
*/
|
|
81
58
|
static determineBucketNameByAccountAndRegion(scope, bucketName) {
|
|
82
|
-
return `${bucketName}-${
|
|
59
|
+
return `${bucketName}-${aws_cdk_lib_1.Stack.of(scope).account}-${scope.props.region}-${scope.props.stage}`;
|
|
83
60
|
}
|
|
84
61
|
/**
|
|
85
62
|
* @summary Method to determine the bucket name using domain name
|
|
@@ -113,27 +90,27 @@ class S3Manager {
|
|
|
113
90
|
let bucket;
|
|
114
91
|
const bucketName = S3Manager.determineBucketName(scope, props.bucketName);
|
|
115
92
|
if (props.existingBucket && props.bucketName) {
|
|
116
|
-
bucket =
|
|
93
|
+
bucket = aws_s3_1.Bucket.fromBucketName(scope, `${id}`, bucketName);
|
|
117
94
|
}
|
|
118
95
|
else {
|
|
119
96
|
let logBucket;
|
|
120
97
|
if (props.logBucketName) {
|
|
121
98
|
const logBucketName = S3Manager.determineBucketName(scope, props.logBucketName);
|
|
122
|
-
logBucket =
|
|
99
|
+
logBucket = aws_s3_1.Bucket.fromBucketName(scope, `${id}-logs`, logBucketName);
|
|
123
100
|
}
|
|
124
|
-
bucket = new
|
|
101
|
+
bucket = new aws_s3_1.Bucket(scope, `${id}-bucket`, {
|
|
125
102
|
accessControl: props.accessControl,
|
|
126
103
|
autoDeleteObjects: props.autoDeleteObjects,
|
|
127
|
-
blockPublicAccess: props.blockPublicAccess ||
|
|
104
|
+
blockPublicAccess: props.blockPublicAccess || aws_s3_1.BlockPublicAccess.BLOCK_ALL,
|
|
128
105
|
bucketName: bucketName,
|
|
129
106
|
cors: props.cors,
|
|
130
|
-
encryption: props.encryption ||
|
|
107
|
+
encryption: props.encryption || aws_s3_1.BucketEncryption.S3_MANAGED,
|
|
131
108
|
encryptionKey: props.encryptionKey,
|
|
132
109
|
lifecycleRules: this.determineBucketLifecycleRules(props),
|
|
133
110
|
metrics: props.metrics,
|
|
134
111
|
objectOwnership: props.objectOwnership,
|
|
135
112
|
publicReadAccess: props.publicReadAccess,
|
|
136
|
-
removalPolicy: props.removalPolicy ||
|
|
113
|
+
removalPolicy: props.removalPolicy || aws_cdk_lib_1.RemovalPolicy.RETAIN,
|
|
137
114
|
serverAccessLogsBucket: logBucket,
|
|
138
115
|
serverAccessLogsPrefix: props.serverAccessLogsPrefix,
|
|
139
116
|
versioned: props.versioned,
|
|
@@ -150,11 +127,11 @@ class S3Manager {
|
|
|
150
127
|
}
|
|
151
128
|
if (props.tags && props.tags.length > 0) {
|
|
152
129
|
props.tags.forEach(tag => {
|
|
153
|
-
|
|
130
|
+
aws_cdk_lib_1.Tags.of(bucket).add(tag.key, tag.value);
|
|
154
131
|
});
|
|
155
132
|
}
|
|
156
|
-
|
|
157
|
-
|
|
133
|
+
(0, utils_1.createCfnOutput)(`${id}-bucketName`, scope, bucket.bucketName);
|
|
134
|
+
(0, utils_1.createCfnOutput)(`${id}-bucketArn`, scope, bucket.bucketArn);
|
|
158
135
|
return bucket;
|
|
159
136
|
}
|
|
160
137
|
/**
|
|
@@ -164,25 +141,25 @@ class S3Manager {
|
|
|
164
141
|
* @param bucket
|
|
165
142
|
*/
|
|
166
143
|
createBucketPolicyForCloudTrail(id, scope, bucket) {
|
|
167
|
-
const bucketPolicyDocument = new
|
|
144
|
+
const bucketPolicyDocument = new aws_iam_1.PolicyDocument({
|
|
168
145
|
statements: [
|
|
169
|
-
new
|
|
146
|
+
new aws_iam_1.PolicyStatement({
|
|
170
147
|
actions: ['s3:GetBucketAcl'],
|
|
171
|
-
effect:
|
|
172
|
-
principals: [new
|
|
148
|
+
effect: aws_iam_1.Effect.ALLOW,
|
|
149
|
+
principals: [new aws_iam_1.ServicePrincipal('cloudtrail.amazonaws.com')],
|
|
173
150
|
resources: [bucket.bucketArn],
|
|
174
151
|
sid: 'AWSCloudTrailAclCheck20150319',
|
|
175
152
|
}),
|
|
176
|
-
new
|
|
153
|
+
new aws_iam_1.PolicyStatement({
|
|
177
154
|
actions: ['s3:PutObject'],
|
|
178
|
-
effect:
|
|
179
|
-
principals: [new
|
|
155
|
+
effect: aws_iam_1.Effect.ALLOW,
|
|
156
|
+
principals: [new aws_iam_1.ServicePrincipal('cloudtrail.amazonaws.com')],
|
|
180
157
|
resources: [bucket.arnForObjects('*')],
|
|
181
158
|
sid: 'AWSCloudTrailWrite20150319',
|
|
182
159
|
}),
|
|
183
160
|
],
|
|
184
161
|
});
|
|
185
|
-
return new
|
|
162
|
+
return new aws_s3_1.CfnBucketPolicy(scope, `${id}`, {
|
|
186
163
|
bucket: bucket.bucketName,
|
|
187
164
|
policyDocument: bucketPolicyDocument,
|
|
188
165
|
});
|
|
@@ -198,14 +175,14 @@ class S3Manager {
|
|
|
198
175
|
* @param prune
|
|
199
176
|
*/
|
|
200
177
|
doBucketDeployment(id, scope, siteBucket, distribution, sources, prefix, prune) {
|
|
201
|
-
new
|
|
178
|
+
new aws_s3_deployment_1.BucketDeployment(scope, `${id}`, {
|
|
202
179
|
destinationBucket: siteBucket,
|
|
203
180
|
destinationKeyPrefix: prefix,
|
|
204
181
|
distribution: distribution,
|
|
205
182
|
distributionPaths: ['/*'],
|
|
206
183
|
memoryLimit: 1024,
|
|
207
184
|
prune: !!prune,
|
|
208
|
-
serverSideEncryption:
|
|
185
|
+
serverSideEncryption: aws_s3_deployment_1.ServerSideEncryption.AES_256,
|
|
209
186
|
sources: sources,
|
|
210
187
|
});
|
|
211
188
|
}
|
|
@@ -221,11 +198,11 @@ class S3Manager {
|
|
|
221
198
|
throw `Folder unspecified for ${id}`;
|
|
222
199
|
}
|
|
223
200
|
folders.forEach(folder => {
|
|
224
|
-
new
|
|
201
|
+
new aws_s3_deployment_1.BucketDeployment(scope, `${id}-${folder}`, {
|
|
225
202
|
destinationBucket: bucket,
|
|
226
203
|
destinationKeyPrefix: folder,
|
|
227
204
|
prune: false,
|
|
228
|
-
sources: [
|
|
205
|
+
sources: [aws_s3_deployment_1.Source.data('README.md', `This is the ${folder} folder for ${id}`)],
|
|
229
206
|
});
|
|
230
207
|
});
|
|
231
208
|
}
|