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

How can I 'aws s3 sync' two buckets, which are located in different accounts

I'm trying to use 'aws s3 sync' on the awscli between two accounts. Account A, I own. Account B, Owned by a third party. Account B has given a user:jon on account A permission to a bucket through a role:assumeDevOps assumption. Jon assumes…
phisshion
  • 21
  • 1
  • 1
  • 2
2
votes
1 answer

AWS ECS deployment Error using Cross Account

I created a jenkins job runing inside account A that connects using cross accounts IAM roles to account B, where we have a ECS cluster. I manageg to build and upload the docker images from account A jenkins to account B, but when I use: aws ecs…
Gotttlieb
  • 25
  • 5
2
votes
1 answer

AWS S3 synced files transformed into hex files

I used AWS cli to sync my S3 bucket to my computer before deleting the bucket. I did not notice it right after the sync but I now realized that most of my files have been turned into hex files (?). For example, a CSS file I had now looks like: 1f8b…
tripatheea
  • 123
  • 2
2
votes
0 answers

Why is listing EC2 Disks so painful on Windows?

Awhile ago, I answered a question on StackOverflow: (How to) remotely extend a partition using WMI. On my r5d instances I upgraded to in January, this script stopped working. Recently I tracked down the root cause to the fact the PowerShell…
2
votes
1 answer

AWS RDS CLI: DB instances not listed

I've created an IAM user (CLI only) with AmazonRDSReadOnlyAccess permissions. Now every time I try to list my db instances I get an empty JSON object, even though I have one active RDS instance: aws rds describe-db-instances { "DBInstances":…
manifestor
  • 6,079
  • 7
  • 27
  • 39
2
votes
2 answers

User is not authorized to perform: iam:PassRole on resource

I'm attempting to create an eks cluster through the aws cli with the following commands: aws eks create-cluster --name ekCsluster --role-arn arn:aws:iam::111111111111:role/eksServiceRole --resources-vpc-config…
Kurt Mueller
  • 171
  • 2
  • 2
  • 6
2
votes
1 answer

How to change the EBS volume size

I can initiate a spot EC2 instance using the AWS command line tool. aws ec2 request-spot-instances \ --spot-price 0.01 \ --instance-count 1 \ --launch-specification \ "{ \ \"ImageId\":\"ami-009d6802948d06e52\", \ …
shantanuo
  • 3,579
  • 8
  • 49
  • 66
2
votes
1 answer

What is the difference between --query and --filter in aws cli? Which is suggested to be used?

I am starting to pick up aws cli and I just wanted to know the difference between --query and --filter in aws cli? When we should use --query and --filter options?
Shash
  • 123
  • 1
  • 5
2
votes
0 answers

How do i check if an instance is in the terminating state?

This returns InstanceStatuses: aws ec2 describe-instance-status --include-all-instances --instance-ids i-123123123 Which looks like: { "InstanceStatuses": [ { "AvailabilityZone": "us-west-2a", "InstanceId":…
red888
  • 4,183
  • 18
  • 64
  • 111
2
votes
2 answers

Historical stats on capacity shortages in the EC2 spot instance market

Recently I'm getting lots of spot instances terminated with the following message: instance-terminated-no-capacity: Your Spot instance was terminated because there is no Spot capacity available that matches your request When deciding whether to…
conradlee
  • 187
  • 6
2
votes
1 answer

How to check which IAM performed an object modification of an s3 bucket

Is there a way to see which IAM did a modification on a aws s3 bucket object (with versioning enabled)? I know that there is the aws s3api list-object-versions, but it only shows the owner's DisplayName and ID (owner of aws organisation), not the…
dimisjim
  • 235
  • 2
  • 11
2
votes
1 answer

SSM Managed instance using AWS CLI and assume-role

I have a requirement for a non AWS host to perform a scheduled scripted task with an S3 bucket. I have this working as expected with access/secret access keys related to the S3 role. This non AWS host is running centos7 and I have it registered with…
Relish
  • 33
  • 3
2
votes
0 answers

AWS SSM deleting its own files as part of its execution. Any way to safely do it?

Is there a safe way to delete all of an AWS SSM runRemoteScript directory as part of execution? Details below. We've got a very robust AWS SSM setup working involving a python app that polls AWS, grabs the instances you want based on tags, and then…
UtahJarhead
  • 928
  • 7
  • 14
2
votes
0 answers

AWS EB with python 3.6 errors and uses python 2.7

How do I get the aWS EB instance to use the python 3 version that is already installed on the instance? I can't get a new environment running with Python 3.6 running Django 2.1+. Local (not in virtual env): which python ->…
2
votes
1 answer

list-vaults permission on AWS

If I log in into EC2 instance and try to issue the command aws glacier list-vaults --account-id ###### I get an error that the user doesn't have permission, I was able to give the IAM users the right permissions and it works perfectly from the…
Eden
  • 139
  • 3