Thursday, 25 July 2024

AWS Elastic Beanstalk by Amazon Web Services

AWS Elastic Beanstalk is a Platform as a Service (PaaS) offered by Amazon Web Services. 

It simplifies deploying, managing, and scaling web applications and services. Here's a detailed overview: 


AWS Elastic Beanstalk supports web applications written in many popular languages and frameworks. It requires no or minimal code changes to go from the development machine to the cloud. Development options for deploying your web applications include Java, .NET, Node.js, PHP, Ruby, Python, Go, and Docker.

Let's deploy the .Net Application to EC2 via Elastic Beanstalk.

Step 1: Open the Visual Studio --> Go to Extensions --> Click on Manage Extensions
Step 2: Search for AWS Toolkit with Amazon Q Extension.
Step 3: Install the extension and restart the PC

Step 4: When you right-click on the Solution, you can see published with AWS options.















Step 5: Click on the Publish to AWS option. It will validate your AWS connection. If it is not connected, you need to enter AWS User credentials.

Step 6: You can choose the OS based on your app.














You can go to View Menu in Visual Studio and Click AWS Explorer to ensure you are connected with AWS. If you are not connected with AWS then get the access key from AWS Portal, Under users sections













Step 7: Click on the Publish button












It will create a new EC2 and deploy the website automatically in IIS. 


Pricing:

There is no additional charge for Elastic Beanstalk. You pay only for the underlying AWS resources that your application consumes.

Implement Authorization in Swagger with Static Value in Header .Net 8

If you want an anonymous user should not run the APIs. To run your API Endpoints From Swagger / Postman / Code the user should pass the head...