Skip to main content

An interactive aws cli experience with the help of fzf

Project description

fzf :heart: aws

unittest lint travis coverage codebuild

package version python version platform Code style: black license

Note: still under development, expect breaking changes and bugs, use it under caution in prod.

fzfaws demo

About

fzfaws is a python utility to interact with aws on the command line through fzf interface. The primary goal of this project is to enhance the aws command line experience by reducing the number of times to travel between the browser and terminal to search for aws-cli commands or even aws arn, id etc just for the sake of copy/pasting them for some simple operations.

fzfaws is still a young project and will continue to develop to support more services. Table below lists some of the high level view of the supported feature, there are advanced flags for each individual operations. For example, EC2 ssh instance support tunnelling and most S3 operations take --version flag to operate on versioned objects. Checkout wiki for detailed commands usage.

Service Support
EC2 ssh instance, start instance, stop instance, terminate instance, reboot instance, list instance/vpc related objects information
S3 upload files/directories, download files/directories, move objects/directories between buckets, update object attributes, delete objects, generate presign url, list objects/buckets information
CloudFormation create stack, update stack, create/execute changeset, detect drift, validate template, delete stack, list stack/resources information
Coming soon ... Coming soon ...

fzfaws is not developed as a replacement tool for aws-cli or any alternatives, it should be used in conjunction with them, hence it will not implement solution for all actions. With that said, feature request are very welcome, I would like to discuss and consider them.

Requirements

System

fzfaws currently only has support for MacOS and Linux systems. For Windows system support, there will need some work to be done on the pyfzf module as well as the ssh_instance module, PR welcome. You could always utilise the docker image of fzfaws on any system, checkout wiki to consult how to use the image.

Python

fzfaws require Python version 3.6+ in order to function properly.

Optional dependencies

  • aws-cli: fzfaws uses aws-cli to perform s3 sync operations, only required if you want to use fzfaws s3 upload --sync.
  • fd: improve local file search speed, fzfaws will use fd over find if fd is installed.

Install

fzfaws comes with fzf binary, it doesn't require fzf to be installed. Main reason is to allow simple download procedure even on remote instances.

pip3 install fzfaws

Usage

Getting started guide and individual service guide are documented in wiki.

  • Getting started
  • Basic usage
  • Customization
  • Docker image

Motivation & Background

fzfaws started off as a sets of bash scripts that I wrote to simplify the way I start/stop/terminate/ssh my ec2 instances. I also implemented s3 functionalities afterwards because I want an easier way to search my bucket. Later on I also decided to cover CloudFormation because I often need to update my IP parameter in some stacks which I don't want to do it in aws console. Since I was learning Python, I decided to give it a go in Python because it can process YAML and JSON much easier. You could find the half bash half Python version in this branch.

As the scripts grow, I decided to make a dedicated project and re-write everything in Python. It was a great help for me to understand more about aws and this project definitely took some impact (mainly ec2, s3, cloudformation) on both my associate level and professional level aws certifications.

This is my first python package and I'm still learning stuff along the way, some code style/implementation might drastically differ from others, I'm trying my best to refactor everything to align.

Testing

fzfaws is fully tested using the unittest module, heavy mocking were implemented to thoroughly test the interaction with aws as well as the fzf processing. Due to the limited data set on my personal aws account, I couldn't really test how fzfaws would perform under extreme data load, please fire up issues if you face any.

Related projects

Credit

  • credit to fzf.
  • credit to boto3.
  • credit to aws-fuzzy-finder for it's fzf-binary usage.
  • credit to this answer for the method to walk s3 folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fzfaws-0.0.4.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fzfaws-0.0.4-py3-none-any.whl (4.6 MB view details)

Uploaded Python 3

File details

Details for the file fzfaws-0.0.4.tar.gz.

File metadata

  • Download URL: fzfaws-0.0.4.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for fzfaws-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ad6e6ce16c1064e85804ccb7b4d14dac4ff4e97f9f351d3a6d8be180df3312f9
MD5 414affb55c26da2079daa9f6eb01d3df
BLAKE2b-256 3a66d3cd37252e04e669fc906562650336a96ad4e39b7210a0d32fce7d84ad20

See more details on using hashes here.

File details

Details for the file fzfaws-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: fzfaws-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for fzfaws-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 46daa1c873852c409cb35850278ff89280c7030f25a2b2b47f457f3d7126479b
MD5 7653c17451fdf94d0908f2d7474d1a8b
BLAKE2b-256 0a6002cdcfda1f9cf42e6d826f1b040841cbb2f6a4ff903f417657bf61be1f6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page