How can I bundle a aws ec2 windows machine with installed applications - amazon-web-services

I have a ec2 windows machine with adobe after effects running. I am trying to create a template from this ec2 instance which should allow me to launch new ec2 windows instances with adobe after effects already being preinstalled. However, it looks like that is not possible. The option to "bundle instance" is greyed out. Or have I misconfigured the ec2 template?

"Bundle" commands are outdated.
You should simply use Create Image to create an Amazon Machine Image (AMI) of the existing instance. Then, you can Launch an instance from the AMI and it will contain an exact copy of the AMI.
See: Creating a Custom Windows AMI - Amazon Elastic Compute Cloud
Recommendation: Run sysprep before creating the image. This will avoid conflicting machine IDs.
See: Create a Standard Amazon Machine Image Using Sysprep - Amazon Elastic Compute Cloud

Related

Creating docker image from VM snapshot

I was tasked with taking an on prem Windows virtual machine and converting it to a Amazon ecs container. A linux container at that. Is there a way of doing this if I get the snapshot of the VM? Also, would I run into some issues with compatibility since VM snapshots might have some windows artifacts? My plan was to take the vm snapshot, convert that to EC2 and then convert the ec2 ami to ecs. Is that overkill? Is there a simpler way?

Building an AWS Elastic Beanstalk platform from an AMI

I have configured an EC2 server with a specific set of packages and created a custom AMI from the instance which is setup just how I like it. I would like to use Elastic Beanstalk to generate a new instance with the same setup. Is that possible? When I am asked to select a platform in EBS my custom AMIs are not available to me. I cannot "apply" an AMI to an existing EC2 created by EBS.
I would like to know how Elastic Beanstalk makes use of custom AMIs. I cannot find a clear answer in the docs.
By default Elastic Beanstalk only provide Amazon Linux in case Linux OS. You can use your custom AMI with ElasticBeanstalk. In the AMI selection stage paste the AMI-ID of your custom AMI and you are good to go.

Creation of VMS within AWS Ec2

I am trying to design and making architecture of cloud application deployment resources in AWS cloud using EC2, S3, and RDS. Here I have a little bit of confusion about AWS infrastructure, which I am describing here.
I already have a AWS EC2 machine - Ubuntu 16.04 LTS. Is possible to create another VMs within my Ubuntu? I mean, can I use Linux or CentOS within my EC2 Ubuntu machine?
I am a beginner in cloud and AWS world, still exploring about AWS infrastructure.
When you instantiate your EC2 instance you are required to select an AMI. the AMI is an amazon machine image. This essentially describes what OS (CentOS, Ubuntu, RedHat, etc) will be installed on your EC2 instance. Most likely you selected the Amazon Linux AMI which installs amazon's own flavor of CentOS. Once the instance is up, you will not be able to install a different OS on it. You will have to terminate your existing instance and spin up a new EC2 instance with the AMI that you want.
That being said, you can also use a tool such as Docker https://www.docker.com/. This allows you to spin up docker containers. Each docker container acts like a VM and will allow you to spin up multiple different docker containers with whatever OS you want within your single EC2 instance.

Windows EC2 => snapshot => AMI => new EC2 doesn't work

I am very new to AWS. I had a perfectly running Windows Server EC2 on t2.micro. IIS is working perfectly and I can get its HTML using a web browser. I can RDP into it.
I then stopped it, created a snapshot from its only EBS volume.
I then created an AMI from the snapshot.
I then launched the AMI. What is interesting is t2.micro is not available. Only t1.micro and m3.medium onward are available. When I tried to launch, it warns me that port 22 is not turned on so I can't remote into it. The instance status check says "insufficient data". When I clicked the "Connect" button, it asks me to use putty. So it seems to think that the instance is a Linux instance. But I have redone this whole process five times and under no circumstance I ever chose Linux.
If I skip the snapshot, and directly create an AMI from the EC2 instance and launch it, t2.micro is available, and the new instance works.
Why can't I create an AMI from snapshot, if AWS provides such functionality?
Snapshot is a backup of your data.
AMI is snapshot of your system.It contains the bootable information like
the architecture, kernel, block device mappings ,instance type etc. , so that it will have some information prior to instance launch.
It is not possible to create an AMI image of a Windows-based EC2 instance from an EBS snapshot. That process:
EC2 instance -> EBS snapshot -> AMI image -> EC2 instance
only works for Linux instances.
To create a working AMI image from a Windows EC2 instance, you must use the "Create Image" function from the source EC2 instance directly:
Via AWS Management Console: Actions -> Image -> Create Image
Via API: ec2:CreateImage
Via CLI: aws ec2 create-image

Does AMI have all the environment of its source EC2 instance? How to save all tools and configs with AMI?

I have created an EC2 instance in AWS. I have set up Node.js environment on it, installed all necessary tools (Ruby, Nginx, MongoDB, MySQL, etc), configured .bashrc, aliases, apt, etc.
Now I would like to save this pre-configured instance as a sample to create the same full-featured instances from it in future.
My question is: Creating an AMI, does AWS save all my configs and installed tools in that AMI? So that when I re-create a new instance from it, my new instance will have everything installed and pre-configured? Or how to save all tools and configs with AMI?
To simplify things, an AMI is a bootable snapshot of the root volume filesystem of the EC2 instance you created it from.
So yes, everything that you installed on the disk, including ruby nginx bashrc etc, should be in there when you create an instance out of it.
Creating an AMI is easy (Full docs here):
Launch an EBS-backed EC2 instance
SSH into the instance
Do your things
Right click on the instance -> image -> create image
You will have an AMI a few minutes after
Note: You can also create an AMI out of instance-store EC2 instance