Skip to main content

fzf :heart: aws

Test Lint Travis Coverage AWS CodeBuild

Package version Python version Platform Code Lint: pyright Code Style: black License

Note: still under development, may have breaking changes and bugs, use it under caution.

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. It should theoretically support Windows WSL, if you are getting error message please let me know.

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.

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 positive impact (mainly ec2, s3, cloudformation) on my aws certification exams.

It's more of a learning project for me, it is also 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.

Leave a star :)

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

  • aws-fuzzy-finder: A clean and well written project focus on ssh into EC2 instance.

Credit

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

Release files for fzfaws 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fzfaws 0.1.1
File Size Uploaded
fzfaws-0.1.1.tar.gz 4.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for fzfaws 0.1.1
File Interpreter ABI Platform
fzfaws-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 MB

Release files / fzfaws-0.1.1.tar.gz

Download URL fzfaws-0.1.1.tar.gz
Size 4.6 MB
Tags Source
SHA-256 checksum
How to use checksums
ef9273aa08ac187102d220b8ce81dcffc8a0810b2309383eae9d1752d0db0ec8
BLAKE2b-256 checksum
How to use checksums
ce1b7c6666d15139d72f4637295ce6a503801121717b763e0b9e2ea2e2957360
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

Release files / fzfaws-0.1.1-py3-none-any.whl

Download URL fzfaws-0.1.1-py3-none-any.whl
Size 4.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
294c93ad6eb9895cb08cc435e91b33adc7bd20d2c49b1e11622372d7454da877
BLAKE2b-256 checksum
How to use checksums
708d0d5d27956ca82cb8d1c2e15bd686cfb36bc2afa5f9815d30550a9e4ee731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page