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
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
  • 12
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
  • 12
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,183
  • 18
  • 64
  • 111
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…
vishal kumar
  • 1
  • 1
  • 1
-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
  • 949
  • 2
  • 18
  • 29
-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
  • 111
  • 3
-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
  • 265
  • 1
  • 5
  • 12
-1
votes
1 answer

Add the aws access key in multiple servers

I have a requirement to add my AWS access key and secret key in a set of servers (more than 100). I am trying to automate this process. The only way I have now is to create a .aws directory for the user and copy the aws credentials and config file…
Arjun Prasad
  • 173
  • 1
  • 13
-1
votes
2 answers

Error to login ecr docker

I'm trying to login ecr with docker to upload the container, but it always returns an error. The cli configuration is ok. I'm following the documentation that aws provides, but still to no avail. Command login aws ecr get-login-password \ …
-1
votes
1 answer

How to control AWS EC2 live from a web app

We are building some penetration testing stations (both attack & target) for a hackathon in AWS VPC and I need a way to control the following in a live setting: VPN connection access: if someone does something bad, or misbehaves in the forums, we…
BitShift
  • 95
  • 1
  • 6
1 2 3
25
26