Score:2

Is there a minimal aws cli installation?

nl flag

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 automated deploy/test, for example all the example files? Or maybe even versions of the cli that only contain a single command, such as s3 or ec2?

Note that the instances are not running in AWS EC2, and I don't have control over the images, or I would use images with the AWS CLI pre-installed. Also note that the services I need to use are S3 and CloudFront.

vn flag
Spin up an instance, install the CLI, and make an AMI of that.
Score:3
id flag
MLu

I don't think so, most of the dependencies are used by most of the AWS CLI commands I'd suspect so installing a trimmed down version won't really help much.

But you can either:

  1. Use an AMI that comes with AWS CLI already installed - e.g. Amazon Linux 2

  2. Create your own AMI with AWS CLI installed and use that as your base image - simply spin up an instance from the image of your choice, install AWS CLI, do Create Image (= creates a new AMI) and use that for your experiments.

  3. Use service-specific tools such as s3cmd or EB CLI that may require fewer dependencies.

Hope that helps :)

Mike Godin avatar
nl flag
I updated my question to note that the instances are not running in AWS, so tools like s3cmd are exactly what I was looking for.
Score:1
vn flag

Assuming you can run a container you could use the AWS CLI version 2 Docker image. After the image is pulled the first time the container launches and runs aws quickly.

Score:1
gp flag
Tim

Have you considered AWS Cloud Shell? It's free, has AWS CLI pre-installed, and after the initial launch I think it opens quite quickly.

Your question doesn't say what you're trying to achieve, just how you're trying to achieve it, so it's difficult to know for sure if this is going to help.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.