b launch free aws cloud server

Free Aws EC2 as a web-hosting Server

Configure and Launch Your EC2 Instance. Here is a complete Step-by-Step guide to getting gtarted with Amazon EC2

Aws Free Tier Eligible

Getting Started

Cloud computing has revolutionized the way we deploy and manage applications, and Amazon web Services (Aws) stands at the forefront of this transformation. Amazon Elastic Compute Cloud (EC2) is one of the most popular and powerful services offered by Aws, providing scalable computing capacity in the cloud. Now whether you are a developer looking to host a personal project, a startup building your first application, or an enterprise seeking flexible infrastructure, EC2 offers the perfect solution.

The best part? Aws offers a generous free tier that allows you to explore and experiment with EC2 instances at no cost for your first 12 months. This guide will walk you through every step of setting up your first EC2 instance, from initial configuration to pointing your domain name to your new server. By the end of this tutorial, you will have a fully functional cloud server ready to host your applications.

Now, we will start by visiting the Aws portal that catalogs the free-tier services. By searching for EC2, you'll discover the Aws EC2 instance available for free-tier usage. This service is free to use for up to 12 months with 750 hours of utilization per month.

Good News! Since one month contains a maximum of 744 hours (31×24 hours), you'll never exceed the monthly threshold, making it essentially free for continuous use during your trial period. This means you can keep your instance running 24/7 without worrying about additional charges during your free tier period.
1
Free tier EC2 instance for up to one year

📋 Key Highlights

Understanding Aws Free Tier

Learn about the generous free tier offerings and how to maximize your 12-month trial period without exceeding usage limits.

Instance Configuration

Master the art of configuring your EC2 instance with the right operating system, instance type, and storage options.

Security Setup

Understand how to create secure SSH key pairs and configure security groups to protect your instance while allowing necessary traffic.

Domain Configuration

Connect your custom domain name to your EC2 instance, making your application accessible via a memorable web address.

1Understanding Free Tier Specifications

Before diving into the setup process, it is crucial to understand what you are getting with the Aws free tier. The specifications of the free tier EC2 instance are modest in terms of computational capacity, featuring limited CPU power and memory. However, do not let this discourage you. These specifications are perfectly suitable for a wide range of use cases including hosting small to medium-sized websites, running development environments, testing applications, hosting personal blogs, or even running lightweight web applications.

The t2.micro instance type is part of the burstable performance instances of Aws, which means it provides a baseline level of CPU performance with the ability to burst above that baseline when needed. This makes it ideal for applications that don't require sustained high CPU performance but occasionally need extra processing power. Think of it as having a reliable compact car that can still accelerate when you need it to.

Instance Type

t2.micro

Duration

12 months free

Monthly Hours

750 hours

Storage

Up to 30 GB EBS

Once you select the Amazon EC2 service from the free tier page, you will be forwarded to the next page to get started with the service. The EC2 dashboard will appear, serving as your central command center for managing all your EC2 instances. For first-time users, you will notice that no instances are running. This is perfectly normal since you have not created any yet. The dashboard provides a comprehensive overview of your EC2 resources, including running instances, volumes, security groups, and more.

Look for the prominent Launch Instance button, typically displayed in an eye-catching orange color. This button is your gateway to creating your first virtual server in the cloud. Clicking it will initiate the instance creation wizard, which will guide you through all the necessary configuration steps.

3
Launch a new instance

2Setting Instance Name and Tags

Once you press the launch instance button, you'll be forwarded to the instance configuration setup page, where the real work begins. The first step is to give your instance a meaningful name. Choosing a descriptive name will save you considerable time and confusion later, especially as you create more instances.

Consider using a naming convention that reflects the purpose of the instance, its environment, or project. For example, names like production-web-server, dev-api-backend, or personal-blog-host immediately tell you what each instance is for. This becomes increasingly important in professional environments where you might be managing dozens or even hundreds of instances. Aws also allows you to add tags (key-value pairs that provide additional metadata about your instance), making it easier to organize, search, and manage your resources at scale.

4
Set the name and tag of EC2 instance

3Selecting OS and Instance Type

From the quick start section, you will need to select an operating system for your instance. Aws provides these OS images as Amazon Machine Images (AMI), which are pre-configured templates that contain the operating system and often additional software packages. For this guide, we recommend selecting a free tier eligible Ubuntu image, specifically the Ubuntu Server LTS (Long Term Support) version, which ensures you will receive security updates and support for an extended period.

Ubuntu has become the de facto standard for web hosting and cloud deployments due to several compelling reasons. First, it offers exceptional stability and security, with regular updates and a robust package management system. Second, it has extensive documentation covering virtually every scenario you might encounter. Third, it benefits from a massive, active community of developers and system administrators who can provide help when you need it. Finally, most modern web development tutorials and guides assume you are using Ubuntu, making your life significantly easier as you follow along with various resources.

Next, you will select the instance type. Choose the t2.micro instance type, which is specifically designed for the free tier. This instance provides 1 virtual CPU and 1 GB of memory, a modest specifications, but sufficient for learning, development, and running small-scale applications. The t2.micro is part of the T2 instance family, which provides burstable CPU performance, meaning your instance can temporarily use more CPU when needed while operating at a lower baseline the rest of the time.

Ubuntu is a popular choice for web hosting due to its stability, extensive documentation, and strong community support. It is perfect for beginners and experienced users alike. Additionally, many popular web technologies like Node.js, Python, Ruby, and PHP have excellent support on Ubuntu, and you will find countless tutorials specifically written for this operating system.
5
Set operating system and instance type for EC2

4Creating Key Pair for Remote SSH

Now you will create a new key pair for your instance. This is one of the most critical security steps in the entire setup process. SSH (Secure Shell) key pairs provide a secure way to connect to your instance remotely without using passwords, which are vulnerable to brute-force attacks. A key pair consists of two parts: a public key (which Aws stores on your instance) and a private key (which you download and keep secure on your local machine).

Now when you click the create key pair button, Aws generates a new RSA encrypted private key and immediately downloads it to your local system as a .pem file (on Mac/Linux) or .ppk file (on windows using PuTTY). This file is your only copy of the private key (Aws does not keep a backup). The moment you download this file, you become solely responsible for its security and safekeeping.

This private key file is essentially your password to the server, but unlike a password, it cannot be reset or recovered if lost. In later sections of this guide, we will demonstrate exactly how to use this private key to establish a secure SSH connection to your EC2 instance, allowing you to execute commands, install software, and manage your server remotely from anywhere in the world.

Keep your private key file secure and never share it with anyone. If you lose this file, you will not be able to access your instance via SSH. Store it in a safe location and consider making a backup on a secure, encrypted drive. On Unix-based systems (Mac/Linux), you will need to set appropriate permissions on this file using the command chmod 400 your-key.pem before you can use it. Never commit this file to version control systems like Git, and never email it or share it through unsecured channels.
7
Create a new key-pair for remote SSH

5Creating Security Groups

From the network settings section, you will create and configure security groups, which act as virtual firewalls controlling the traffic allowed to and from your instance. Understanding and properly configuring security groups is crucial for maintaining a secure server while ensuring your applications remain accessible to legitimate users. Think of security groups as a sophisticated bouncer at a club. They decide who gets in, who stays out, and what activities are permitted once inside.

Security groups work by defining rules that specify which types of traffic are allowed based on protocol (TCP, UDP, ICMP), port number, and source IP address. At the time of launching your first instance, Aws helps you create an initial security group with sensible defaults, but you have full control to customize it according to your needs. There are several important considerations when configuring your security group:

  • SSH Access (Port 22): This rule allows you to remotely connect to your instance via SSH. You have two main options here. First, you can allow remote SSH from anywhere (0.0.0.0/0), which provides maximum flexibility as you can connect from any location or network. However, this also means anyone on the internet can attempt to connect to your instance (though they still need your private key). Second, you can restrict SSH access to your current IP address by selecting the My IP option from the dropdown menu. This is more secure because only connections from your specific IP address are permitted. For production servers, the latter approach is strongly recommended, though you may need to update this rule if your IP address changes.
  • HTTP Traffic (Port 80): This rule allows standard web traffic to reach your instance, which is absolutely necessary if you are hosting a website or web application. At this point, when users type your domain name into their browser without specifying https://, their browser automatically attempts to connect via HTTP on port 80. Now, without this rule enabled, visitors will not be able to access your website. You will typically want to allow HTTP traffic from anywhere (0.0.0.0/0) so that anyone on the internet can visit your website.
  • HTTPS Traffic (Port 443): This rule enables secure, encrypted connections to your website. In the web landscape of today, HTTPS is not optional. It is essential. Modern browsers mark HTTP-only sites as not-secure, which can drive away visitors. Moreover, HTTPS is required for many modern web features and is favored by search engines for SEO rankings. Like HTTP, you will want to allow HTTPS traffic from anywhere so all users can securely access your site. Later, you can configure an SSL/TLS certificate (using free services like Let us Encrypt) to actually enable HTTPS on your server.
For production environments, it is strongly recommended to restrict SSH access to your IP address only. This adds an extra layer of security by limiting who can attempt to connect to your instance. If you work from multiple locations, you can add multiple IP addresses to the same rule, or use a VPN service to maintain a consistent IP address. Remember, you can always modify security group rules later without having to restart your instance, so do not worry about getting everything perfect on the first try. As your needs evolve, your security configuration can evolve with them.
8
Create a security group for EC2 instance

6Configure Storage

Finally, you will attach storage to your instance in the form of an EBS (Elastic Block Store) volume. Think of EBS as a virtual hard drive that is attached to your instance. It is where your operating system, applications, and all your data will be stored. EBS volumes are highly reliable, automatically replicated within their Availability Zone to protect against hardware failures, and can be easily backed up through snapshots.

By default, Aws configures your instance with an 8 GB EBS volume, which might seem small by the standards of today. However, the generous free tier allows you to use up to 30 GB of General Purpose (SSD) storage at no additional cost. This is a significant amount of space that can accommodate your operating system, web server software, databases, and application files comfortably. Unless you are working with large media files or extensive databases, 30 GB should provide plenty of room for most small to medium-sized projects.

Now when configuring your storage, you will also notice options for volume type and IOPS (Input/Output Operations Per Second). For free tier instances, stick with the General Purpose SSD (gp2 or gp3) option, which provides a good balance of performance and cost. You can also choose whether to delete the volume when the instance is terminated. For learning purposes, it is usually fine to leave this enabled, but for production systems, you might want to preserve the data even if the instance is accidentally deleted.

Maximize Your Storage: Since you can use up to 30 GB for free, consider allocating the full amount to give yourself more room for applications, databases, and files. There is no benefit to starting with less storage. You might as well take advantage of the full free tier allocation. If you later need more space, you can expand the volume, though that process requires some additional steps. Starting with the maximum free tier amount gives you more flexibility and headroom as your project grows.
9
Configure storate for EBS volume

7Launch Instance

Once you have completed all the configuration steps, take a moment to review the summary panel on the right side of the screen. This summary provides a comprehensive overview of all the choices you have made: your instance name, the selected AMI (operating system), the instance type, your key pair name, the configured security groups, and your storage specifications. This is your last chance to verify everything before launching, so check carefully to ensure all settings match your requirements.


Pay special attention to confirming that you have selected free tier eligible options where available. Look for the small Free-tier-eligible badges next to the AMI and instance type. Verify that your security group rules are configured correctly for your use case, and double-check that you have successfully created and downloaded your key pair (you will not get another chance to download it). Once you are satisfied with your configuration, click the Launch Instance button to bring your virtual server to life.


After clicking the launch instance button, Aws immediately begins provisioning your instance. You will see a success message with a confirmation screen displaying your instance ID. The entire provisioning process is remarkably fast. Your instance will typically be up and running within 30 to 60 seconds, though it may take another minute or two to complete all initialization checks.


Once your instance is running, you can access all its details from the EC2 dashboard. The Details tab provides essential information including the public IP address of your instance (which you will use to connect via SSH and to point your domain), private IP address, instance state, launch time, and more. The Storage tab shows information about your attached EBS volume, including its size, type, and device name. You can also find tabs for monitoring (showing CPU usage, network traffic, and other metrics), security settings, and networking configuration. Bookmark or take note of your public IP address. You will need it for the next steps.

10
Launch the EC2 instance after configuration set up

8Point Your Domain to the EC2 Instance

Now comes the exciting part. It is connecting your custom domain name to your EC2 instance so that people can access your website using a memorable address like www.yoursite.com instead of a cryptic IP address. A domain name is the identity of your site on the internet, and properly configuring it to point to your server is essential for creating a professional web presence.

First, you will need to have a domain name registered with a domain registrar website (a company authorized to reserve domain names on your behalf. Such as NameCheap or Godaddy). Popular domain registrars include Namecheap, GoDaddy, Google Domains, Hover, and many others. Each offers similar services but may vary in pricing, user interface, and additional features. Domain names typically cost between $10 to $15 per year for common extensions like .com, .net, or .org, though prices can vary based on the specific domain and extension you choose.

Once you have your domain, you will need to configure its DNS (Domain Name System) settings to point to the public IP address of your EC2 instance. DNS is essentially the phone book of internet. It translates human-friendly domain names into machine-readable IP addresses. The moment when someone types your domain name into their browser, DNS servers around the world work together to look up the associated IP address and direct the browser to your server.

To complete the DNS configuration, log into the control panel of your domain registrar, and navigate to the DNS management section (sometimes called DNS-settings, name-server-management, or similar). Here, you will need to create an A Record (Address Record), which directly maps your domain name to an IP address. The process typically involves:

  • Accessing DNS Management: Log into the control panel f your domain registrar and locate the DNS or name server settings for your domain. The exact location varies by provider, but it is usually under a section labeled DNS, or DNS Settings, or Advanced DNS, or Manage DNS.
  • Creating an A Record: Add a new DNS record of type A (which stands for Address). In the Host or Name field, enter @(which represents your root domain) or www (for www.yourdomain.com), or leave it blank depending on the interface of your registrar. In the Value or Points-to field, enter the public IP address of your EC2 instance exactly as it appears in the AWS console. Set the TTL (Time To Live) to a reasonable value like 3600 seconds (1 hour) or use the default.
  • Creating Additional Records (Optional): You might want to create multiple A-records, one for the root domain (@) and another for the www subdomain, to ensure your site is accessible both with and without www in the URL. You can also create a CNAME record to alias one name to another, though for pointing directly to an IP address, A records are the standard approach.
  • Saving and waiting for Propagation: After creating your DNS records, save the changes. Now comes the waiting game. DNS changes do not happen instantly across the internet. DNS propagation is the process by which DNS servers around the world update their caches with your new information. This typically takes 15 minutes to 48 hours, though changes often become visible within a few hours. During this period, some people might see your new site while others still see the old configuration (or nothing at all).
DNS changes can take time to propagate globally. You can check the status using online DNS propagation checkers like whatsmydns.net or dnschecker.org, which query DNS servers from multiple locations worldwide to show you how far your changes have spread. Now there is nothing wrong if it takes several hours for DNS to fully propagate. Avoid making repeated changes during this period, as that can confuse DNS servers and potentially extend the propagation time. Once propagation is complete, visitors from anywhere in the world will be able to access your EC2 instance by typing your domain name into their browser.

🎯 Conclusion

Congratulations! You have successfully navigated the process of configuring and launching your first Amazon EC2 instance. This is a significant milestone in your cloud computing journey. Your accomplishment here forms the foundation for countless possibilities in modern web development and application deployment. From small personal projects to the beginnings of scalable enterprise applications, your EC2 instance is now ready to serve whatever purpose you envision.

Throughout this guide, we have learned essential cloud computing concepts and practical skills that extend far beyond just launching a server. You now understand how to navigate the Aws console, configure security settings, manage storage resources, and connect custom domains to cloud infrastructure. These skills are increasingly valuable in the technology landscape of today, where cloud computing has become the standard for hosting and deploying applications of all sizes.

Your journey does not end here. In fact, it is just the beginning. Now that your instance is running, you have a powerful, internet-connected server at your disposal. The next logical steps might include connecting to your instance via SSH using the key pair you created, installing a web server like Apache or Nginx, setting up a database, deploying your first application, or configuring SSL/TLS certificates to enable HTTPS. Each of these topics opens up new learning opportunities and expands what you can accomplish with your cloud infrastructure.

🚀 Next Step

Here are some recommended next steps to continue building on what you have learned:

  • Connect via SSH: Use your private key to establish a secure connection to your instance and explore the Ubuntu environment.
  • Install a web werver: Set up Apache, Nginx, or another web server to start hosting web content.
  • Deploy Your First Application: Upload and configure a website, web application, or API on your new server.
  • Set Up SSL/TLS: Use Certbot to obtain free SSL certificates and enable HTTPS for secure connections.
  • Implement Backups: Learn how to create EBS snapshots to back up your data and protect against data loss.
  • Explore Other Aws Services: Discover complementary services like RDS for databases, S3 for storage, or Cloudwatch for monitoring.
  • Optimize and Secure: Implement best practices for security hardening, regular updates, and performance optimization.

Remember that Aws free tier gives you 12 months to experiment and learn without worrying about costs (as long as you stay within the free tier limits). Take advantage of this generous offering to try different configurations, break things (in a safe learning environment), and discover what works best for your needs. The hands-on experience you gain will be invaluable as you continue developing your cloud computing skills.

Cloud computing represents a fundamental shift in how we think about infrastructure and application deployment. By completing this tutorial, you have taken an important step toward understanding and leveraging these powerful technologies. Now whether you are building a personal blog, developing the next great startup idea, or expanding your professional skill set, the foundation you have built today will serve you well. Keep exploring, keep learning, and most importantly, keep building!

🎉 You Did It!

Your EC2 instance is now up and running, ready to host your ideas and projects.

Leave a Comment

Your email address will not be published. Required fields are marked *

Index
Scroll to Top