Fix bug in deployment procedure in AWS CDK and support HTTPS (#1491)

* add cloudfront

* modify: healthcheck disable

* modify: health check option

* modify nodejsbuild

* add nodejs version

* endpoint configuration

* set axios url

* remote console.log VITE_PROXY_TARGET

* create alb stack

* add alb to origin

* alb build success

* remote baseURL setting

* add redirect

* change responseHttpStatus to 200

* modify output and readme

* modify architecture

* add health check path route to cloudfront routing

* modified: c9 env name in deploy langflow section

* modified : package dependency for pymysql

* modified: deploy procedure

* modified: deploy procedure (ja)

---------

Co-authored-by: nsxshota <nsxshota@amazon.co.jp>
Co-authored-by: ymkazuki <ymkazuki@amazon.co.jp>
Co-authored-by: Shota Nakamoto <53632932+nsy0328@users.noreply.github.com>
This commit is contained in:
kazuki306 2024-03-04 20:50:51 +09:00 • committed by GitHub
commit 3eeda84d28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 678 additions and 271 deletions

View file

@ -8,9 +8,11 @@
"name": "cdk",
"version": "0.1.0",
"dependencies": {
"aws-cdk-lib": "^2.86.0",
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.49.0",
"aws-cdk-lib": "^2.124.0",
"cdk-ecr-deployment": "^2.5.30",
"constructs": "^10.0.0",
"deploy-time-build": "^0.3.12",
"dotenv": "^16.3.1",
"source-map-support": "^0.5.21"
},
@ -20,7 +22,7 @@
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "20.1.7",
"aws-cdk": "2.86.0",
"aws-cdk": "^2.86.0",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
@ -41,19 +43,324 @@
}
},
"node_modules/@aws-cdk/asset-awscli-v1": {
"version": "2.2.201",
"resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.201.tgz",
"integrity": "sha512-INZqcwDinNaIdb5CtW3ez5s943nX5stGBQS6VOP2JDlOFP81hM3fds/9NDknipqfUkZM43dx+HgVvkXYXXARCQ=="
"version": "2.2.202",
"resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.202.tgz",
"integrity": "sha512-JqlF0D4+EVugnG5dAsNZMqhu3HW7ehOXm5SDMxMbXNDMdsF0pxtQKNHRl52z1U9igsHmaFpUgSGjbhAJ+0JONg=="
},
"node_modules/@aws-cdk/asset-kubectl-v20": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz",
"integrity": "sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg=="
},
"node_modules/@aws-cdk/asset-node-proxy-agent-v5": {
"version": "2.0.166",
"resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.166.tgz",
"integrity": "sha512-j0xnccpUQHXJKPgCwQcGGNu4lRiC1PptYfdxBIH1L4dRK91iBxtSQHESRQX+yB47oGLaF/WfNN/aF3WXwlhikg=="
"node_modules/@aws-cdk/asset-node-proxy-agent-v6": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.0.1.tgz",
"integrity": "sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg=="
},
"node_modules/@aws-solutions-constructs/aws-cloudfront-s3": {
"version": "2.49.0",
"resolved": "https://registry.npmjs.org/@aws-solutions-constructs/aws-cloudfront-s3/-/aws-cloudfront-s3-2.49.0.tgz",
"integrity": "sha512-0VMtl+Ma+aLZo3Nuvq9bTl/Oz9vn5OaPEOELr9pe8kYuoHwGQUGuxXP/xJlQUWbXwR3JCQVcN5k4kdnD5eLXFw==",
"dependencies": {
"@aws-solutions-constructs/core": "2.49.0",
"@aws-solutions-constructs/resources": "2.49.0"
},
"peerDependencies": {
"@aws-solutions-constructs/core": "2.49.0",
"@aws-solutions-constructs/resources": "2.49.0",
"aws-cdk-lib": "^2.118.0",
"constructs": "^10.0.0"
}
},
"node_modules/@aws-solutions-constructs/core": {
"version": "2.49.0",
"resolved": "https://registry.npmjs.org/@aws-solutions-constructs/core/-/core-2.49.0.tgz",
"integrity": "sha512-SZ3CBYF6jVQj0DSNwhksqwz5ohW4w+DlgKiZhrO9gLiW4YcRrxFzwQ7I9FHFUDPZOxsN4NmsuQNj/3s02gycmQ==",
"bundleDependencies": [
"deepmerge",
"npmlog",
"deep-diff"
],
"dependencies": {
"deep-diff": "^1.0.2",
"deepmerge": "^4.0.0",
"npmlog": "^4.1.2"
},
"peerDependencies": {
"aws-cdk-lib": "^2.118.0",
"constructs": "^10.0.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/ansi-regex": {
"version": "2.1.1",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/aproba": {
"version": "1.2.0",
"inBundle": true,
"license": "ISC"
},
"node_modules/@aws-solutions-constructs/core/node_modules/are-we-there-yet": {
"version": "1.1.7",
"inBundle": true,
"license": "ISC",
"dependencies": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/code-point-at": {
"version": "1.1.0",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/console-control-strings": {
"version": "1.1.0",
"inBundle": true,
"license": "ISC"
},
"node_modules/@aws-solutions-constructs/core/node_modules/core-util-is": {
"version": "1.0.3",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/deep-diff": {
"version": "1.0.2",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/deepmerge": {
"version": "4.3.1",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/delegates": {
"version": "1.0.0",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/emoji-regex": {
"version": "8.0.0",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/gauge": {
"version": "2.7.4",
"inBundle": true,
"license": "ISC",
"dependencies": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/has-unicode": {
"version": "2.0.1",
"inBundle": true,
"license": "ISC"
},
"node_modules/@aws-solutions-constructs/core/node_modules/inherits": {
"version": "2.0.4",
"inBundle": true,
"license": "ISC"
},
"node_modules/@aws-solutions-constructs/core/node_modules/is-fullwidth-code-point": {
"version": "1.0.0",
"inBundle": true,
"license": "MIT",
"dependencies": {
"number-is-nan": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/isarray": {
"version": "1.0.0",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/npmlog": {
"version": "4.1.2",
"inBundle": true,
"license": "ISC",
"dependencies": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/number-is-nan": {
"version": "1.0.1",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/object-assign": {
"version": "4.1.1",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/process-nextick-args": {
"version": "2.0.1",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/readable-stream": {
"version": "2.3.8",
"inBundle": true,
"license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/safe-buffer": {
"version": "5.1.2",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/set-blocking": {
"version": "2.0.0",
"inBundle": true,
"license": "ISC"
},
"node_modules/@aws-solutions-constructs/core/node_modules/signal-exit": {
"version": "3.0.7",
"inBundle": true,
"license": "ISC"
},
"node_modules/@aws-solutions-constructs/core/node_modules/string_decoder": {
"version": "1.1.1",
"inBundle": true,
"license": "MIT",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/string-width": {
"version": "1.0.2",
"inBundle": true,
"license": "MIT",
"dependencies": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/strip-ansi": {
"version": "3.0.1",
"inBundle": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^2.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/util-deprecate": {
"version": "1.0.2",
"inBundle": true,
"license": "MIT"
},
"node_modules/@aws-solutions-constructs/core/node_modules/wide-align": {
"version": "1.1.5",
"inBundle": true,
"license": "ISC",
"dependencies": {
"string-width": "^1.0.2 || 2 || 3 || 4"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/wide-align/node_modules/ansi-regex": {
"version": "5.0.1",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/wide-align/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"inBundle": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/wide-align/node_modules/string-width": {
"version": "4.2.3",
"inBundle": true,
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@aws-solutions-constructs/core/node_modules/wide-align/node_modules/strip-ansi": {
"version": "6.0.1",
"inBundle": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/@aws-solutions-constructs/resources": {
"version": "2.49.0",
"resolved": "https://registry.npmjs.org/@aws-solutions-constructs/resources/-/resources-2.49.0.tgz",
"integrity": "sha512-HHx9tTA36plfVxzzQ+qjHCJOo6ikHR+xEqtb1dDBQvgtWo3SnEbWAKBDqNPA6DGn7PoFhxE0zA0ntj7RfFjeLQ==",
"bundleDependencies": [
"@aws-sdk/client-kms",
"@aws-sdk/client-s3",
"aws-sdk-client-mock"
],
"dependencies": {
"@aws-sdk/client-kms": "^3.478.0",
"@aws-sdk/client-s3": "^3.478.0",
"@aws-solutions-constructs/core": "2.49.0",
"aws-sdk-client-mock": "^3.0.0"
},
"peerDependencies": {
"@aws-solutions-constructs/core": "2.49.0",
"aws-cdk-lib": "^2.118.0",
"constructs": "^10.0.0"
}
},
"node_modules/@babel/code-frame": {
"version": "7.22.13",
@ -1313,9 +1620,9 @@
}
},
"node_modules/aws-cdk-lib": {
"version": "2.86.0",
"resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.86.0.tgz",
"integrity": "sha512-76yZ2MawAGXLD3ox4FjhUIPmAMXteGKkeo3tPMthemusDCCkD2X6DBssXBHjB7r9GnrOMMf8JH5BGq2lOZ539g==",
"version": "2.124.0",
"resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.124.0.tgz",
"integrity": "sha512-K/Tey8TMw30GO6UD0qb19CPhBMZhleGshz520ZnbDUJwNfFtejwZOnpmRMOdUP9f4tHc5BrXl1VGsZtXtUaGhg==",
"bundleDependencies": [
"@balena/dockerignore",
"case",
@ -1329,17 +1636,17 @@
"yaml"
],
"dependencies": {
"@aws-cdk/asset-awscli-v1": "^2.2.177",
"@aws-cdk/asset-kubectl-v20": "^2.1.1",
"@aws-cdk/asset-node-proxy-agent-v5": "^2.0.148",
"@aws-cdk/asset-awscli-v1": "^2.2.202",
"@aws-cdk/asset-kubectl-v20": "^2.1.2",
"@aws-cdk/asset-node-proxy-agent-v6": "^2.0.1",
"@balena/dockerignore": "^1.0.2",
"case": "1.6.3",
"fs-extra": "^11.1.1",
"ignore": "^5.2.4",
"fs-extra": "^11.2.0",
"ignore": "^5.3.0",
"jsonschema": "^1.4.1",
"minimatch": "^3.1.2",
"punycode": "^2.3.0",
"semver": "^7.5.1",
"punycode": "^2.3.1",
"semver": "^7.5.4",
"table": "^6.8.1",
"yaml": "1.10.2"
},
@ -1454,7 +1761,7 @@
"license": "MIT"
},
"node_modules/aws-cdk-lib/node_modules/fs-extra": {
"version": "11.1.1",
"version": "11.2.0",
"inBundle": true,
"license": "MIT",
"dependencies": {
@ -1472,7 +1779,7 @@
"license": "ISC"
},
"node_modules/aws-cdk-lib/node_modules/ignore": {
"version": "5.2.4",
"version": "5.3.0",
"inBundle": true,
"license": "MIT",
"engines": {
@ -1539,7 +1846,7 @@
}
},
"node_modules/aws-cdk-lib/node_modules/punycode": {
"version": "2.3.0",
"version": "2.3.1",
"inBundle": true,
"license": "MIT",
"engines": {
@ -1555,7 +1862,7 @@
}
},
"node_modules/aws-cdk-lib/node_modules/semver": {
"version": "7.5.2",
"version": "7.5.4",
"inBundle": true,
"license": "ISC",
"dependencies": {
@ -1624,7 +1931,7 @@
}
},
"node_modules/aws-cdk-lib/node_modules/universalify": {
"version": "2.0.0",
"version": "2.0.1",
"inBundle": true,
"license": "MIT",
"engines": {
@ -2400,6 +2707,15 @@
"node": ">=0.10.0"
}
},
"node_modules/deploy-time-build": {
"version": "0.3.12",
"resolved": "https://registry.npmjs.org/deploy-time-build/-/deploy-time-build-0.3.12.tgz",
"integrity": "sha512-fVyuwB0Nh7mOLYswhHIHv3NOCeTWyNAjzM8cqSBnuhfvRKSdLZUFPnfwlPk1VgvYp9lfrxBZ+eicjWPBrAr53g==",
"peerDependencies": {
"aws-cdk-lib": "^2.38.0",
"constructs": "^10.0.5"
}
},
"node_modules/detect-newline": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",