4
votes

I've deployed an ASP.NET on EC2 using AWS Cloudformation. In Visual Studio, the AWS Toolkit adds the 'Publish to CloudFormation' menu item. This creates the required Cloudformation template using a choice of machines, such as Micro and Large, targeting Win 2008 R2. As I would use a 'small' instance (more powerful than Micro but cheaper than Large, and use the convenience of Cloudformation from Visual Studio, I tried copying the template that is generated and use this as a new template for Cloudformation, using an AMI that targets Win 2008 and so runs on a 32bit small machine. However I get an error as the template references config file items created on the fly.

What is the best way to use the small instance from within AWS Toolkit on AWS Cloudformation, without having to set up instances, etc.

2

2 Answers

2
votes

This former limitation has meanwhile been remedied by the introduction of 64-bit Ubiquity, see EC2 Updates: New Medium Instance, 64-bit Ubiquity, SSH Client:

You can now launch 64-bit operating systems on the Small and Medium instance types. This means that you can now create a single Amazon Machine Image (AMI) and run it on an extremely wide range of instance types, from the Micro all the way up to the High-CPU Extra Large and and the High-Memory Quadruple Extra Large, [...]

This will make it easier for you to scale vertically (to larger and smaller instances) without having to maintain parallel (32 and 64-bit) AMIs.

[emphasis mine]

The AWS Toolkit for Visual Studio supports this significant improvement to vertical scaling as well already, so you can simply Publish to CloudFormation while targeting an Amazon EC2 instance type of your choice, including m1.small.

While this should already cover your use case, it may be worth mentioning that AWS also released a new dedicated AMI supporting this OS on AWS CloudFormation specifically, namely the Microsoft Windows Server 2008 R2 - Base for CloudFormation, which contains Microsoft Windows Server 2008 R2 with SP1 intended for CloudFormation on an AMI backed by Amazon EBS in order to to build your own AMIs.

2
votes

not possible as Cloudformation requires Win 2008 R2 and the small instance is 32bit