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
1
vote
1 answer

How to retrieve binary file from aws secrets manager using aws cli

After uploading a binary secret using something like aws secretsmanager create-secret --name my-file-secret --secret-binary fileb://mysecret.file I'm having trouble retrieving the file using the CLI. How can I do this ?
maximede
  • 121
  • 1
  • 5
1
vote
1 answer

Not able to list all the images

I am trying to list all the images which has the name Ansible*. If i can pull it off, i can use it to clean my AMI's that are created during patching activity. i am trying it via SSM Automation Document. below is the code i have. description: This…
1
vote
1 answer

Is it possible to upload files along with initialization script on EC2 instance when running it with AWS CLI?

I have nginx configuration files which I would like to deploy on my Ubuntu EC2 instance. I create instance using AWS CLI: aws ec2 run-instances --instance-type t2.micro \ --count 1 \ --image-id ami-0f8b8babb98cc66d0 \ --key-name…
vatosarmat
  • 131
  • 4
1
vote
1 answer

Could not resolve host: mirrors.iuscommunity.org

I'm not able to install or update the package on my centos machine . check with vi /etc/sysconfig/network-scripts/ifcfg-lo ONBOOT=yes NAME=loopbac [ec2-user@ip- ~]$ sudo yum update Loaded plugins: langpacks, priorities, update-motd amzn2-core …
1
vote
0 answers

AWS-CLI EC2 AMI :: Get details about owner via OwnerId

Given the OwnerId field returned from an AWS ami query such as: $ aws ec2 describe-images --image-ids ami-015f906ef3e2123c0 --region ap-southeast-2 --query Images[].OwnerId [ "602401143452" ] how can I retrieve some information about who the…
spinkus
  • 188
  • 2
  • 16
1
vote
0 answers

Create custom AMI for Aarch64 with latest Debian and custom Kernel

I am trying to create a custom Debian based AMI with my own custom kernel for AWS EC2 instances, specifically I'm trying to run it on t4g.micro/medium instances. I debootstrap an ARM64 Debian and copy the required /boot/efi/EFI/* contents from an…
1
vote
1 answer

What is the best way to attach instance to auto scaling?

This is my first post so hope I will get the answer. I want to create auto scaling on my existing EC2 instance, so I found this approach so hope someone will tell me is it good ( or suggest me how to make it ) So I open my EC2 dashbord Click on my…
1
vote
1 answer

How to tag launch template _itself_ in AWS with JSON and `create-launch-template` AWS CLI

While creating EC2 launch templates with the create-launch-template AWS CLI ec2 command and a JSON spec, I can't seem to figure out how to tag the template itself. I'm providing the TagSpecifications correctly, because I can see the tags being…
mmuurr
  • 135
  • 1
  • 5
1
vote
1 answer

How to automate the generation of the table schema json for aws dynamodb create-table?

Currently if I run aws dynamodb create-table --generate-cli-skeleton, it will generate a template for me to fill in column definitions etc to create a new dynamodb table. I want to be able to dump the table layout from another dynamodb table and…
Anthony Kong
  • 3,288
  • 11
  • 57
  • 96
1
vote
1 answer

SSH connection getting a Connection timed out in AWS

I have a website hosted in AWS EC2 with the t2.micro instance(Ubuntu 18.04.4). When I tried to connect through Putty or browser-based SSH connection from the AWS console, i am getting a connection timeout error. I tried using the instructions in the…
1
vote
0 answers

How to access a S3 bucket accessible only through a EKS Pod

We've got a S3 bucket we use to store files used by an application deployed on EKS, to access the bucket we have a secret web identity token. The application maintenance guys sometime need to browse the S3 bucket to retrieve files, right now we have…
molok
  • 111
  • 2
1
vote
1 answer

Amazon SES data via AWS S3: Is there a simple way to list and download a folder and get line counts?

I've set up Amazon SES to send a company announcement to a list of about 1,000 contacts. I set up the Kenesis Firehose to log all e-mail events (e.g., Send, Bounce, Click) to a bucket in S3. SES seems to provide tools for bulk analysis of massive…
NewSites
  • 113
  • 3
1
vote
1 answer

Request times out when applying terraform plan on AWS, or describing instances through AWS CLI

I am having an issue accessing the following endpoint from an EC2 instance located in a private subnet. Architecture is the following: VPC Private Subnet 1 (there is a route on 0.0.0.0/0 to Transit Gateway) Private Subnet 2 (there is a route on…
1
vote
1 answer

What is the format of S3 lifecycle configuration?

My Problem An S3 lifecycle configuration changes object storage classes. A typical usage is periodically moving objects to cheaper storage classes after a specified retention period. I am trying to configure the lifecycle JSON input in the CLI, but…
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
1
vote
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…
Jim W
  • 121
  • 6