Page 1 of 1

AWS AMI

Posted: 2019/06/15 13:55:20
by offline
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

Re: AWS AMI

Posted: 2019/06/16 19:38:55
by aks
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?

Re: AWS AMI

Posted: 2019/06/17 00:37:24
by offline
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

Re: AWS AMI

Posted: 2019/06/18 18:54:04
by aks
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!