Dan Ross
Dan Ross

Reputation: 3701

How to tell why an EC2 instance was started

There are a bunch of different AWS services that can start up EC2 instances: Elastic Beanstalk, ECS services / tasks, EC2 autoscaling groups, Ops Works scripts, Cloud Formation templates, and probably others that I haven't discovered yet. Today I am cleaning up after a bunch of experiments and demos. When I try to stop certain EC2 instances, some of them get restarted by something. Is there some way to determine why an EC2 instance was started, without digging around in each AWS product looking for a reference to a particular machine?

Upvotes: 0

Views: 144

Answers (1)

mickzer
mickzer

Reputation: 6358

If you enable CloudTrail, you'll be able to see who issued what AWS API call. So you should be able to see what services are launching these instances by checking the CloudTrail logs and searching for the relevant instance ids.

See more about CloudTrail in the docs

But there is no way by default to get this information. It's possible that the free customer support team would be able to help if you provide them with the instance ids.

Upvotes: 5

Related Questions