Skip to content

ptdel/aws-cli-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS CLI Extensions

A collection of plugins that extend the amazon command line utility.

Example Plugin

The provided plugin gives some colorized output listing the current month's CVEs for Amazon Linux 2.

❯ aws cve            
Publishing this month's CVE's for Amazon Linux 2 ...
07-17-2023 | ALAS-2023-2152 (medium): squashfs-tools
07-17-2023 | ALAS-2023-2151 (medium): python-pip
07-17-2023 | ALAS-2023-2150 (medium): python-rsa
07-17-2023 | ALAS-2023-2149 (important): ipa
...

About AWS CLI Plugins

Although it's not very well documented, it's possible to write plugins for the aws cli. This issue provides some details, and this repo led me to having a working plugin.

For most common operations using the aws cli, using an alias is a simpler way to add functionality to the aws cli.

In other more complex scenarios, where low-level access to the client is required, or where some 3rd party is being integrated with, a plugin makes more sense.

Writing a Plugin

  • First, plugins must be importable:
import aws_cli_plugins  # needs to work ...
  • the plugin also needs a method called awscli_initialize which will inject the new commands you're adding into the command table.
  • your command (and subcommands) must inherit from the aws cli's BasicCommand
  • your commands need to implement the _run_main method of BasicCommand

take a look at s3 for a good reference on making subcommands and interacting with the boto session.

About

Various extensions for the AWS CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages