I have already discussed the Blazor Framework in my previous articles on C# Corner. If you are new to Blazor, please refer to the below articles to get started with Blazor.
You can refer to the below article to get started with AWS free tier.
Install AWS Toolkit in Visual Studio 2017
We must use Visual Studio 2017 (any version) to create a Blazor application. We can install AWS Toolkit in Visual Studio 2017. There are a couple of ways available to install this plugin.
Open Visual Studio 2017 and click “Extensions and Updates” from “Tools” menu.
Search for “aws” from the “Online” tab. You will get the below results.
You can choose “AWS Toolkit for Visual Studio 2017” and click the “Download” button.
It will download the plugin.
After some time, the plugin will be downloaded successfully. We can close Visual Studio 2017. After closing the Visual Studio, AWS toolkit installation will be started automatically. Click “Modify” button to install the plugin on Visual Studio.
After some time, the installation will be completed successfully.
In a second way, you can directly download the plugin and install to Visual Studio. We can open Visual Studio and create a Blazor application.
Open the existing Blazor application for getting C# Corner RSS Feeds.
Here, we are using an existing Blazor application. I am using a Blazor application which will display the RSS feeds from the C# Corner website. I already discussed about this Blazor application in my previous post. Please read this article to get more details about that app.
Publish app to AWS Elastic Beanstalk
Right-click the “Server” project and choose the “Publish to AWS ElasticBeanstalk” option.
We must create a profile to proceed with further steps. Access Key and Secret Access Key are very important.
You can obtain these details from the AWS Console. Log into AWS Console and click “My Security Credentials”.
You can click the “Access Keys” tab and click “Create New Access Key” button to create a new Key Pair. After creation, you can download this key pair for future usage. Please keep these keys safe. We can create multiple access keys. If you find a misuse of these keys, immediately delete/inactivate these keys.
We can enter these keys to profile and create the profile. Click the "Next" button to proceed with further steps.
We can choose the environment and give a URL name. Please check the availability of the URL.
Click “Next” button to proceed with further steps. We can choose the Container type and Keypair. You can opt with existing key pair (if it exists) or create a new key pair.
We can choose the required permissions and roles. Here, I am opting for default roles only.
In the final stage, we can choose the build configurations (Debug/Release mode) and click “Finish” button.
Before starting the deployment, you can review the existing steps and values given.
Click the “Deploy” button to start deployment.
You can monitor the deployment status on Visual Studio itself.
You can even monitor the deployment status on the AWS Console too.
After some time, our application will be deployed successfully and ready to use.
We have successfully deployed our Blazor application to AWS Cloud using Elastic Beanstalk.
Now, we can open the URL and run the application.
You can see that “ap-south-1" is additionally added to the URL. Here, I am using the Mumbai region in AWS. If you choose another region, you will get a different URL.
In this post, we have installed AWS Toolkit plugin in Visual Studio 2017, and we have published one Blazor application to AWS cloud using Elastic Beanstalk. For that, we have used the existing Blazor application for getting RSS feeds from C# Corner feeds.
We can see more exciting features of the Blazor framework in upcoming posts.