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

ec2 get metadata replacement #515

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

ec2 get metadata replacement #515

wants to merge 1 commit into from

Conversation

gmgtamz
Copy link
Contributor

@gmgtamz gmgtamz commented Dec 10, 2024

Walk through ec2 imds v2 meta-data tree path in depth and export corresponding variables including json values flattening. It replaces ec2-metadata CLI:

from "ec2-metadata --help":

<< Use to retrieve EC2 instance metadata from within a running EC2 instance. For more information on Amazon EC2 instance meta-data, refer to the documentation at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html >>

@sean-smith
Copy link
Contributor

Did you write this script?

@gmgtamz
Copy link
Contributor Author

gmgtamz commented Dec 12, 2024

yes :D

@sean-smith
Copy link
Contributor

yes :D

nice! ok only asking since I've seen similar scripts i.e. https://github.com/amazonlinux/amazon-ec2-utils/tree/main

@gmgtamz
Copy link
Contributor Author

gmgtamz commented Dec 12, 2024

yes, the point was to improve ec2-metadata cli, it's a generic version parsing all the metadata available from IMDS v2

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.

2 participants