{"id":25483,"date":"2025-02-17T21:04:40","date_gmt":"2025-02-17T12:04:40","guid":{"rendered":"https:\/\/a5m2.mmatsubara.com\/wp\/?p=25483"},"modified":"2025-02-17T21:57:56","modified_gmt":"2025-02-17T12:57:56","slug":"a5sql-mk-2-%e3%81%a7-aws-%e3%81%ae-secrets-manager-%e3%81%8b%e3%82%89%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6db%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/a5m2.mmatsubara.com\/wp\/?p=25483","title":{"rendered":"A5:SQL Mk-2 \u3067 AWS \u306e Secrets Manager \u304b\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3066DB\u63a5\u7d9a\u3059\u308b"},"content":{"rendered":"\n<p>AWS \u306e\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304b\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3066DB\u306b\u63a5\u7d9a\u3057\u305f\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002AWS\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u8aad\u307f\u53d6\u3063\u3066\u3082\u3088\u3044\u3067\u3059\u304c\u3001\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u3066\u3044\u308b\u3068\u6bce\u56de\u53c2\u7167\u3059\u308b\u306e\u3082\u5927\u5909\u3067\u3059\u3002<\/p>\n\n\n\n<p>A5:SQL Mk-2\u3067\u306f\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3067\u30ef\u30f3\u30bf\u30a4\u30e0\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3066\u3001DB\u63a5\u7d9a\u3059\u308b\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u304b\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3066\u3001DB\u63a5\u7d9a\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3092\u8003\u3048\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3188\" height=\"2177\" src=\"https:\/\/a5m2.mmatsubara.com\/wp\/wp-content\/uploads\/2025\/02\/image-5.png\" alt=\"\" class=\"wp-image-25489\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u6b21\u306e\u3088\u3046\u306a GetPassword.bat \u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>@echo off\n\nrem aws \u30b3\u30de\u30f3\u30c9\u306e\u305f\u3081\u306b\u3001AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY \u3092\u5f15\u6570\u304b\u3089\u53d6\u5f97\nset AWS_ACCESS_KEY_ID=%2\nset AWS_SECRET_ACCESS_KEY=%3\nset AWS_REGION=%4\n\nrem \u53d6\u5f97\u3057\u305f\u3044\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u306e\u540d\u524d\u307e\u305f\u306f ARN\nset SECRET_ID=%1\n\nrem ------------------------------\nrem Secrets Manager \u304b\u3089 password \u3092\u53d6\u5f97\nrem ------------------------------\npowershell -NoProfile -Command ^\n    &quot;(aws secretsmanager get-secret-value --secret-id %SECRET_ID% --query SecretString --output text | ConvertFrom-Json).password&quot;\n<\/code><\/pre><\/div>\n\n\n\n<p>aws\u30b3\u30de\u30f3\u30c9\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002aws\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001AWS\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u30fbAWS\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u30fbAWS\u30ea\u30fc\u30b8\u30e7\u30f3\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<br>\u3053\u306e\u305f\u3081\u5f15\u6570\u3068\u3057\u3066\u3001\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u540d\u30fbAWS\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u30fbAWS\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u30fbAWS\u30ea\u30fc\u30b8\u30e7\u30f3 \u3092\u6e21\u3057\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5b9f\u884c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<br>(AWS\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u30fbAWS\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc \u306f\u30de\u30b9\u30af\u3057\u3066\u3044\u307e\u3059\u3002)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2790\" height=\"1448\" src=\"https:\/\/a5m2.mmatsubara.com\/wp\/wp-content\/uploads\/2025\/02\/image-2.png\" alt=\"\" class=\"wp-image-25486\"\/><\/figure>\n\n\n\n<p>A5:SQL Mk-2 \u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u767b\u9332\u753b\u9762\u306e\u300c\u305d\u306e\u4ed6\u300d\u30bf\u30d6\u3067\u300c\u30ef\u30f3\u30bf\u30a4\u30e0\u30d1\u30b9\u30ef\u30fc\u30c9\u751f\u6210\u30b3\u30de\u30f3\u30c9\u300d\u306e\u6b04\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2326\" height=\"1087\" src=\"https:\/\/a5m2.mmatsubara.com\/wp\/wp-content\/uploads\/2025\/02\/image-3.png\" alt=\"\" class=\"wp-image-25487\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u30ef\u30f3\u30bf\u30a4\u30e0\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u4f8b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>C:\\\u2026\\GetPassword.bat &lt;\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u540d&gt; &lt;AWS\u30a2\u30af\u30bb\u30b9\u30ad\u30fc&gt; &lt;AWS\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc&gt; &lt;AWS\u30ea\u30fc\u30b8\u30e7\u30f3&gt;<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>A5:SQL Mk-2\u306e\u30ed\u30b0\u30a4\u30f3\u6642\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u7a7a\u306e\u307e\u307e\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"372\" src=\"https:\/\/a5m2.mmatsubara.com\/wp\/wp-content\/uploads\/2025\/02\/image-4.png\" alt=\"\" class=\"wp-image-25488\"\/><\/figure>\n\n\n\n<p>\u4ee5\u4e0a\u3067\u63a5\u7d9a\u3059\u308b\u3068\u3001GetPassword.bat \u304c\u5b9f\u884c\u3055\u308c\u3001\u305d\u306e\u5b9f\u884c\u7d50\u679c(\u6a19\u6e96\u51fa\u529b)\u3092\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u3057\u3066DB\u306b\u63a5\u7d9a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001AWS\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u30fbAWS\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u3092\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306e\u5f15\u6570\u3068\u3057\u3066\u6e21\u3057\u3066\u3044\u307e\u3059\u304c\u3001OS\u306e\u74b0\u5883\u5909\u6570\u3068\u3057\u3066\u3042\u3089\u304b\u3058\u3081\u8a2d\u5b9a\u3059\u308b\u30fb\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u306b\u57cb\u3081\u8fbc\u3080\u306a\u3069\u4f7f\u3044\u3084\u3059\u3044\u3088\u3046\u306b\u6539\u9020\u3057\u3066\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS \u306e\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304b\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3066DB\u306b\u63a5\u7d9a\u3057\u305f\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002AWS\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u8aad\u307f\u53d6\u3063\u3066\u3082\u3088\u3044\u3067\u3059\u304c\u3001\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u3066\u3044\u308b\u3068\u6bce\u56de\u53c2\u7167\u3059\u308b\u306e\u3082\u5927\u5909\u3067\u3059\u3002 A5:SQL Mk- &hellip; <a href=\"https:\/\/a5m2.mmatsubara.com\/wp\/?p=25483\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25483","post","type-post","status-publish","format-standard","hentry","category-1"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/25483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25483"}],"version-history":[{"count":5,"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/25483\/revisions"}],"predecessor-version":[{"id":25492,"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/25483\/revisions\/25492"}],"wp:attachment":[{"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a5m2.mmatsubara.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}