Add function to switch AWS profiles

This commit is contained in:
Jeremy Dormitzer 2020-12-13 08:40:06 -05:00
parent c444078250
commit eff7e0fe5b

View File

@ -5364,6 +5364,23 @@ Syntax highlighting for Dockerfiles:
#+END_SRC
* AWS
** Switching profiles
Switch AWS profiles:
#+BEGIN_SRC emacs-lisp
(defvar aws-profiles '("default")
"AWS profile names")
(defvar aws-current-profile nil
"Currently active AWS profile")
(setq aws-current-profile (getenv "AWS_PROFILE"))
(add-to-list 'aws-profiles "personal")
(defun aws-switch-profile (profile)
(interactive (list (completing-read "Profile: " aws-profiles)))
(setenv "AWS_PROFILE" profile)
(setq aws-current-profile profile))
#+END_SRC
** S3
#+BEGIN_SRC emacs-lisp
(use-package s3ed