Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

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.

Monday, 19 February 2024

Hosting a Static Website Using Amazon S3


In today's world, most websites are static, which means they run no server-side code and only consist of HTML, CSS, and JavaScript. There is no server-side code to run, so there is no reason to host them on a traditional server.


Hosting static websites on an S3 bucket costs one to two dollars monthly and scales to millions of users.


Let's learn how to create a S3 Bucket and host the website.


Step 1: Create a Bucket

You can open S3 from the Amazon console by searching for S3 or clicking the link below. Console at https://console.aws.amazon.com/s3/


1. Click on Create Bucket











2. Enter your Bucket name and select AWS Region.













3. Uncheck block all public access



















4. Keep the remaining settings as it is like bucket versioning etc.

5. Click on the Create Bucket button.

6. You will receive the below message.









Step 2: Upload files

1. Click your Bucket Name


















2. Click on the upload button on the right.











3. Click on the add files button and upload your files. 














4. I am uploading index.html for now. You can upload your files (CSS/Images/Javascript and HTML)























Upload your file and then click on the Close Button.

Step 3: Allow Public Access

1. Go to permissions and Edit













2. Uncheck Block all public access and click Save changes.


Step 4: Enable Static website hosting


1. Click on your bucket go to Properties and scroll down.




















2. Go to Static Website Hosting and Click Edit







3. Enable Static Website and Specify the index document. I am adding an index.html as a startup page.





















4. Click Save Changes.


Step 5: Get URL

1. Click on your bucket Name and Go To Properties.

2. Under static website, you can get the static website URL.













3. If you run this URL you will get an error, access be denied, 403













Step 6: Set Bucket Policy

1. Clock on Bucket Name and Go to the Permissions Tab.

2. Go to Bucket Policy and Edit













3. Copy the below lines and Save. Note: You need to enter your Bucket ARN in Resource. You can find Bucket ARN in the Properties Tab.


{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "aarn:aws:s3:::tssbucket2024/*"
        }
    ]
}






























4. Update ARN and press the Save Changes Button.

5. Open the link in the browser and you can see the Website is running.


http://tssbucket2024.s3-website.eu-north-1.amazonaws.com/














This is all about this article. I hope you like it.


Wednesday, 27 December 2023

AWS - Create Copy of DynamoDB Table and learn Backup and Restore Functionality

AWS DynamoDB Back and Restore


There is no direct way to copy DynamoDB tables as of now. So, we must take a backup and restore the table with a new name. Let's learn.


Step 1: Search DynamoDB from the search bar and Click Tabes on the left side. Select the table from the right that you want to take the backup.















Step 2: Click on the Backup Tab, click the Create Back dropdown below, and select Create an on-demand backup.












Step 3: Create on-demand backup, click the Create Backup button.





















Step 4: You can see the request is in progress










Step 5: You can also see the status in AWS Backup. (Search AWS backup in the Search bar).













It will take approx 5 minutes to take the backup and it will change the status to complete.
Step 6: After completion, you can Go to Dynamo DB from the search bar and you can find the backup there then you can press the restore button.












Step 7: Here you can update the table name that you want and press the restore button.































You can see the request submitted successfully.










Step 8: To check the status, you again can go to AWS backup --> Jobs --> and click Restore Jobs.
















Step 9: After completion, you can see a new table Under DynamoDb tables













This way you can create a table copy in the DynamoDB.
That's all about this article, thank you.


How to get PowerBI Embed Token

 Here's a step-by-step guide to help you through the process. Step 1: Register Your App in Azure 1. Go to Azure Portal → App registratio...