Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mentioning AMI in the docs #1

Closed
unfor19 opened this issue Mar 21, 2021 · 2 comments
Closed

Mentioning AMI in the docs #1

unfor19 opened this issue Mar 21, 2021 · 2 comments

Comments

@unfor19
Copy link

unfor19 commented Mar 21, 2021

Thank you for this tool, it works as expected.

Other than creating the IAM role, I think it would be great to add something about the AMI, or maybe even allow providing it as an environment variable. I edited the code and hardcoded the AMI for eu-west-1.

Also, would you be interested in a PR that wraps it up in a Docker image? I can also add a script for creating the SSMInstanceProfile IAM role (and policy).

@tgpadua
Copy link
Contributor

tgpadua commented Mar 26, 2021

Hello @unfor19, I appreciate your interest in the tool.

Correct, in the previous version AMI was hard-coded and you had to edit the code as you did. The good news is that I've just commited a new version which automatically select the last Amazon Linux AMI based on the region configured in your AWS CLI config. Please check it out!

Absolutely, it would be very nice to have the IAM role creation automated, feel free to send me a PR.

Could you please elaborate more on the use case to have this wrapped in a Docker image? I mean, are you considering to run it using a runtime like Fargate, ECS or EKS instead of EC2? If so, how would the script manage it?

PS: This new version also includes a new feature (cmd) that allows you to execute any command you want.

Thanks!
Thiago

@unfor19
Copy link
Author

unfor19 commented Mar 29, 2021

Hey @tgpadua

  • IAM role creation - I'll add a PR for that, something like "--create-iam-role=true" where it defaults to false.
  • Docker image - I tend to run everything in Docker, especially bash scripts that require specific versions of specific tools. For example - this tool works for aws-cli v2.20.x (just an example) but might break in v2.30.x, so wrapping it up in a Docker image assures that it will never break, and the worst thing that will happen - it will be deprecated due to old versions. It's easier to just work with Docker ... No hassle at all, a simple docker run and that's it

Here's how I usually wrap a Bash script as a CLI - https://github.com/unfor19/bargs

@tgpadua tgpadua closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants