AWS AMI

General support questions
Post Reply
offline
Posts: 8
Joined: 2008/04/29 13:02:42
Contact:

AWS AMI

Post by offline » 2019/06/15 13:55:20

Hello,

We use Centos for our infrastructure on AWS. I noticed that Centos graciously provides a set of AMI's that are pre-built in the market place. Unfortunately, I need an AMI that uses LVM's for the root directory. Are there any instruction on how the AMI is currently built? Maybe I could use those as a base with a slight modification?

Thanks for any help!

Chris Edwards

aks
Posts: 2731
Joined: 2014/09/20 11:22:14

Re: AWS AMI

Post by aks » 2019/06/16 19:38:55

This has been asked many times before.

I don't so this any more, but you can upload a virtual machine's disk image to AWS as an AMI (AWS provides docs on how to). Really ask yourself is it worth it? Why do you need a root LVM? What's the story?

offline
Posts: 8
Joined: 2008/04/29 13:02:42
Contact:

Re: AWS AMI

Post by offline » 2019/06/17 00:37:24

I dont want to get into a long discussion about why. I just wanted to know if anyone could help. If you can't, please dont reply.

Thanks,

Chris Edwards

aks
Posts: 2731
Joined: 2014/09/20 11:22:14

Re: AWS AMI

Post by aks » 2019/06/18 18:54:04

I have (in the past) create a VM and taken that disk up to AWS as an AMI. Whereby you upload it to an S3 bucket and use AWS documentation to "convert" it to AWS "format".
Yes it possible, but can not recall the exact details (and don't want to).
It follows something like:

1) Upload VM disk to S3.
2) aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json
Where trust-policy is json and looks like:
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "Service": "vmie.amazonaws.com" },
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals":{
"sts:ExternalId": "vmimport"
}
}
}
]
}
3) Then put that role in the policy.
4) aws ec2 import-image ....
Well it's all in the docs.
And don't debate then!

Post Reply