{"id":453,"date":"2015-10-27T01:50:00","date_gmt":"2015-10-27T01:50:00","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2015\/10\/27\/setup-aws-credentails-using-aws-command-line-interface\/"},"modified":"2021-11-19T06:32:51","modified_gmt":"2021-11-19T06:32:51","slug":"setup-aws-credentials-using-aws-command-line-interface","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/setup-aws-credentials-using-aws-command-line-interface\/","title":{"rendered":"How to Setup AWS Credentials using AWS Command Line Interface?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3103 size-full\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/10\/setup-aws-credentails-using.png\" alt=\"setup-aws-credentials-using-aws-command\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2015\/10\/setup-aws-credentails-using.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2015\/10\/setup-aws-credentails-using-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Setup AWS Credentails using AWS Command Line Interface<\/strong><\/p>\n<p><strong>Install the AWS CLI Using Pip<\/strong><br>\nPlease<strong> <a href=\"http:\/\/www.devopsschool.com\/tutorial\/aws\/how-to-do\/install-and-configure-aws-cli.html\">click here<\/a> <\/strong>complete installation guide.<\/p>\n<p><strong>Test the AWS CLI Installation<\/strong><\/p>\n<p>[code] $ aws help[\/code]<\/p>\n<p><strong>Environment Variables &#8211;&nbsp;<\/strong><\/p>\n<ul>\n<li>AWS_ACCESS_KEY_ID<\/li>\n<li>AWS_SECRET_ACCESS_KEY<\/li>\n<\/ul>\n<p><strong>Step 5: Get a key aws_access_key_id, aws_secret_access_key, region from AWS website, under your&nbsp;<\/strong><\/p>\n<p>[code]$ aws configure[\/code]<\/p>\n<p><strong>Step 6: Setup AWS with key<\/strong><\/p>\n<p>[code]$ aws configure<br>\nAWS Access Key ID [None]: AKIAJB6WCXXXXRKRT5SQ<br>\nAWS Secret Access Key [None]: fDBVPhlHzMk70ip5FGHDl\/AcmEyMnylwOllc+n4s<br>\nDefault region name [None]: us-east-1<br>\nDefault output format [None]:<br>\n$ aws s3 list[\/code]<\/p>\n<p><strong>Step 7: Verify details in ~\/.aws\/credentials and ~\/.aws\/config<\/strong><\/p>\n<p>[code]$ more ~\/.aws\/credentials<br>\n[default]<br>\naws_access_key_id = AKIAJB6WCXXXXRKRT5SQ<br>\naws_secret_access_key = fDBVPhlHzMk70ip5FGHDl\/AcmEyMnylwOllc+n4s<\/p>\n<p>$ more ~\/.aws\/config<br>\n[default]<br>\nregion = us-east-1[\/code]<\/p>\n<p><strong>Step 8: Verify AWS CLI setup<\/strong><\/p>\n<p>[code]$ aws ec2 describe-instances &#8211;output table &#8211;region us-west-2[\/code]<\/p>\n<p><strong>The AWS credentials file &#8211;<\/strong><\/p>\n<p>Located at ~\/.aws\/credentials on Linux, OS X, or Unix, or at C:\\Users\\USERNAME \\.aws\\credentials on Windows. This file can contain multiple named profiles in addition to a default profile.<\/p>\n<p><strong>The CLI configuration file &#8211;<\/strong><\/p>\n<p>Typically located at ~\/.aws\/config on Linux, OS X, or Unix, or at C:\\Users\\USERNAME \\.aws\\config on Windows. This file can contain a default profile, named profiles, and CLI specific configuration parameters for each.<\/p>\n<p><strong>Reference<\/strong><br>\n<a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/installing.html\" target=\"_blank\" rel=\"noopener\">http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/installing.html<\/a><br>\n<a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-getting-started.html\" target=\"_blank\" rel=\"noopener\">http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-getting-started.html<\/a><br>\n<a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-getting-started.html\" target=\"_blank\" rel=\"noopener\">http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-getting-started.html<\/a><\/p>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_91005\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_57680\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_91005\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Setup AWS Credentails using AWS Command Line Interface Install the AWS CLI Using Pip Please click here complete installation guide. Test the AWS CLI Installation [code] $ aws help[\/code] Environment Variables &#8211;&nbsp; AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY Step 5: Get a key aws_access_key_id, aws_secret_access_key, region from AWS website, under your&nbsp; [code]$ aws configure[\/code] Step 6: Setup AWS with&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3103,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[5633],"tags":[944,162,1392,1389,1394,1393,333,1390,1122,545,593,230,1391,732,104],"class_list":["post-453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","tag-amazon-aws","tag-aws","tag-aws-cli","tag-aws-credentials","tag-aws-guide","tag-aws-tutorials","tag-command","tag-command-line-interface","tag-guide","tag-how","tag-process","tag-setup","tag-setup-aws-credentials","tag-steps","tag-tutorials"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=453"}],"version-history":[{"count":7,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/453\/revisions"}],"predecessor-version":[{"id":25795,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/453\/revisions\/25795"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3103"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}