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

Add a security group to the list of existing ones to an EC2 using the the AWS CLI (one-liner)

This question is a follow up (not a duplicate) of How to add a security group to a running EC2 Instance?. I believe it deserves to have its own answer rather than a comment. How could I write a one-liner using the AWS CLI to add a security group to…
arod
  • 582
  • 6
  • 19
0
votes
1 answer

Get all AWS resources via cli with some tag

I've set tag Terraform = true to all resources created by Terraform and now I am wondering is it possible to get all AWS resources (VPC, subnets, ec2 etc) via awscli with this tag? How do you manage with such problem?
ipeacocks
  • 321
  • 1
  • 3
  • 10
0
votes
1 answer

VPN Server configuration in Ec2 AWS

I am looking to setup a VPN Server in AWS EC2 instance. I do understand ec2 instances have limited bandwidth according to its instance type. Let assume, I have a t2 medium instance on which VPN Server is configured and running but i want to…
0
votes
1 answer

Get the current VPC from CLI within the EC2 instance

How is it possible to display the current VPC from the CLI within a running Linux (Debian) EC2 instance?
manifestor
  • 6,079
  • 7
  • 27
  • 39
0
votes
0 answers

Removing and restoring an AWS ELB when needed?

I have a fairly common (and functioning) Opsworks stack with an ELB, auto-scaling app servers, and a database. Trouble is, 99% of the time I just need one app server and don't need the ELB, yet I'm still paying for it. I'm looking for an easy way to…
ScottyB
  • 113
  • 3
0
votes
2 answers

How to attach IAM role to an instance via Powershell?

Is there any way to attach IAM role to an existing instance via AWS Tools for Windows PowerShell? I've seen in https://aws.amazon.com/blogs/security/new-attach-an-aws-iam-role-to-an-existing-amazon-ec2-instance-by-using-the-aws-cli/ that aws-cli is…
Shanjohn
  • 66
  • 2
0
votes
1 answer

Download files from S3 without listing

I have a s3 bucket with more than a million files and about a thousand files added each day by various applications into various folders. I would like to download and keep all the files locally as well, on a Linux server. What would be the best way…
Debianuser
  • 421
  • 4
  • 12
  • 29
0
votes
1 answer

AWS ECS: Service + autoscaling vs User Data launching Task

Trying to wrap my head around ECS using EC2 launch (not Fargate, at least for now). Assume a single long-running task that I want to launch with every container instance. The intended mechanism for this appears to be a Service, which will launch as…
sq33G
  • 121
  • 6
0
votes
1 answer

Chef deploy not working on Ubuntu 14.04 looking for credentials

I am using Ubuntu 14.04 chef-solo stack but since today when I am running the deploy script its giving me below error. Please assist. ========== ubuntu@i-production-base:~$ sudo /var/chef/scripts/deploy.rb…
0
votes
0 answers

mariaDB replication stops when creating image in aws

Currently using aws as my db hosting. Instead of using RDS I am using instances to include mariaDB and distribute few instances over different region for replication. Everything works fine but because using instances, aws does not back up…
Dora
  • 341
  • 1
  • 5
  • 15
0
votes
0 answers

Analyzing and understanding a foreign AWS Setup

I was given read only access to a customer's AWS account and asked to understand and get familiar with their architecture. I started off by exploring the different services and the only thing that I could find that was "populated" was the S3…
0
votes
1 answer

How to allow another AWS account to list my AWS IAM roles?

I have an AWS account. Let's say my AWS account number is 123456789012. I have created these IAM roles:…
user35042
  • 2,681
  • 12
  • 34
  • 60
0
votes
1 answer

Name instance tag not applied when calling run-instance JSON in python awscli

i'm experiencing a strange issue with using of AWS CLI tools (awscli python module awscli-1.11.136, awscli-1.11.177). When calling 'run-instances' action with --cli-input-json argument, instance is not Tagged with the Name tag i specify in a call.…
sbocinec
  • 68
  • 5
0
votes
1 answer

How to identify which account a given S3 bucket lives in?

I come across many S3 buckets... is there a way to tell which AWS account a given S3 bucket was created in? I can only think of iterating through each account I have access to, but I don't have keys for many accounts in our portfolio.
AXE Labs
  • 1,549
  • 5
  • 19
  • 24
0
votes
1 answer

Why my AMI doesn't have "Createdate" field?

According to http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html and other docs, "aws ec2 describe-images --image-id ami-XXXX" command should provide AMI creation date as part of the output. But for all my AMIs (created using…