ryekayo
ryekayo

Reputation: 2431

Can I get metadata from an EC2 that was not made in CloudFormation?

I have instances that were not created by CloudFormation. I am hoping to replicate those instances but I do not want to go through the whole brain numbing process of building the instances in EC2 (going through the steps of specifying the instance type, EBS volumes, etc.). My questions are:

It would be so cool if they had a way of doing some kind of JSON dump similar to a database dump.

Upvotes: 0

Views: 54

Answers (1)

jarmod
jarmod

Reputation: 78803

You could start with:

aws ec2 describe-instances \
    --instance-ids "i-06666777788889999" \
    --query "Reservations[0]"

You'd then also probably want to get details of attached EBS volumes, Security Groups etc.

Alternatively, see if CloudFormer can help you. It can create a CloudFormation template from AWS resources that you point it at.

Upvotes: 2

Related Questions