Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I am trying to launch aws instance with User Data. My User Data is a server installation process and i have to check whether the user data scripts are executed properly. Is there any option to check if the status of User data is completed ? I need to know the status since from that launched instance i am taking another image. As off now, i explicitly used time.sleep(90) for my process completion.

Note: I am using Boto library.

Any solution on this would be greatly appreciated!

1 Answer

0 votes
by (18.2k points)

So far, there isn't any official way of doing that and when I say official, I mean AWS authorized or recognized.

But there is a way you can get your user data status. What you need to do is, have your user data script add an additional label to the instance after it completed. Then you can do a describe-instances with a filter that will only include the nodes with the tag you use to specify that the user data has been updated.

This method will also require you to include an API key and secret in your user data script. Do not include your regular API key and secret. You can create one with very limited IAM rights and use that one.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...