Posts

Showing posts with the label AWS for Beginners

Deploy Spring Boot Application on AWS EC2 (Step-by-Step)

Deploying a Spring Boot application on AWS EC2 is one of the easiest ways to host your Java backend in the cloud. In this guide, you will build a JAR file, copy it to an EC2 instance, install Java, run the app, expose port 8080, and keep the application running in the background using nohup . Overview of the Deployment Flow A Spring Boot REST API runs locally on port 8080 An EC2 instance (Amazon Linux, t2.micro) runs in AWS You build a JAR from the Spring Boot project You SSH into EC2 and copy the JAR You install Java 17 and run the JAR file You open port 8080 in the security group After deployment, anyone can access your API using the instance's public IP or DNS . Step 1: Create & Test a Simple Spring Boot App Start with Spring Initializr: Maven project Java 17 Packaging: JAR Dependency: Spring Web Create a simple REST API: @RestController public class HelloController { @GetMapping("/hello") public Str...

AWS EC2 - Elastic Compute Cloud Explained

Amazon EC2 (Elastic Compute Cloud) is one of the most popular AWS services that provides virtual servers (called instances ) in the cloud. You can launch Linux or Windows machines on demand, deploy your applications, and pay only for the compute power you use. What is EC2? EC2 is a cloud service that lets you create and manage virtual servers. These servers come with CPU, RAM, storage, and networking capabilities like a physical machine, but without owning any hardware. You can launch, scale, or delete instances within seconds. AWS even provides free-tier eligible instances (like t2.micro or t3.micro ) for the first 12 months, making it perfect for beginners. Why use EC2 instead of physical servers? No hardware purchase or maintenance Launch servers in minutes Scale up or down instantly Pay only while the instance is running Highly reliable and secure AWS infrastructure Key EC2 Concepts: AMI, Instance Type, Key Pair, Security Group 1. AMI (Amazon Mach...

AWS S3 - Simple Storage Service Explained

Amazon S3 (Simple Storage Service) is one of the most important and widely used AWS services. It is a highly scalable, durable, and secure object storage service where you can store any type of file—images, videos, PDFs, logs, backups, or application data. Whether you're building a web application, mobile backend, analytics pipeline, or simply need cloud storage, S3 is often the first service developers work with. What is Amazon S3? Amazon S3 is an object storage service , which means data is stored as objects inside containers called buckets . Unlike traditional file systems, S3 is designed for: High durability (99.999999999%) High scalability Global availability It is ideal for storing: Images, videos, and documents Application uploads Static website assets Logs and analytics data Backups and archives S3 is accessible from anywhere over the internet or directly from AWS applications and services. Key Concepts: Bucket, Object, Key, Regi...