0

I want to extend commands for aws-cli it is possible, I mean aws-cli has some library to extend some functionality, it hasn't? For example, I want to obtain the size in MB of my files in the bucketmio, May I could create some extension for that, e.g

aws s3 bucketmio get-size-all-files

get-size-all-files is the new extension that I want.

Thanks.

1 Answer 1

1

Yes, you can Create and use AWS CLI aliases, which are "shortcuts you can create in the AWS Command Line Interface (AWS CLI) to shorten commands or scripts that you frequently use. You create aliases in the alias file located in your configuration folder."

Here is an example that sends a message via Amazon SNS:

textalert =
  !f() {
    aws sns publish --message "${1}" --phone-number ${2}
  }; f

You can write shell script that calls the AWS CLI but also adds additional logic around those calls.

Sign up to request clarification or add additional context in comments.

3 Comments

But, Could I made my own script to do something else?
You can write a script. The script can do whatever you program the script to do.
Thanks, I'll do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.