{"id":8832,"date":"2021-11-08T10:00:09","date_gmt":"2021-11-08T01:00:09","guid":{"rendered":"https:\/\/www.secuavail.com\/kb\/?p=8756"},"modified":"2025-09-25T13:16:13","modified_gmt":"2025-09-25T04:16:13","slug":"tb-211005_02","status":"publish","type":"post","link":"https:\/\/www.secuavail.com\/kb\/tech-blog\/tb-211005_02\/","title":{"rendered":"Linux\u7cfbOS\u306baws cli\u30d0\u30fc\u30b8\u30e7\u30f32\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u5f53\u8a18\u4e8b\u3067\u306f\u3001Linux\u7cfbOS\u306baws cli\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u6b21<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.secuavail.com\/kb\/tech-blog\/tb-211005_02\/#%E6%9B%B4%E6%96%B0%E5%B1%A5%E6%AD%B4\" >\u66f4\u65b0\u5c65\u6b74<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.secuavail.com\/kb\/tech-blog\/tb-211005_02\/#%E6%A6%82%E8%A6%81\" >\u6982\u8981<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.secuavail.com\/kb\/tech-blog\/tb-211005_02\/#%E5%89%8D%E6%8F%90\" >\u524d\u63d0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.secuavail.com\/kb\/tech-blog\/tb-211005_02\/#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\" >\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E6%9B%B4%E6%96%B0%E5%B1%A5%E6%AD%B4\"><\/span>\u66f4\u65b0\u5c65\u6b74<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>2021\/11\/08 \u516c\u958b\u3057\u307e\u3057\u305f\u3002<br \/>\n2025\/09\/25 \u624b\u9806\u3092\u8ffd\u8a18\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E6%A6%82%E8%A6%81\"><\/span>\u6982\u8981<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5f53\u8a18\u4e8b\u3067\u306f\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306eLinux\u7cfbOS\u82e5\u3057\u304f\u306fAmazonlinux\u4ee5\u5916\u306eEC2\u4e0a\u306eLinux\u7cfbOS\u306b\u3066aws cli\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u3092\u8a18\u8f09\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%89%8D%E6%8F%90\"><\/span>\u524d\u63d0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul style=\"list-style-type: disc;\">\n<li>\u5f53\u8a18\u4e8b\u3067\u306fAWS\u4e0a\u306b\u7528\u610f\u3057\u305fRHEL8\u7cfb\u3067\u306e\u624b\u9806\u3068\u306a\u308a\u307e\u3059\u3002<\/li>\n<li>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308baws cli\u306f\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u3082\u306e\u3068\u306a\u308a\u307e\u3059\u3002<\/li>\n<li>\u5f53\u8a18\u4e8b\u306f\u4e0b\u8a18\u30ea\u30f3\u30af\u306e\u8a18\u8f09\u5185\u5bb9\u3092\u53c2\u8003\u306b\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/install-cliv2-linux.html\">https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/install-cliv2-linux.html<\/a><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\"><\/span>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul style=\"list-style-type: disc;\">\n<li>\u7528\u610f\u3057\u305fRHEL8\u7cfb\u306b\u3066aws cli\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u4e8b\u53ca\u3073OS\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\">[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ aws --version\r\n-bash: aws: command not found\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ cat \/etc\/os-release\r\nNAME=\"Red Hat Enterprise Linux\"\r\nVERSION=\"8.4 (Ootpa)\"\r\nID=\"rhel\"\r\nID_LIKE=\"fedora\"\r\nVERSION_ID=\"8.4\"\r\nPLATFORM_ID=\"platform:el8\"\r\nPRETTY_NAME=\"Red Hat Enterprise Linux 8.4 (Ootpa)\"\r\nANSI_COLOR=\"0;31\"\r\nCPE_NAME=\"cpe:\/o:redhat:enterprise_linux:8.4:GA\"\r\nHOME_URL=\"https:\/\/www.redhat.com\/\"\r\nDOCUMENTATION_URL=\"https:\/\/access.redhat.com\/documentation\/red_hat_enterprise_linux\/8\/\"\r\nBUG_REPORT_URL=\"https:\/\/bugzilla.redhat.com\/\"\r\nREDHAT_BUGZILLA_PRODUCT=\"Red Hat Enterprise Linux 8\"\r\nREDHAT_BUGZILLA_PRODUCT_VERSION=8.4\r\nREDHAT_SUPPORT_PRODUCT=\"Red Hat Enterprise Linux\"\r\nREDHAT_SUPPORT_PRODUCT_VERSION=\"8.4\"\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>aws cli\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002unzip\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u4e8b\u524d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\">[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ curl \"https:\/\/awscli.amazonaws.com\/awscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 42.4M  100 42.4M    0     0  55.8M      0 --:--:-- --:--:-- --:--:-- 55.8Mm\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ unzip awscliv2.zip\r\nArchive:  awscliv2.zip\r\n   creating: aws\/\r\n   creating: aws\/dist\/\r\n  inflating: aws\/install\r\n  inflating: aws\/THIRD_PARTY_LICENSES\r\n  inflating: aws\/README.md\r\n\uff5e\u7701\u7565\uff5e\r\n  inflating: aws\/dist\/cryptography-3.3.2-py3.8.egg-info\/LICENSE.APACHE\r\n  inflating: aws\/dist\/cryptography-3.3.2-py3.8.egg-info\/LICENSE\r\n  inflating: aws\/dist\/cryptography-3.3.2-py3.8.egg-info\/METADATA\r\n   creating: aws\/dist\/zlib\/cpython-38-x86_64-linux-gnu\/\r\n  inflating: aws\/dist\/zlib\/cpython-38-x86_64-linux-gnu\/soib.cpython-38-x86_64-linux-gnu.so\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo .\/aws\/install\r\nYou can now run: \/usr\/local\/bin\/aws --version\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\">[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ aws --version\r\naws-cli\/2.2.43 Python\/3.8.8 Linux\/4.18.0-305.el8.x86_64 exe\/x86_64.rhel.8 prompt\/off\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>sudo\u306b\u3066\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default highlight:0 decode:true\">[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo aws --version\r\naws-cli\/2.2.43 Python\/3.8.8 Linux\/4.18.0-305.el8.x86_64 exe\/x86_64.rhel.8 prompt\/off\r\n[ec2-user@ip-xxx-xxx-xxx-xxx ~]$<\/pre>\n<ul style=\"list-style-type: disc;\">\n<li>sudo\u306b\u3066\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u306a\u3044\u5834\u5408\u3001\/etc\/sudoers\u306esecure_path\u306baws\u30b3\u30de\u30f3\u30c9\u306e\u30d1\u30b9\u3092\u8ffd\u8a18\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<p>\u5909\u66f4\u524d<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">[root@ip-xxx-xxx-xxx-xxx ~]# grep secure_path \/etc\/sudoers\r\nDefaults secure_path = \/sbin:\/bin:\/usr\/sbin:\/usr\/bin\r\n[root@ip-xxx-xxx-xxx-xxx ~]#<\/pre>\n<p>\u5909\u66f4\u5f8c<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">[root@ip-xxx-xxx-xxx-xxx ~]# which aws\r\n\/usr\/local\/bin\/aws\r\n[root@ip-xxx-xxx-xxx-xxx ~]# grep secure_path \/etc\/sudoers\r\nDefaults secure_path = \/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin\r\n[root@ip-xxx-xxx-xxx-xxx ~]#<\/pre>\n<p>\u4ee5\u4e0a\u3067\u3001Linux\u7cfbOS\u306baws cli\u30d0\u30fc\u30b8\u30e7\u30f32\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u306f\u7d42\u4e86\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f53\u8a18\u4e8b\u3067\u306f\u3001Linux\u7cfbOS\u306baws cli\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8a18\u8f09\u3057\u307e\u3059\u3002 \u66f4\u65b0\u5c65\u6b74 2021\/11\/08 \u516c\u958b\u3057\u307e\u3057\u305f\u3002 2025\/09\/25 \u624b\u9806\u3092\u8ffd\u8a18\u3057\u307e\u3057\u305f\u3002 \u6982\u8981 \u5f53\u8a18\u4e8b\u3067\u306f\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306eLinux [&hellip;]","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[50,58,2],"tags":[41,9],"class_list":["post-8832","post","type-post","status-publish","format-standard","hentry","category-windows-linux","category-aws-azure","category-tech-blog","tag-aws","tag-linux"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts\/8832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/comments?post=8832"}],"version-history":[{"count":3,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts\/8832\/revisions"}],"predecessor-version":[{"id":18255,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/posts\/8832\/revisions\/18255"}],"wp:attachment":[{"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/media?parent=8832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/categories?post=8832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.secuavail.com\/kb\/wp-json\/wp\/v2\/tags?post=8832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}