EC2 API Error validating access credential

后端 未结 7 2070
梦谈多话
梦谈多话 2020-12-24 01:12

I installed the ec2 api following the amazon guide. I setted up the access id and secret as environment variable.

Here it is my profile:

expor

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-24 01:35

    I ran into this issue when my system clock was set falsely.

    In my case the clock was running ahead by two hours.

    Equally important is to put the commands in your .bashrc or similar file (.bash_aliases):

    export AWS_ACCESS_KEY="XXXXXXXXXXXXXXXXX"
    export AWS_SECRET_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    

    When there run source ~/.bashrc

    The reason for the importance of this is that when running an ec2 command new shell instances are created that doesn't get the environment variables otherwise.

提交回复
热议问题