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

Add ECS task credentials support #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mu1f407
Copy link

@mu1f407 mu1f407 commented Nov 17, 2023

Hi, this PR adds support for ECS task role credentials (see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) with --ecs-creds option or ecs-import-creds helper.

I modified get_key_value function to use sed for improvised JSON parsing, because it couldn't handle non pretty-printed JSON responses. I tested the sed variant for all cases (compact, pretty-printed, with space after colon). If the value doesn't contain double quotes, than it will work well (this would break even the original grep+cut variant).

There are some other minor changes for consistency.

Thank you!

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

Successfully merging this pull request may close these issues.

1 participant