Questions tagged [aws-cli]

aws-cli is the Amazon Web Services Command Line Interface

aws-cli is an open source project that provides a command line interface to the Amazon Web Services APIs.

The project is hosted on GitHub: https://github.com/aws/aws-cli

380 questions
5
votes
2 answers

Can SSH to EC2 But Forgot Account

I have an EC2 micro instance that has been running for years. I can still SSH into it, but I've completely forgotten the email address I used to create it. I had been moving from email to email every year to say in the free tier until amazon made…
5
votes
10 answers

AWS EKS update-kubeconfig does not respect --role-arn flag

Whenever I run the following command with the role that that was used to create the eks cluster... aws eks update-kubeconfig --name eks-cluster --role-arn arn:aws:iam::999999999999:role/eksServiceRole ... I get the following error: An error…
Kurt Mueller
  • 171
  • 2
  • 2
  • 6
5
votes
3 answers

Is it possible to populate an S3 bucket through a CloudFormation template?

I need to store some files for my CF template (GraphQL schema, Lambda source, etc) into an S3 bucket that will also (hopefully) be defined in the same template, as that seems to be the only way outside of dropping the contents directly into the…
5
votes
0 answers

Updating to latest Docker images in Elastic Beanstalk Multicontainer

I'm running a site on Elastic Beanstalk using a multi container set up. I'm wondering what is the preferred strategy to pull in the latest images. On the CI server, after successful commits to master, I'm building the Docker images, send them to…
5
votes
2 answers

get a list of instances on ec2 without termination protection?

I want to get a list of instances on ec2 without termination protection. Before I code something to do this, is there something hidden in the aws cli for this ?
Gil Zellner
  • 183
  • 1
  • 8
5
votes
1 answer

Why can my IAM user create a bucket but not upload to it?

UPDATE: everything works fine the next day!?! So I think the answer might be that you have to wait some period of time, either after creating a new IAM user, or after creating a new bucket, before uploads will work. I created a dedicated IAM user,…
Darren Cook
  • 730
  • 2
  • 9
  • 17
5
votes
1 answer

Is there a command to list AWS instances that results in short output?

I have my AWS CLI set up and can use aws ec2 describe-instances to get the json object returned that describes all the known details of my instances. Is there an easy way to get just a short list, like instance name and instance id? I want to be…
jdelaporte
  • 75
  • 5
5
votes
1 answer

AWS - VPC creation date

Could you possibly let me know how I can check when the VPC has been created? Or how to check in cloudtrail who created vpc via cli? I've tried to use cloudtrail and search in event name for CreateVpc but I was not able to find anything.
netmat
  • 61
  • 2
  • 4
5
votes
2 answers

AWS-CLI - Find ELB by Name tag

I'm trying to find a load balancer that has a Name tag with some value. aws elb describe-load-balancers --query 'LoadBalancerDescriptions[*].LoadBalancerName' I'm iterating over the results and running: aws elb describe-tags \ --load-balancer-names…
Moshe
  • 155
  • 1
  • 7
4
votes
1 answer

how to see logs produced by aws lambda function using aws cli

I have lambda function written in golang. I run it through calling HTTP API gateway. It works fine but I would like to see logs written in stderr which are produced by my golang program. I tried this aws logs describe-log-groups but it shows empty…
Maxim Yefremov
  • 271
  • 1
  • 3
  • 17
4
votes
3 answers

AWS Instance Password lost after Login

As the title suggested I have lost my Linux Instance password. I have already accessed it via putty and it's ppk key. But I don't remember the password of system. Is there any another way to access the system again?
Shreeya
  • 63
  • 1
  • 9
4
votes
3 answers

AWS could not get token: AccessDenied: User: ARN is not authorized to perform: sts:AssumeRole on resource: Role:ARN

I am following the step guide to set up and kubernetes environment on AWS. https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#role-create It already had some gochchas.. and they have been answered…
diyoda_
  • 169
  • 1
  • 2
  • 7
4
votes
4 answers

List all volumes attached to list of instances using aws cli

I am using aws-cli and I need the list of all instance and the volumes associated with them. instance-name,instance-id,volumes-associated describe-instances and describe-volumes are different way to list instances and volumes. But I need a…
drishti ahuja
  • 141
  • 1
  • 1
  • 3
4
votes
0 answers

S3 restoration using s3api get-object is not working in aws china region

I have set up a daily backup script in my aws china instance which uploads my required files to be backed-up to s3 bucket. I have a restoration script which uses s3api to restore the objects to the instances. The command used to get the file is aws…
4
votes
1 answer

AWS CLI Launch Instance Hostname & Elastic IP

Is it possible to do the following with AWS EC2? And if so what is the AWS CLI command for it? Launch an instance and bind an Elastic IP at the same time Change the hostname of an instance that is created with from the AWS…