How to edit AWS Credentials in terminal?












1















What is the command to edit secret key in aws configure in terminal?










share|improve this question





























    1















    What is the command to edit secret key in aws configure in terminal?










    share|improve this question



























      1












      1








      1








      What is the command to edit secret key in aws configure in terminal?










      share|improve this question
















      What is the command to edit secret key in aws configure in terminal?







      amazon-web-services terminal command-line-interface






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 17 '18 at 21:43









      matsev

      18.6k874107




      18.6k874107










      asked Nov 17 '18 at 20:36









      RustyShacklefordRustyShackleford

      1,133621




      1,133621
























          2 Answers
          2






          active

          oldest

          votes


















          3














          Just type aws configure again (or aws configure --profile <profile_name> to edit a specific profile). If you just confirm the suggested value by hitting enter, it will remain unchanged.





          or



          Change just the aws_secret_access_key by typing



          $ aws configure set aws_secret_access_key <secret_key>





          or



          You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive. The aws_access_key_id and the aws_secret_access_key are stored in the ~/.aws/credentials file by default. You can use any editor to edit them, such as vim, emacs, or nano, e.g.



          $ nano ~/.aws/credentials


          Additionally, you can have credentials for many different AWS accounts in the same credentials file by using profiles. As a result, if you have one development account and one production account, the content of the file may look like



          [development]
          aws_access_key_id = <key id of dev account>
          aws_secret_access_key = <secret access key of dev account>

          [production]
          aws_access_key_id = <key id of prod account>
          aws_secret_access_key = <secret access key of prod account>


          (naturally, you need to replace <key id of dev account>, <secret access key of dev account>, etc with the actual IAM credentials for each account respectively)



          Ref: AWS CLI Configuration Variable






          share|improve this answer

































            0














            aws configure set aws_secret_access_key <secret_key>


            Docs






            share|improve this answer
























            • I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

              – RustyShackleford
              Nov 17 '18 at 20:41











            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53355333%2fhow-to-edit-aws-credentials-in-terminal%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Just type aws configure again (or aws configure --profile <profile_name> to edit a specific profile). If you just confirm the suggested value by hitting enter, it will remain unchanged.





            or



            Change just the aws_secret_access_key by typing



            $ aws configure set aws_secret_access_key <secret_key>





            or



            You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive. The aws_access_key_id and the aws_secret_access_key are stored in the ~/.aws/credentials file by default. You can use any editor to edit them, such as vim, emacs, or nano, e.g.



            $ nano ~/.aws/credentials


            Additionally, you can have credentials for many different AWS accounts in the same credentials file by using profiles. As a result, if you have one development account and one production account, the content of the file may look like



            [development]
            aws_access_key_id = <key id of dev account>
            aws_secret_access_key = <secret access key of dev account>

            [production]
            aws_access_key_id = <key id of prod account>
            aws_secret_access_key = <secret access key of prod account>


            (naturally, you need to replace <key id of dev account>, <secret access key of dev account>, etc with the actual IAM credentials for each account respectively)



            Ref: AWS CLI Configuration Variable






            share|improve this answer






























              3














              Just type aws configure again (or aws configure --profile <profile_name> to edit a specific profile). If you just confirm the suggested value by hitting enter, it will remain unchanged.





              or



              Change just the aws_secret_access_key by typing



              $ aws configure set aws_secret_access_key <secret_key>





              or



              You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive. The aws_access_key_id and the aws_secret_access_key are stored in the ~/.aws/credentials file by default. You can use any editor to edit them, such as vim, emacs, or nano, e.g.



              $ nano ~/.aws/credentials


              Additionally, you can have credentials for many different AWS accounts in the same credentials file by using profiles. As a result, if you have one development account and one production account, the content of the file may look like



              [development]
              aws_access_key_id = <key id of dev account>
              aws_secret_access_key = <secret access key of dev account>

              [production]
              aws_access_key_id = <key id of prod account>
              aws_secret_access_key = <secret access key of prod account>


              (naturally, you need to replace <key id of dev account>, <secret access key of dev account>, etc with the actual IAM credentials for each account respectively)



              Ref: AWS CLI Configuration Variable






              share|improve this answer




























                3












                3








                3







                Just type aws configure again (or aws configure --profile <profile_name> to edit a specific profile). If you just confirm the suggested value by hitting enter, it will remain unchanged.





                or



                Change just the aws_secret_access_key by typing



                $ aws configure set aws_secret_access_key <secret_key>





                or



                You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive. The aws_access_key_id and the aws_secret_access_key are stored in the ~/.aws/credentials file by default. You can use any editor to edit them, such as vim, emacs, or nano, e.g.



                $ nano ~/.aws/credentials


                Additionally, you can have credentials for many different AWS accounts in the same credentials file by using profiles. As a result, if you have one development account and one production account, the content of the file may look like



                [development]
                aws_access_key_id = <key id of dev account>
                aws_secret_access_key = <secret access key of dev account>

                [production]
                aws_access_key_id = <key id of prod account>
                aws_secret_access_key = <secret access key of prod account>


                (naturally, you need to replace <key id of dev account>, <secret access key of dev account>, etc with the actual IAM credentials for each account respectively)



                Ref: AWS CLI Configuration Variable






                share|improve this answer















                Just type aws configure again (or aws configure --profile <profile_name> to edit a specific profile). If you just confirm the suggested value by hitting enter, it will remain unchanged.





                or



                Change just the aws_secret_access_key by typing



                $ aws configure set aws_secret_access_key <secret_key>





                or



                You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive. The aws_access_key_id and the aws_secret_access_key are stored in the ~/.aws/credentials file by default. You can use any editor to edit them, such as vim, emacs, or nano, e.g.



                $ nano ~/.aws/credentials


                Additionally, you can have credentials for many different AWS accounts in the same credentials file by using profiles. As a result, if you have one development account and one production account, the content of the file may look like



                [development]
                aws_access_key_id = <key id of dev account>
                aws_secret_access_key = <secret access key of dev account>

                [production]
                aws_access_key_id = <key id of prod account>
                aws_secret_access_key = <secret access key of prod account>


                (naturally, you need to replace <key id of dev account>, <secret access key of dev account>, etc with the actual IAM credentials for each account respectively)



                Ref: AWS CLI Configuration Variable







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 18 '18 at 6:41

























                answered Nov 17 '18 at 21:34









                matsevmatsev

                18.6k874107




                18.6k874107

























                    0














                    aws configure set aws_secret_access_key <secret_key>


                    Docs






                    share|improve this answer
























                    • I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

                      – RustyShackleford
                      Nov 17 '18 at 20:41
















                    0














                    aws configure set aws_secret_access_key <secret_key>


                    Docs






                    share|improve this answer
























                    • I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

                      – RustyShackleford
                      Nov 17 '18 at 20:41














                    0












                    0








                    0







                    aws configure set aws_secret_access_key <secret_key>


                    Docs






                    share|improve this answer













                    aws configure set aws_secret_access_key <secret_key>


                    Docs







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 17 '18 at 20:40









                    wiomocwiomoc

                    429211




                    429211













                    • I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

                      – RustyShackleford
                      Nov 17 '18 at 20:41



















                    • I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

                      – RustyShackleford
                      Nov 17 '18 at 20:41

















                    I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

                    – RustyShackleford
                    Nov 17 '18 at 20:41





                    I have the key already set in aws configure, I need to access it again. Is there anyway I can open the configure file in terminal to see the values?

                    – RustyShackleford
                    Nov 17 '18 at 20:41


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53355333%2fhow-to-edit-aws-credentials-in-terminal%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to pass form data using jquery Ajax to insert data in database?

                    National Museum of Racing and Hall of Fame

                    Guess what letter conforming each word