The default IIS/Windows Environment provided by the Elastic Beanstalk will not have ASP enabled. In this tutorial, you will learn how to deploy a Classic ASP application to AWS Elastic Beanstalk. However this article can be used as reference to host any application in AWS Elastic Beanstalk which requires the customization to the Environment(like enable asp, Install Oracle driver etc).
Creating customized AWS Elastic Beanstalk Environment has 3 major steps:
Creating customized AWS Elastic Beanstalk Environment has 3 major steps:
I. Create Elastic Beanstalk
AMI.
II. Create custom AMI and
customize.
III. Create Elastic Beanstalk
Environment using custom AMI.
I. Create Elastic Beanstalk AMI
We need to create Elastic Beanstalk AMI because Non-Beanstalk AMIs are not supported for Elastic Beanstalk Windows Server platforms.
- Create a IIS/Windows Environment following AWS Document.Please follow only steps under "Create the Environment". Also in step 9 don't choose "Create an RDS DB instance with this environment". If you need a database we can do it in Step III.
- Note down the "Custom AMI ID" of the environment created in the about step by navigating to Configuration - > Instances[Screen]
- Terminate the Environment by Clicking Actions - > Terminate Environment
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- Choose Launch Instance.
- Choose Community AMIs
- Enter the AMI ID of the Elastic Beanstalk(Created in Step I) that you will customize to create a custom AMI and press Enter.
[Screen] - Choose Select to select the AMI.
- Select an instance type and choose Next: Configure Instance Details.
- Proceed through the wizard to launch the EC2 instance. When prompted, select an key pair that you have access to so that you can connect to the instance for the next steps.
- Connect to the instance with RDP[link to how to rdp].
- Perform any desired customizations.
Like
Enable ASP by following steps in Microsoft site
https://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis
Copy the ASP code to the root directory - If you know how to upload asp code to EBS then do this in the step III.
Goto IIS and set the default page - In the Amazon EC2 console, stop the EC2 instance and then choose Create Image (EBS AMI) from the Instance Actions menu.
- To avoid incurring additional AWS charges, terminate the EC2 instance.
- Create a IIS/Windows Environment following AWS Document.
Please follow only steps under "Create the Environment". - Go to Configuration - > Instances - > Custom AMI ID - > Enter the EBS AMI created in the step II and Click "Save".
[Screen] - Launch your application and verify.