{"id":346760,"date":"2026-02-10T14:39:01","date_gmt":"2026-02-10T14:39:01","guid":{"rendered":"https:\/\/www.wacoca.com\/life\/346760\/"},"modified":"2026-02-10T14:39:01","modified_gmt":"2026-02-10T14:39:01","slug":"%e9%96%89%e5%9f%9f%e7%b6%b2%e3%81%a7-aws-%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%83%ac%e3%82%b9%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3-spa-%e3%82%92%e5%88%a9","status":"publish","type":"post","link":"https:\/\/www.wacoca.com\/life\/346760\/","title":{"rendered":"\u9589\u57df\u7db2\u3067 AWS \u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 (SPA) \u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<div id=\"\">\n<p>\u8fd1\u5e74\u3001\u751f\u6210 AI \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u793e\u5185\u5229\u7528\u306a\u3069\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8981\u4ef6\u304c\u53b3\u3057\u3044\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u4f01\u696d\u3084\u516c\u5171\u6a5f\u95a2\u3067\u3082\u3001\u65b0\u3057\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u6a5f\u4f1a\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002<br \/>\n        <br \/>\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306f\u3001\u4f7f\u3063\u305f\u5206\u3060\u3051\u306e\u5f93\u91cf\u8ab2\u91d1\u3084\u9ad8\u3044\u62e1\u5f35\u6027\u304b\u3089\u3001\u65b0\u898f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u7acb\u3061\u4e0a\u3052\u306b\u9069\u3057\u305f\u9078\u629e\u80a2\u3068\u3057\u3066\u5e83\u304f\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n        <br \/>\u3057\u304b\u3057\u3001\u9589\u57df\u7db2 (\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u975e\u63a5\u7d9a\u74b0\u5883) \u3067 AWS \u306e\u4ee3\u8868\u7684\u306a\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u5229\u7528\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u3044\u304f\u3064\u304b\u306e\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n        <br \/>\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4ee3\u8868\u7684\u306a\u69cb\u6210\u4f8b\u3092\u3082\u3068\u306b\u3001\u3053\u308c\u3089\u306e\u8ab2\u984c\u3068\u305d\u306e\u30ef\u30fc\u30af\u30a2\u30e9\u30a6\u30f3\u30c9 (\u56de\u907f\u7b56) \u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n        <\/p>\n<p>       \u4ee3\u8868\u7684\u306a\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9 SPA \u69cb\u6210\u4f8b<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001<a href=\"https:\/\/aws.amazon.com\/jp\/cognito\/\" rel=\"nofollow noopener\" target=\"_blank\">Amazon Cognito<\/a> \u3092\u4f7f\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u3068\u9759\u7684 Web \u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u3092\u7d44\u307f\u5408\u308f\u305b\u305f SPA (Single Page Application) \u306e\u4f8b\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/10_blog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-164139\" src=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/10_blog.png\" alt=\"\" width=\"1440\" height=\"810\"\/><\/a><\/p>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/cdk\/v2\/guide\/home.html\" rel=\"nofollow noopener\" target=\"_blank\">AWS CDK<\/a> \u3068 React \u3092\u5229\u7528\u3057\u305f\u4e0a\u8a18\u69cb\u6210\u306e\u5b9f\u88c5\u4f8b\u3068\u3057\u3066\u4e0b\u8a18\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3082\u3054\u53c2\u8003\u304f\u3060\u3055\u3044\u3002<br \/>\n        <br \/><a href=\"https:\/\/github.com\/aws-samples\/aws-react-spa-with-cognito-auth\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/github.com\/aws-samples\/aws-react-spa-with-cognito-auth<\/a><\/p>\n<p>\u4e3b\u306a\u69cb\u6210\u8981\u7d20\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306e\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u3084\u30b5\u30a4\u30f3\u30a2\u30c3\u30d7\u753b\u9762\u306e\u5b9f\u88c5\u306b\u304a\u3044\u3066\u3082\u3001React \u3084 Vue \u3068\u3044\u3063\u305f\u4ee3\u8868\u7684\u306a SPA \u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306f <a href=\"https:\/\/ui.docs.amplify.aws\/react\/connected-components\/authenticator\" rel=\"nofollow noopener\" target=\"_blank\">Amplify Component<\/a> \u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u306e\u5b9f\u88c5\u304c\u5bb9\u6613\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>       \u9589\u57df\u7db2\u3067\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 (SPA) \u3092\u6271\u3046\u3068\u304d\u306e\u8ab2\u984c<\/p>\n<p>\u672c\u8a18\u4e8b\u3067\u60f3\u5b9a\u3059\u308b\u9589\u57df\u7db2\u306e\u8981\u4ef6\u4f8b\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>        \u30e6\u30fc\u30b6\u30fc\u7aef\u672b\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u306e\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u304c\u4e0d\u53ef<br \/>\n        <a href=\"https:\/\/aws.amazon.com\/jp\/vpc\/\" rel=\"nofollow noopener\" target=\"_blank\">Amazon VPC<\/a> \u306b<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/vpc\/latest\/userguide\/VPC_Internet_Gateway.html\" rel=\"nofollow noopener\" target=\"_blank\">Internet Gateway<\/a> \u3092\u30a2\u30bf\u30c3\u30c1\u3067\u304d\u306a\u3044<\/p>\n<p>          \u4f8b\u3048\u3070\u3001<a href=\"https:\/\/aws.amazon.com\/jp\/controltower\/\" rel=\"nofollow noopener\" target=\"_blank\">AWS Control Tower<\/a> \u3067\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u9069\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n          <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/controltower\/latest\/controlreference\/data-residency-preventive-controls.html#disallow-vpc-internet-access\" rel=\"nofollow noopener\" target=\"_blank\">Disallow internet access for an Amazon VPC instance managed by a customer<\/a><\/p>\n<p>\u3053\u306e\u8981\u4ef6\u306e\u5834\u5408\u3001\u4ee3\u8868\u7684\u306a SPA \u69cb\u6210\u306b\u304a\u3044\u3066\u6a5f\u80fd\u3057\u306a\u3044\u7b87\u6240\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002SPA \u306b\u304a\u3051\u308b\u901a\u4fe1\u306e\u6d41\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n        <br \/><a href=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/2-network-flow.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-163567\" src=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/2-network-flow.png\" alt=\"\" width=\"828\" height=\"461\"\/><\/a><br \/>\n        <br \/>1. CloudFront \u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\n        <br \/>2. User Pool Endpoint \u304b\u3089 ID\u30c8\u30fc\u30af\u30f3\u3001\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u7b49\u3092\u53d6\u5f97<br \/>\n        <br \/>3. ID Pool Endpoint \u304b\u3089 <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/IAM\/latest\/UserGuide\/id_credentials_temp.html\" rel=\"nofollow noopener\" target=\"_blank\">IAM \u306e\u4e00\u6642\u7684\u306a\u8a8d\u8a3c\u60c5\u5831<\/a> \u3092\u53d6\u5f97<br \/>\n        <br \/>4. API \u306e\u8a8d\u8a3c\u65b9\u6cd5\u306b\u5fdc\u3058\u3066\u3001\u3044\u305a\u308c\u304b\u306e\u8a8d\u8a3c\u60c5\u5831 (ID \u30c8\u30fc\u30af\u30f3\u3001\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3001IAM \u306e\u4e00\u6642\u7684\u306a\u8a8d\u8a3c\u60c5\u5831\u203b) \u3092\u5229\u7528\u3057\u3066 API \u3078\u30a2\u30af\u30bb\u30b9<br \/>\n        <br \/>5. \u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u304b\u3089\u76f4\u63a5\u5229\u7528\u3059\u308b AWS \u30b5\u30fc\u30d3\u30b9\u306e\u5834\u5408\u3001 AWS \u306e\u4e00\u6642\u8a8d\u8a3c\u60c5\u5831\u3092\u4f7f\u3063\u3066\u30a2\u30af\u30bb\u30b9<\/p>\n<p>\u3053\u306e\u69cb\u6210\u3092\u9589\u57df\u7db2\u304b\u3089\u5229\u7528\u3059\u308b\u5834\u5408\u30011. \u3067\u306fCloudFront\u304c\u9589\u57df\u7db2\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u305a\u30012.-3. \u306fAmazon Cognito \u304c PrivateLink \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u7aef\u672b\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002<\/p>\n<p>\u203b\u8a73\u3057\u304f\u306f <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/apigateway\/latest\/developerguide\/apigateway-control-access-to-api.html\" rel=\"nofollow noopener\" target=\"_blank\">API Gateway \u3067 REST API \u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u5fa1\u304a\u3088\u3073\u7ba1\u7406\u3059\u308b <\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>       \u9589\u57df\u7db2\u3067\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u56de\u907f\u7b56<\/p>\n<p>\u9589\u57df\u7db2\u3067\u540c\u69d8\u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u69cb\u6210\u4f8b\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<br \/>\n        <br \/><a href=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/3-closed-architecture.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-163568\" src=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/3-closed-architecture.png\" alt=\"\" width=\"770\" height=\"390\"\/><\/a><\/p>\n<p>       \u9759\u7684 Web \u30db\u30b9\u30c6\u30a3\u30f3\u30b0<\/p>\n<p>\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u914d\u4fe1\u3067\u306f\u30012\u3064\u306e\u65b9\u6cd5\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>       a. Application Load Balancer \u3068 Amazon S3 \u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5<\/p>\n<p><a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/elasticloadbalancing\/latest\/application\/introduction.html\" rel=\"nofollow noopener\" target=\"_blank\">Application Load Balancer<\/a> \u306b\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u3068\u3057\u3066 Amazon S3 \u306e Interface Endpoint \u306e IP \u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001SPA \u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n        <br \/>ALB \u306b <a href=\"https:\/\/aws.amazon.com\/jp\/certificate-manager\/\" rel=\"nofollow noopener\" target=\"_blank\">AWS Certificate Manager<\/a> \u3067\u767a\u884c\u3057\u305f\u8a3c\u660e\u66f8\u3092\u30a2\u30bf\u30c3\u30c1\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30ab\u30b9\u30bf\u30e0\u30c9\u30e1\u30a4\u30f3\u3092\u5229\u7528\u3057\u3064\u3064\u3001HTTPS \u3092\u4f7f\u3063\u305f\u30bb\u30ad\u30e5\u30a2\u306a\u901a\u4fe1\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n        <br \/>\u3053\u306e\u65b9\u6cd5\u3092\u5229\u7528\u3059\u308b\u3068\u3001\u30b3\u30f3\u30c6\u30ca \u3084 <a href=\"https:\/\/aws.amazon.com\/jp\/lambda\/\" rel=\"nofollow noopener\" target=\"_blank\">AWS Lambda<\/a> \u7b49\u306e Compute \u30ea\u30bd\u30fc\u30b9\u3092\u5229\u7528\u305b\u305a\u306b SPA \u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u914d\u4fe1\u3067\u304d\u307e\u3059\u304c\u3001\u3044\u304f\u3064\u304b\u306e\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>        \u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u914d\u7f6e\u3057\u3066\u3042\u308b\u30d1\u30b9 index.html \u4ee5\u5916\u306b\u30a2\u30af\u30bb\u30b9\u3055\u308c\u305f\u969b\u3001\u6b63\u3057\u304f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u304d\u305a\u3001404 \u30a8\u30e9\u30fc\u3068\u306a\u308b\u305f\u3081\u3001SPA\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067 <a href=\"https:\/\/reactrouter.com\/api\/declarative-routers\/HashRouter\" rel=\"nofollow noopener\" target=\"_blank\">HashRouter<\/a> \u7b49\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002URL \u306f https:\/\/example.com\/index.html#home\u306e\u3088\u3046\u306a\u8868\u793a\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n        Amazon S3 \u306e\u30d0\u30b1\u30c3\u30c8\u540d\u3068\u30ab\u30b9\u30bf\u30e0\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u540c\u4e00\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Amazon S3 \u306e\u30d0\u30b1\u30c3\u30c8\u540d\u306f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5185\u306e\u3059\u3079\u3066\u306e AWS \u30ea\u30fc\u30b8\u30e7\u30f3\u306e\u3059\u3079\u3066\u306e AWS \u30a2\u30ab\u30a6\u30f3\u30c8\u5168\u4f53\u3067\u4e00\u610f\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u5229\u7528\u3057\u305f\u3044\u30c9\u30e1\u30a4\u30f3\u540d\u306e\u30d0\u30b1\u30c3\u30c8\u540d\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n        ALB \u306e\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u8a2d\u5b9a\u306b\u5de5\u592b\u304c\u5fc5\u8981\u3067\u3059\u3002\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u6210\u529f\u30b3\u30fc\u30c9\u306b 200 \u4ee5\u5916\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a73\u3057\u304f\u306f <a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/prescriptive-guidance\/latest\/patterns\/set-up-private-access-to-an-amazon-s3-bucket-through-a-vpc-endpoint.html\" rel=\"nofollow noopener\" target=\"_blank\">VPC \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4ecb\u3057\u3066 Amazon S3 \u30d0\u30b1\u30c3\u30c8\u3078\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30a2\u30af\u30bb\u30b9\u3092\u8a2d\u5b9a\u3059\u308b<\/a>\u3084 <a href=\"https:\/\/aws.amazon.com\/jp\/blogs\/news\/hosting-internal-https-static-websites-with-alb-s3-and-privatelink\/\" rel=\"nofollow noopener\" target=\"_blank\">ALB\u3001S3\u3001PrivateLink\u306b\u3088\u308b\u5185\u90e8HTTPS\u9759\u7684\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0<\/a> \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Amazon S3 \u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u4e2d\u7d99\u3059\u308b\u3068\u3044\u3046\u89b3\u70b9\u3067\u540c\u69d8\u306e\u65b9\u6cd5\u3068\u3057\u3066\u3001 Amazon API Gateway \u3068 Amazon S3 \u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3082\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u8a73\u3057\u304f\u306f <a href=\"https:\/\/repost.aws\/ja\/knowledge-center\/api-gateway-s3-website-proxy\" rel=\"nofollow noopener\" target=\"_blank\">Amazon S3 \u3092\u4f7f\u7528\u3057\u3066\u3001API Gateway \u3092\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u9759\u7684\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u30db\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/a> \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>       b. Application Load Balancer \u3068 Fargate \u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5<\/p>\n<p>Amazon ECS \u3068 Fargate \u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u914d\u4fe1\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<br \/>\n        <br \/>\u3053\u306e\u5834\u5408\u3001AWS Fargate \u3067\u52d5\u304f\u30d7\u30ed\u30b0\u30e9\u30e0\u3067index.html\u4ee5\u5916\u306b\u30a2\u30af\u30bb\u30b9\u304c\u3042\u3063\u305f\u5834\u5408\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u5236\u5fa1\u3067\u304d\u308b\u305f\u3081\u3001 <a href=\"https:\/\/reactrouter.com\/api\/declarative-routers\/BrowserRouter\" rel=\"nofollow noopener\" target=\"_blank\">BrowserRouter<\/a> \u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001URL \u306f https:\/\/example.com\/home \u306e\u3088\u3046\u306a\u8868\u793a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u88c5\u4f8b\u306f\u3053\u3061\u3089\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n        <br \/><a href=\"https:\/\/github.com\/aws-samples\/generative-ai-use-cases\/tree\/main\/packages\/cdk\/fargate-s3-server\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/github.com\/aws-samples\/generative-ai-use-cases\/tree\/main\/packages\/cdk\/fargate-s3-server<\/a><\/p>\n<p>       \u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c<br \/>\n       a. Amazon Cognito \u30e6\u30fc\u30b6\u30fc\u30d7\u30fc\u30eb\u3092\u5229\u7528\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c<\/p>\n<p>Amazon Cognito \u3092\u5229\u7528\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u3092\u884c\u3046\u305f\u3081\u306b\u306f cognito-idp.ap-northeast-1.amazonaws.com \u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n        <br \/>\u9589\u57df\u7db2\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u3001<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/apigateway\/latest\/developerguide\/setup-http-integrations.html\" rel=\"nofollow noopener\" target=\"_blank\">API Gateway \u3067\u306e REST API \u306e HTTP \u7d71\u5408<\/a>\u3092\u5229\u7528\u3057\u307e\u3059\u3002HTTP \u7d71\u5408\u3092\u5229\u7528\u3059\u308b\u3068\u7279\u5b9a\u306e HTTP \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u7c21\u5358\u306b Proxy \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n        <br \/>\u306a\u304a\u3001 Amazon API Gateway \u304b\u3089 Amazon Cognito \u306e\u901a\u4fe1\u306f\u3001\u30d1\u30d6\u30ea\u30c3\u30af\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3078\u306e\u901a\u4fe1\u3068\u306a\u308a\u307e\u3059\u304c\u3001\u901a\u4fe1\u306f AWS \u30b0\u30ed\u30fc\u30d0\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u3068\u3069\u307e\u308a\u307e\u3059\u3002\u8a73\u3057\u304f\u306f<a href=\"https:\/\/aws.amazon.com\/jp\/vpc\/faqs\/\" rel=\"nofollow noopener\" target=\"_blank\">\u3088\u304f\u3042\u308b\u8cea\u554f \u2013 Amazon VPC | AWS<\/a> \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n        <br \/>Amazon API Gateway \u3067\u306e\u8a2d\u5b9a\u4f8b\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/4-api-proxy.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-163569\" src=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/4-api-proxy.png\" alt=\"\" width=\"1675\" height=\"711\"\/><\/a><\/p>\n<p>\u3053\u306e\u65b9\u6cd5\u3092\u5229\u7528\u3057\u305f\u5834\u5408\u3067\u3082\u3001\u30d5\u30a7\u30c7\u30ec\u30fc\u30b7\u30e7\u30f3\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3067\u304d\u306a\u3044\u305f\u3081\u3001<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/cognito\/latest\/developerguide\/cognito-user-pools-identity-federation.html\" rel=\"nofollow noopener\" target=\"_blank\">\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u306e ID \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306b\u3088\u308b\u30e6\u30fc\u30b6\u30fc\u30d7\u30fc\u30eb\u306e\u30b5\u30a4\u30f3\u30a4\u30f3<\/a> \u306f\u5b9f\u73fe\u3067\u304d\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>       b. \u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u304b\u3089 AWS \u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9<\/p>\n<p>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u304b\u3089 AWS \u30b5\u30fc\u30d3\u30b9\u306e API \u3092\u76f4\u63a5\u5229\u7528\u3057\u305f\u3044\u5834\u5408 (Amazon Transcribe \u3092\u5229\u7528\u3057\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u66f8\u304d\u8d77\u3053\u3057\u306a\u3069) \u3001IAM \u306e\u4e00\u6642\u7684\u306a\u8a8d\u8a3c\u60c5\u5831\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n        <br \/>Amazon Cognito \u3067\u306f\u3001<a href=\"https:\/\/docs.aws.amazon.com\/ja_jp\/cognito\/latest\/developerguide\/cognito-identity.html\" rel=\"nofollow noopener\" target=\"_blank\">Amazon Cognito \u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\u30d7\u30fc\u30eb<\/a> \u3092\u5229\u7528\u3057\u3066 IAM \u306e\u4e00\u6642\u7684\u306a\u8a8d\u8a3c\u60c5\u5831\u3092\u6255\u3044\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n        <br \/>\u3053\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f cognito-identity.ap-northeast-1.amazonaws.com \u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u5fc5\u8981\u3067\u3059\u3002a. Amazon Cognito \u30e6\u30fc\u30b6\u30fc\u30d7\u30fc\u30eb\u3092\u5229\u7528\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c \u3068\u540c\u69d8\u306b\u3001API Gateway \u306e HTTP \u7d71\u5408\u3092\u5229\u7528\u3059\u308c\u3070\u9589\u57df\u7db2\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b ID Pool \u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>AWS CDK \u3067\u306e\u5b9f\u88c5\u4f8b\u306f\u3053\u3061\u3089\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n        <br \/><a href=\"https:\/\/github.com\/aws-samples\/generative-ai-use-cases\/blob\/main\/packages\/cdk\/lib\/construct\/closedNetwork\/cognito-private-proxy.ts\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/github.com\/aws-samples\/generative-ai-use-cases\/blob\/main\/packages\/cdk\/lib\/construct\/closedNetwork\/cognito-private-proxy.ts<\/a><\/p>\n<p>       c. \u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u5074\u306e\u8a2d\u5b9a<\/p>\n<p>API Gateway \u3092\u4f7f\u3063\u3066\u3001Amazon Cognito \u306e\u305f\u3081\u306e\u72ec\u81ea\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u305f\u5f8c\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3067\u72ec\u81ea\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u5229\u7528\u3059\u308b\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<a href=\"https:\/\/github.com\/aws-amplify\/amplify-js\" rel=\"nofollow noopener\" target=\"_blank\">Amplify JS<\/a> \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3067\u72ec\u81ea\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u5229\u7528\u3059\u308b\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u5074\u306e\u30b3\u30fc\u30c9\u4f8b<\/p>\n<p>Amplify.configure({<br \/>\n    Auth: {<br \/>\n      Cognito: {<br \/>\n        userPoolId: &#8220;USER POOL ID&#8221;,<br \/>\n        userPoolClientId: &#8220;CLIENT ID&#8221;,<br \/>\n        identityPoolId: &#8220;ID POOL ID&#8221;,<br \/>\n        userPoolEndpoint: &#8220;API Gateway Domain for User Pool&#8221;,<br \/>\n        identityPoolEndpoint: &#8220;API Gateway Domain for ID Pool&#8221;,<br \/>\n      },<br \/>\n    }<br \/>\n});<\/p>\n<p>Amplify JS \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f <a href=\"https:\/\/github.com\/aws-amplify\/amplify-js\/releases\/tag\/aws-amplify%406.15.0\" rel=\"nofollow noopener\" target=\"_blank\">aws-amplify@6.15.0<\/a> \u4ee5\u4e0a\u306e\u5fc5\u8981\u304c\u3042\u308b\u70b9\u306b\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>       \u307e\u3068\u3081<\/p>\n<p>\u9589\u57df\u7db2\u3067 AWS \u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9 SPA \u3092\u69cb\u7bc9\u3059\u308b\u969b\u306e\u8ab2\u984c\u3068\u89e3\u6c7a\u7b56\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002Amazon Cognito \u304c PrivateLink \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u70b9\u3084\u3001\u9589\u57df\u7db2\u304b\u3089 CloudFront \u3078\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3068\u3044\u3063\u305f\u5236\u7d04\u306b\u5bfe\u3057\u3001ALB + S3 \u307e\u305f\u306f ALB + Fargate \u306b\u3088\u308b\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u914d\u4fe1\u3001API Gateway \u306e HTTP \u7d71\u5408\u3092\u6d3b\u7528\u3057\u305f Cognito \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u30d7\u30ed\u30ad\u30b7\u5316\u3001Private API \u30e2\u30fc\u30c9\u306e\u6d3b\u7528\u306a\u3069\u306e\u56de\u907f\u7b56\u304c\u6709\u52b9\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u65b9\u6cd5\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8981\u4ef6\u306e\u53b3\u3057\u3044\u74b0\u5883\u3067\u3082\u6700\u65b0\u306e\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u305f SPA \u306e\u958b\u767a\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8457\u8005\u306b\u3064\u3044\u3066<\/p>\n<div class=\"blog-author-box\">\n<div class=\"blog-author-image\">\n          <img decoding=\"async\" loading=\"lazy\" class=\"wp-image-11636 alignleft\" src=\"https:\/\/www.wacoca.com\/life\/wp-content\/uploads\/2026\/02\/yuya-matsumoto-3.png\" alt=\"Photo of author\" width=\"120\" height=\"160\"\/>\n         <\/div>\n<p>         \u677e\u672c \u4f91\u4e5f<\/p>\n<p>\u30a2\u30de\u30be\u30f3 \u30a6\u30a7\u30d6 \u30b5\u30fc\u30d3\u30b9 \u30b8\u30e3\u30d1\u30f3\u5408\u540c\u4f1a\u793e\u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c8\u3002\u30d1\u30d6\u30ea\u30c3\u30af\u30bb\u30af\u30bf\u30fc\u6280\u8853\u7d71\u62ec\u672c\u90e8\u306b\u6240\u5c5e\u3057\u3001\u81ea\u6cbb\u4f53\u306e\u304a\u5ba2\u69d8\u306e\u6280\u8853\u652f\u63f4\u3092\u62c5\u5f53\u3002\u30ac\u30d0\u30e1\u30f3\u30c8\u30af\u30e9\u30a6\u30c9\u306b\u304a\u3051\u308b\u6a19\u6e96\u5316\u5bfe\u8c61\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u306e\u79fb\u884c\u652f\u63f4\u3084\u751f\u6210 AI \u306e\u6d3b\u7528\u652f\u63f4\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u308b\u3002<\/p>\n<\/p><\/div>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd1\u5e74\u3001\u751f\u6210 AI \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u793e\u5185\u5229\u7528\u306a\u3069\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8981\u4ef6\u304c\u53b3\u3057\u3044\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u4f01\u696d\u3084\u516c\u5171\u6a5f\u95a2\u3067\u3082\u3001\u65b0\u3057\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u6a5f\u4f1a\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002 \u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306f\u3001\u4f7f\u3063\u305f\u5206\u3060\u3051\u306e\u5f93\u91cf\u8ab2\u91d1\u3084\u9ad8<\/p>\n","protected":false},"author":2,"featured_media":346761,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0"},"categories":[12],"tags":[1570,3435],"class_list":{"0":"post-346760","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-spa-salon","8":"tag-salon","9":"tag-spa"},"share_on_mastodon":{"url":"https:\/\/wakoka.com\/@life\/116046854106052829","error":""},"_links":{"self":[{"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/posts\/346760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/comments?post=346760"}],"version-history":[{"count":0,"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/posts\/346760\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/media\/346761"}],"wp:attachment":[{"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/media?parent=346760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/categories?post=346760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wacoca.com\/life\/wp-json\/wp\/v2\/tags?post=346760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}