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
3
votes
2 answers

Configure AWS Config to send to one global SNS topic

I'm using CloudCheckr.com, and following recommendations to enable AWS Config in regions where where we currently have no activity. Ideally, I want to setup each region to use the same S3 bucket and SNS topic from the default region (since it's…
Mike Crowe
  • 151
  • 1
  • 5
3
votes
2 answers

aws s3 sync: how to exclude proc, sys directories

I can't seem to get the aws sync s3 command to exclude directories. I am backing up a mounted filesystem from OpenVZ which is located at /vz/root/100. My command is: aws s3 sync /vz/root/100 s3://[mybucket]/vz/root/100 --exclude="proc/*"…
Devon
  • 800
  • 1
  • 9
  • 20
3
votes
2 answers

How to reliably list ephemeral storage of an AWS instance?

How can I list the actual block-device name(s) of ephemeral storage available in my EC2 instance? After some trials and errors, it appears that such devices are connected as /dev/xvdn (and /dev/xvdm if there are two) -- is there some way to reliably…
Mikhail T.
  • 2,338
  • 1
  • 24
  • 55
3
votes
2 answers

Auto-heal an EC2 instance with an Auto Scaling Group?

I'm trying to setup an auto-healing EC2 instance using an Auto Scaling Group and a user-data startup script. If the current server has an issue where it is no longer reachable, the instance should terminate and a new one take its place. This is easy…
James Simpson
  • 1,651
  • 2
  • 15
  • 31
3
votes
1 answer

aws ec2 create-tags with quotes

I can't seem to create a tag on a resource if the value contains a quote. For example: aws ec2 create-tags --resource $someResource --tags 'Key=mykey,Value={"json":"value"}' fails with: Error parsing parameter '--tags': should be: Key value pairs,…
Gary Richardson
  • 1,827
  • 3
  • 20
  • 21
3
votes
2 answers

AWS-CLI - Can't find my config even through it exists

I installed Amazon Command Line Tools (AWS-CLI) using: pip install awscli It installed successfully. I then created a file in this location: /opt/aws/aws_cred.txt [default] aws_access_key_id = XYZ aws_secret_access_key = XYZ region = XYZ Then I…
J.Zil
  • 1,123
  • 3
  • 21
  • 29
3
votes
2 answers

How to *actually* exclude a directory in AWS S3 sync?

The aws s3 sync command has an --exclude flag which lets you exclude a folder from the sync. However, even though the files are not uploaded from that directory, the command still looks at and processes all the files in that folder. The reason I…
DMJ
  • 171
  • 1
  • 6
3
votes
1 answer

pip upgrade downloading every previous version until storage is full

On CentOS 7, I am trying to upgrade awscli: /usr/bin/python3 -m pip install awscli --upgrade --user Why is this downloading every single previous version, until there is finally no space left on device? Requirement already satisfied: awscli…
Nuno
  • 553
  • 2
  • 8
  • 26
3
votes
2 answers

awscli v2 needs sudo to run otherwise get permission denied error ubuntu 20.04.01

I've installed the awscli V2 as per the official AWS instructions here: $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" $ unzip awscliv2.zip $ sudo ./aws/install The installation seems to work OK, except that I…
P Burke
  • 183
  • 3
  • 12
3
votes
1 answer

How to discover the kernel of Amazon AMIs

The AWS documentation says that one can see details of AMIs by running the following: aws ec2 describe-images However, the returned description does not seem to include the kernel version (for Linux images). Is there a way to find out the kernel of…
mitchus
  • 213
  • 1
  • 7
2
votes
1 answer

How do I list the AWS S3 storage classes in a single bucket?

I looked at the AWS Console and I don't see a way to display or list the storage class in a bucket for directories. I can see how to change the storage class, but it doesn't display what it is currently set at. Is there a way to do this through the…
Edward_178118
  • 955
  • 4
  • 15
  • 33
2
votes
3 answers

aws ssm start-session .. AWS-StartPortForwardingSession .. hangs

I am trying to set up port forwarding between my local PC and an AWS EC2 based on the AWS SSM port forwarding article instance like this: aws ssm start-session --target i-0822c9a6c52ca7394 \ --document-name AWS-StartPortForwardingSession…
Jakub Holý
  • 393
  • 1
  • 4
  • 15
2
votes
1 answer

Aws console vpc id does not match aws cli

When I log into my aws console I see the vpc id as "vpc-6856c210" however on my server through the aws cli I see "vpc-82fe07e9" When I try to run a terraform script I get an error if i use 'vpc-6856c210' saying the VPC does not exist. If I run the…
James Connigan
  • 137
  • 2
  • 13
2
votes
0 answers

Can't delete User Pool Domain when Cognito User Pool already deleted

I deployed a CloudFormation template that sets up a Cognito User Pool and an associated User Pool Domain. As there was a misconfiguration in the template a rollback was triggered. The rollback triggered a deletion of the User Pool (successfully) but…
Norman
  • 121
  • 1
  • 4
2
votes
0 answers

Get EC2 price by instanceId

We are building a system for realtime (target delay ~10 min) tracking of cloud infrastructure costs with graphs and notifications. We've started with AWS but also plan to support Azure and GCP. Currently our focus is to track costs of EC2 On-Demand…
grabantot
  • 133
  • 6