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

Problems using EC2 command line tools on one of the instances

I'm having a bit of a problem with EC2 API tools timing out on a new instance I created. Yesterday I took an image of a server on which the tools worked fine. I made some changes to the software it runs, and init scripts, which I needed to support…
Kasia Gogolek
  • 155
  • 1
  • 7
2
votes
2 answers

Can't use execute-command --interactive in AWS CLI session manager

I'm trying to use the AWS cli + session manager plugin to get into a database container to run some migrations, and I am struggling to get it working. I'm trying to use the following command: aws ecs execute-command --cluster {cluster} --task…
HDuck
  • 123
  • 4
2
votes
3 answers

Is there a minimal aws cli installation?

Sometimes I'd like to spin up an instance and run an aws cli command on it quickly, but there seems to be a great delay in installing the aws cli. Is there any way to get a "minimal" installation that omits the many files unnecessary in an…
Mike Godin
  • 143
  • 7
2
votes
1 answer

How can I search across CloudWatch log groups on AWS?

I have a number of lambda functions which run my serverless backend. Something somewhere is misbehaving, and I need to bring up/search all the logs from a particular time — from all log groups, not just a single one, or a single stream. Is there a…
2
votes
1 answer

Schedule RDS upgrades/downgrades

I have a project that sends notifications to various services. Users manage their subscriptions 24 hours a day, but we need a stronger MySQL RDS instance during the week (t3.xlarge), specifically Tue-Thu because that's when most of our…
Ben
  • 3,800
  • 18
  • 65
  • 96
2
votes
1 answer

AWS Cloudformation Template error: every Ref object must have a single String value

SNSTopic Type: 'AWS::SNS'...... SNSTopic2 Type: 'AWS::SNS'....... EventRule: Type: 'AWS::Events::Rule' Properties: Name: !Ref EventRuleName Description: State: ENABLED EventPattern: ' { }' …
2
votes
4 answers

How to post logs to Cloudwatch with CLI?

Im tring to create a bash script that checks the status of the website, Im using this command: This one to create the logstream aws logs create-log-stream --log-group-name "WebsiteStatusMessage" --log-stream-name $timestamp This other one to post…
2
votes
1 answer

How to find out the endpoint url of a node of a redis cluster via aws cli 'elasticache describe-cache-clusters'?

If I run aws elasticache describe-cache-clusters I will get results like this: { "CacheClusterId": "dev-001", "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", …
Anthony Kong
  • 3,288
  • 11
  • 57
  • 96
2
votes
1 answer

Using the AWS CLI tool for s3 sync -- how can I specify the storage tier?

I'm using the AWS CLI to use Amazon's S3 storage for backing up files: aws s3 sync /backup-these-files s3://my-backup How can I specify the x-amz-storage-class header, to tell it to put these files into the STANDARD-IA storage tier? I can't figure…
Eric
  • 1,127
  • 3
  • 13
  • 24
2
votes
1 answer

S3 PUT directly to glacier

This AWS post from 2018 makes it sound like it should be possible to make S3 style PUT requests to create archives in glacier now: I'm interpreting that to mean that you could use the s3 CLI or sdk interactions for uploading files, rather than the…
Ben Pennell
  • 123
  • 1
  • 4
2
votes
1 answer

AWS cli filter not applied

I want to receive some values from an AWS SecurityGroup and am using the following command: aws ec2 describe-security-groups --group-ids $GROUP \ --filters 'Name=ip-permission.from-port,Values=22 Name=ip-permission.to-port,Values=22' \ --query…
Carsten
  • 123
  • 4
1
vote
1 answer

Using aws cli sync include and exclude with delete option

aws s3 sync /WordProcessing/DOCUMENTS s3://mybigbucket --delete --include "*" --exclude ".DS_Store" If somehow .DS_Store made its way to the AWS S3 mybigbucket (from a previous backup), using the above command does not delete the .DS_Store files…
Edward_178118
  • 955
  • 4
  • 15
  • 33
1
vote
1 answer

Is it possible to force update of Route53 DNS resolver cache in AWS when IP changes?

I have several VPC's set up in AWS, and all of my instances use provisioned IP addresses, that is - not using Elastic IP Addresses. When any given instance boots up, it executes a script on the machine (post networking), which gets the Instance ID,…
1
vote
1 answer

Environment credentials are ignored by "aws ec2 describe-customer-gateways"

So I'm trying to list the customer gateways in an account using AWS CLI. The problem is that I can only get it to work with credentials from a profile, not from environment variables. I know I must be missing something simple here, but I can't for…
mhvelplund
  • 97
  • 2
  • 12
1
vote
3 answers

How to log into new EC2 instance

Trying to connect using CentOS7 I deployed a couple of EC2 instances using terraform and now and trying to log in. aws2 ec2-instance-connect send-ssh-public-key --instance-id i-0788274a4861154d44 --availability-zone us-east-2 --instance-os-user…
James Connigan
  • 137
  • 2
  • 13