Git Product home page Git Product logo

aws.el's Introduction

aws.el

Build Status

Emacs major modes wrapping the AWS CLI.

aws.el is a magit style interface to the AWS command line client. It makes heavy use of of the transient package and tabulated-list-mode to make the AWS command line interface as discoverable, easy and fast to navigate as possible.

Install

This is a free time projects of mine, which is still in the very beginning and I currently add functionality as I see use cases for it in my day to day life. Therefore I don't want to add it to a package repository like melpa yet, because I see it as pre-alpha software at the moment.

However you could either use straight.el or directly clone it from Github and load it via use-package like I do:

(use-package aws-mode
  :bind ;; some functions which make sense to bind to something
  ("C-c a a" . aws)
  ("C-c a l" . aws-login)
  ("C-c a n" . aws-organizations-get-account-name)
  ("C-c a i" . aws-organizations-get-account-id)
  :load-path "~/.emacs.d/packages/awscli"
  :custom
  (aws-vault t) ;; when t use aws-vault cmd to get into aws session
  (aws-output "json") ;; optional: yaml, json, text (default: yaml)
  (aws-organizations-account "root")) ;; profile of organizations account. organizations commands are automatically executed against this account, when specified

(use-package aws-evil
  :after (aws-mode evil)
  :load-path "~/.emacs.d/packages/awscli")

Design

The general design is to have a tabulated list view for every AWS CLI supported service, which lists up the existing resources of that service.

You should be able to interact with each element of the list via different key presses. Flags and additional arguments should be easily activated in transient views (See screenshot).

You should also always be able to press ? in every tabulated list view to get a help menu (See screenshot), which shows all the possible actions and the respective shortcut.

This general Emacs Mode design should make it possible to learn the package just by navigating around and typing ?. As you get familiar with shortcuts you should be able to navigate and do actions a lot faster then typing out the commands in the AWS CLI itself.

Features

  • Switch between your configured profiles
  • Login to the AWS UI via aws-vault login
  • Works with the --profile flag as well as aws-vault sessions
  • CloudFormation
    • List Stacks
    • Delete Stack
  • CloudWatch
    • List CloudWatch Alarms in Account
      • Enable/Disable ActionsEnabled field
  • Lambda
    • List Lambda Functions in Account
    • Describe Lambda Function
    • Invoke Lambda Function and see last invocation result
    • Get latest logs
    • Get all Log Groups
    • List Event Source Mappings
      • Describe Event Source Mapping
      • Update Event Source Mapping
  • Logs
    • List Log Groups in Account
    • Get Log Streams of a Log Group
      • Describe Log Stream
      • Get Log Events
  • S3
    • List S3 Buckets
    • Create Bucket

Features Showcases

Main View with Switch Profile Auto Completion open

main-view-with-switch-profile-auto-completion-open

Help Menu Lambda

help-menu-lambda

Transient View Lambda Function Invoke

transient-view-lambda-function-invoke

Update Inline Policy of a Group

update-inline-policy-of-group.mp4

Configuration

Activate aws-vault for profiles

Set (aws-vault t) to use aws-vault to login to a profile. (aws-vault nil) or omitting the setting uses the --profile flag of the AWS CLI itself.

Current Limitations

AWS-Vault MFA Shell Prompts don't work in aws.el

For now set the AWS_VAULT_PROMPT environment variable to a UI utility like osascript.

Inspirations

This project is inspired by other great Emacs packages like:

aws.el's People

Contributors

dependabot[bot] avatar snowiow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jgerman

aws.el's Issues

Usage requires aws value

Looks very promising, but I can't get it to allow me to log in without using AWS vault; I don't know if this is the same issue as the known limitation "AWS-Vault MFA Shell Prompts don't work in aws.el": https://github.com/snowiow/aws.el#aws-vault-mfa-shell-prompts-dont-work-in-awsel

My setup:

  • Clone repo locally
  • load package like this:
(use-package aws-mode
  :bind ;; some functions which make sense to bind to something
  ("C-c a a" . aws)
  ("C-c a l" . aws-login)
  ("C-c a n" . aws-organizations-get-account-name)
  ("C-c a i" . aws-organizations-get-account-id)
  :load-path "~/src/aws.el/"
  :custom
  (aws-vault nil) ;; when t use aws-vault cmd to get into aws session
  (aws-output "json") ;; optional: yaml, json, text (default: yaml)
  (aws-organizations-account "root")) ;; profile of organizations account. organizations commands are automatically executed against this account, when specified

Behavior:
aws produces a list of service
image

Selecting anything from the services list seems to fail

  • s3:
    image

aws-login emits "NOT SUPPORTED" to the minibuffer
image

My org uses SSO and I can login to the aws cli inside vterm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.