passing access and secret key aws cli

前端 未结 11 1060
旧巷少年郎
旧巷少年郎 2020-12-24 01:06

I am trying to embed access and secret key along with aws cli. e.g.

aws ec2 describe-instances --aws-access-key  --aws-secret-key 

        
11条回答
  •  被撕碎了的回忆
    2020-12-24 01:24

    Its the best way and more secure to use IAM roles. There you can set specific rights to this instance and what it has to access in your account.

    Depending on what awscli version you use you can use describe-instances in a couple ways.

    Like this one:

    ec2din -O your-key -W your-secret-key --region your-region
    

    Also there is a big difference when you install awscli with pip install or from pkg like ubuntu deb package.

    ec2din is a short command to ec2-describe-instances

    More examples here: ec2-describe-instances

    Regards.

提交回复
热议问题