- Más nuevo
- Más votos
- Más comentarios
Hello ddlbc35,
By using internal account i guess you mean "iam user"?
You first have to authenticate. For that you need to create an access key first in the aws console for your iam user. (Keep it secret, since these are static credentials anyone who get's hands on them can do bad things).
https://repost.aws/knowledge-center/create-access-key
Afterwards run aws configure in your cli and configure your access key, secret access key and default region.
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html
Then you should be able to run aws api calls like ec2 describe-instances.
Sincerely Heiko
Thanks Heiko. I ran aws configure at the beginning so that's not the issue. i've also rotated access keys and updated aws configure to ensure that's not the issue but still getting the same result.
Hello,
now I understand.
You actually have an ec2-instance and installed the aws cli there, but requests time out. First of all, it is best practice for ec2 instances to use iam-roles(instance_profiles) instead of static credentials.
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html Although with following you don't even need to attach an iam role anymore: https://docs.aws.amazon.com/systems-manager/latest/userguide/managed-instances-default-host-management.html
Secondly, your api requests time out. Are you able to resolve other resources in the vpc/outside of aws? Is your instance located in a private subnet? If so it could be that your instance can't reach for example the ec2-api and it would require you either a nat gateway located in a public subnet, so that you can reach the public api of ec2, or you need vpc endpoints for ec2 to reach the ec2-api via private aws network.
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 2 años
What output do you get if you use the debug flag? For example:
aws s3 ls --debug
Debug output is much too long to post here and I don't see any obvious errors. I'm using Amazon internal account - is that a factor?
Additional testing provides this error to 'aws ec2 describe-instances --debug': Connection to ec2.us-west-1.amazonaws.com timed out.
If by "Amazon internal account" you mean that you're an employee of Amazon you're asking this question in the wrong forum.