1. In Solution Explorer, open the context (right-click) menu for the AEBWebAppDemo project folder for the project you created in the previous section, or open the context menu for the project folder for your own application, and choose Publish to AWS Elastic Beanstalk.
The Publish to Elastic Beanstalk wizard appears.
2. In Profile, from the Account profile to use for deployment drop-down list, choose the AWS account profile you want to use for the deployment.
Optionally, if you have an AWS account you want to use, but you haven't yet created an AWS account profile for it, you can choose the button with the plus symbol (+) to add an AWS account profile.
3. From the Region drop-down list, choose the region to which you want Elastic Beanstalk to deploy the application.
4. In Deployment Target, you can choose either Create a new application environment to perform an initial deployment of an application or Redeploy to an existing environment to redeploy a previously deployed application. (The previous deployments may have been performed with either the wizard or the deprecated Standalone Deployment Tool.) If you choose Redeploy to an existing environment, there may be a delay while the wizard retrieves information from previous deployments that are currently running.
Note
If you choose Redeploy to an existing environment, choose an environment in the list, and then choose Next, the wizard will take you directly to the Application Options page. If you go this route, skip ahead to the instructions later in this section that describe how to use the Application Options page.
5. Choose Next.
6. On the Application Environment page, in the Application area, the Name drop-down list proposes a default name for the application. You can change the default name by choosing a different name from the drop-down list.
7. In the Environment area, in the Name drop-down list, type a name for your Elastic Beanstalk environment. In this context, the term environment refers to the infrastructure Elastic Beanstalk provisions for your application. A default name may already be proposed in this drop-down list. If a default name is not already proposed, you can type one or choose one from the drop-down list, if any additional names are available. The environment name cannot be longer than 23 characters.
8. In the URL area, the box proposes a default subdomain of .elasticbeanstalk.com that will be the URL for your web application. You can change the default subdomain by typing a new subdomain name.
9. Choose Check availability to make sure the URL for your web application is not already in use.
10.If the URL for your web application is okay to use, choose Next.
1. On the AWS Options page, in Amazon EC2 Launch Configuration, from the Container type drop-down list, choose an Amazon Machine Image (AMI) type that will be used for your application.
2. In the Instance type drop-down list, specify an Amazon EC2 instance type to use. For this example, we recommend you use Micro. This will minimize the cost associated with running the instance. For more information about Amazon EC2 costs, go to the EC2 Pricing page.
3. In the Key pair drop-down list, choose an Amazon EC2 instance key pair to use to sign in to the instances that will be used for your application.
4. Optionally, in the Use custom AMI box, you can specify a custom AMI that will override the AMI specified in the Container type drop-down list. For more information about how to create a custom AMI, go to Using Custom AMIs in the AWS Elastic Beanstalk Developer Guide and Create an AMI from an Amazon EC2 Instance (p. 31).
5. Optionally, if you want to launch your instances in a VPC, select the Use a VPC box.
6. Optionally, if you want to launch a single Amazon EC2 instance and then deploy your application to it, select the Single instance environment box.
If you select this box, Elastic Beanstalk will still create an Auto Scaling group, but will not configure it.
If you want to configure the Auto Scaling group later, you can use the AWS Management Console.
7. Optionally, if you want to control the conditions under which your application is deployed to the instances, select the Enable Rolling Deployments box. You can select this box only if you have not selected the Single instance environment box.
8. If your application uses AWS services such as Amazon S3 and DynamoDB, the best way to provide credentials is to use an IAM role. In the Deployed Application Permissions area, you can either choose an existing IAM role or create one the wizard will use to launch your environment. Applications using the AWS SDK for .NET will automatically use the credentials provided by this IAM role when making a request to an AWS service.
9. If your application accesses an Amazon RDS database, in the drop-down list in the Relational Database Access area, select the boxes next to any Amazon RDS security groups the wizard will update so that your Amazon EC2 instances can access that database.
10.Choose Next.
The VPC must have already been created. If you created the VPC in the Toolkit for Visual Studio, the Toolkit for Visual Studio will populate this page for you. If you created the VPC in the AWS Management Console, type information about your VPC into this page.