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

366 questions
0
votes
2 answers

Accessing aws cli from a private network

do you know where I can find a comprehensive list of IPs that need to be whitelisted in order to be able to use AWS CLI? The scenario: I have my orchestrator server on an on-prem server without access to the internet, I can access the internet by…
Dan V
  • 119
  • 2
  • 4
0
votes
1 answer

Using multiple users in crontab script, silently fails when changing users

I'm trying to run a bash script on a centos server. I've running the script as the root user (both for file permissions), but I also need to use the aws service permissions that belong to a service account. We have decided not to give the root…
RunThor
  • 197
  • 2
  • 11
0
votes
1 answer

30day archive to S3 bucket with aws cli

I'm trying to automate an archiving function where if a file is older then 30 days and is encrypted it will be moved to S3 to free up disk space on the server. The issue I'm having now is the the aws cli does not include the the directory path. find…
RunThor
  • 197
  • 2
  • 11
0
votes
1 answer

How to name or rename an EIP in AWS?

Somehow, at some point, I created 2 EIPs and gave them names (they have names in the EC2 UI). But now I cannot figure out, or find in the docs, how to name EIPs either when creating them or after creating them - how do you do it (answer can be…
0
votes
1 answer

AWS Windows EC2 unable to join to AWS Managed AD using SSM

I have a windows server that sits in a VPC with no internet access. But it has VPC endpoints to SSM,ec2messages,ssmmessages and ec2 api. When I try to join this to a domain by using the ssm api, aws ssm create-association --instance-id --name…
0
votes
1 answer

aws s3 ls --summarize switch is broken when trying to get the size of a specific prefix in a bucket

Am I stupid or is this command just totally broken or unclear in usage I want to see the size of a specific prefix in a bucket aws s3 ls --summarize --human-readable --recursive 's3://mybucket/myfolder/' OR aws s3 ls 's3://mybucket/myfolder/'…
red888
  • 4,069
  • 16
  • 58
  • 104
0
votes
1 answer

AWS- adding organisation members in a specific OU

We have multiple OU's in our AWS organisation. We use AWS cli to create new AWS organisation members. For eg. aws organizations create-account --email test@example.com --account-name "testaccount" Everytime a new member account is created, it is…
Axel
  • 323
  • 1
  • 6
  • 17
0
votes
2 answers

Bulk delete ec2 snapshots from Jenkins

Use case: Export list of snapshots in txt file (old_snapshots.txt) to S3 bucket. From Jenkins, use aws cp command copy file to Jenkins /tmp/directory --dry-run did not show any error However, when passed the following bash line with aws delete…
Sunny J
  • 607
  • 3
  • 14
-1
votes
3 answers

aws life cycle rules to transition files from s3 bucket to Glacier storage class

I am creating life cycle rules to move files from bucket to the glacier storage class. I was wondering if there is an option to copy files from S3 bucket to Glacier using either CLI or console? I need to maintain a copy of files in S3 bucket and…
-1
votes
1 answer

i am struggling to read aws s3 bucket event log getting error

ClientError: An error occurred (AllAccessDisabled) when calling the GetObject operation: All access to this object has been disabled My code is: s3resource = boto3.resource('s3') my_bucket = s3.Bucket(bucket_name) s3client = boto3.client('s3') for…
-1
votes
1 answer

SSL/TLS support in AWS ELB/NLB with multiple instance ports assigned to Load balancer

AWS NLB does not allow SSL but ELB does. However NLB supports adding multiple instance ports to LB where as ELB does not. Is there way to support multiple ports for LB with SSL transport? For instance I have 4 services running on 2 nodes. Node1…
-1
votes
1 answer

AWS cli: set permission to public only to files inside specific "folders"

So we have 300GB+ of files, in folders like the example above: 1000 file.jpg big/file.jpg medium/file.jpg 2000 file.jpg big/file.jpg medium/file.jpg How to I set permission to allow anyone to read all objects inside "big" and "medium" in…
-1
votes
1 answer

Automatic procedure to collect AWS/EC2 instances for later deletion?

Can you suggest an automatic procedure to collect all AWS/EC2 instances for later deletion of unnecessary ones? Unused (stopped) instances tend to accumulate in companies that use AWS, which wastes money and eventually inhibit the creation of new…
boardrider
  • 889
  • 2
  • 15
  • 26
-1
votes
2 answers

AWS CLI EC2 describe-address with IAM restriction

I'm trying to find a way of listing/describing the public IP (doesn't have to be an EIP) of an EC2 instance. I've read about Describe* and I'm aware of the limitation of not being able to specify the resource in the policy. So my question is: While…
t988GF
  • 101
  • 2
-1
votes
2 answers

How to resurrect an AWS cluster using command line tools that I cannot ssh into?

About two weeks ago I was suddenly unable to ssh into my AWS machines, they just time out. Really, the best information I can get from an ssh -vvv is ssh: connect to host port 22: Connection refused. if the ip address has changed no one…
makansij
  • 255
  • 4
  • 11
1 2 3
24
25