Codepipeline or API to automate the task of obtaining EC2 IP's after deployment

1

I have a bunch of resources that get stood up as part of a regular deployment, i.e. worker EC2's. I need their IP's and to populate them into a config (But this is a post-deployment process) and it can become long/monotonous as its trivial work.

Is there any api calls or any features in AWS I can use to automate this? I'm fine with shell/bash/python.

Something in my head is to create a pipeline job that runs after the deployment pipeline, it queries or "scans" for the scope-named EC2's and then retrieves the IP's. Stores them for reference and then appends this to a config file I store in code commit. Possible?

1 Antwort
2
profile pictureAWS
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen