{"id":267,"date":"2017-09-08T03:31:26","date_gmt":"2017-09-08T03:31:26","guid":{"rendered":"http:\/\/info.juliusgoh.life\/?p=267"},"modified":"2018-01-09T04:56:45","modified_gmt":"2018-01-09T04:56:45","slug":"aws-cli-credentials-and-configuration-settings","status":"publish","type":"post","link":"https:\/\/info.juliusgoh.life\/?p=267","title":{"rendered":"Aws CLI credentials and configuration settings (Keys)"},"content":{"rendered":"<p>For AWS CLI credentials , there are different ways that aws cli will find for credentials.<br \/>\nBased on <a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-getting-started.html\">this link<\/a>, There are 6 ways in total for now, who knows future there will be more secured way to using CLI.<\/p>\n<p>For this example , i will talk about how to import keys but using the basic ways and after that how to modify and adding more profile to the credentials.<\/p>\n<pre>Setting up two profile 1st is for default and second is another user\r\n\r\n$ aws configure \r\nAWS Access Key ID [None]: YOUR_AWS_ACCESS_KEY_ID\r\nAWS Secret Access Key [None]: YOUR_AWS_SECRET_ACCESS_KEY\r\nDefault region name [None]: us-east-1\r\nDefault output format [None]: text\r\n\r\n$ aws configure --profile user2\r\nAWS Access Key ID [None]: YOUR_AWS_ACCESS_KEY_ID\r\nAWS Secret Access Key [None]: YOUR_AWS_SECRET_ACCESS_KEY\r\nDefault region name [None]: us-east-1\r\nDefault output format [None]: text\r\n<\/pre>\n<p>For output format there are three kind of choice:-<\/p>\n<ul>\n<li>JSON (json)<\/li>\n<li>Tab-delimited text (text)<\/li>\n<li>ASCII-formatted table (table)<\/li>\n<\/ul>\n<p>You can simply change the data such as key&#8217;s and region in files located ~\/.aws\/<br \/>\nYou can just run aws cli with different profile by type <i style='font-style:italic'>&#8211;profile profile2-name<\/i>.Besides, if you would like to constantly used profile2 as your main profile, you can either change it in ~\/.aws\/ or your can export an Enviroment variable like this <i style='font-stlye:italic'>export AWS_PROFILE=profile2-name<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For AWS CLI credentials , there are different ways that aws cli will find for credentials. Based on this link, There are 6 ways in total for now, who knows future there will be more secured way to using CLI. For this example , i will talk about how to import keys but using the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,2],"tags":[],"_links":{"self":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/267"}],"collection":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267"}],"version-history":[{"count":9,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}