Prerequisites

Lecture Slides

Either click on the slide area below or click here to view it in fullscreen. Use your keypad to navigate the slides.

A PDF printable handout version of the slides is available here

Introduction

Before diving into deploying Spring Boot applications to AWS Lightsail, it’s essential to ensure you have all the necessary tools, accounts, and foundational knowledge in place. This lesson will walk you through everything you need to get started successfully.

Required Accounts and Services

AWS Account

You’ll need an active AWS account to create and manage Lightsail instances. If you don’t have one:

  1. Visit aws.amazon.com
  2. Click “Create an AWS Account”
  3. Follow the registration process
  4. Provide payment information (required even for free tier services)
NoteAWS Free Tier

AWS Lightsail offers a free tier that includes 750 hours of usage per month for the first month, which is perfect for learning and testing deployments.

Development Environment Setup

Java Development Kit (JDK)

Ensure you have JDK 17 or later installed on your development machine:

# Check your Java version
java -version
javac -version

If you need to install or update Java: - Windows/macOS: Download from Oracle or use OpenJDK - Linux: Use your package manager (e.g., sudo apt install openjdk-17-jdk)

Maven or Gradle

You’ll need a build tool to package your Spring Boot application:

Maven:

# Check Maven installation
mvn -version

Gradle:

# Check Gradle installation
gradle -version
TipSpring Boot CLI Alternative

If you prefer, you can use the Spring Boot CLI for rapid prototyping, though we’ll primarily use Maven/Gradle in this course.

Integrated Development Environment (IDE)

While any text editor works, these IDEs provide excellent Spring Boot support:

  • IntelliJ IDEA (Community or Ultimate)
  • Visual Studio Code with Java extensions
  • Eclipse with Spring Tools Suite
  • Spring Tool Suite (STS)

Command Line Tools

SSH Client

You’ll need SSH access to connect to your Lightsail instance:

  • Windows: Built-in OpenSSH (Windows 10+), PuTTY, or Windows Subsystem for Linux (WSL)
  • macOS/Linux: Built-in OpenSSH client

Test SSH availability:

ssh -V

Git

Version control is essential for managing your Spring Boot project:

# Check Git installation
git --version

If not installed:

  • Windows: Download from git-scm.com
  • macOS: Install via Homebrew (brew install git) or Xcode Command Line Tools
  • Linux: Use your package manager (sudo apt install git)

Spring Boot Knowledge Prerequisites

Core Spring Boot Concepts

You should be familiar with:

  • Spring Boot Starters: Understanding how to include dependencies
  • Application Properties: Using application.properties or application.yml
  • Profiles: Development vs. production configurations
  • Auto-configuration: How Spring Boot automatically configures components
  • Embedded Servers: Understanding Tomcat, Jetty, or Undertow

Database Integration

Basic knowledge of:

  • Spring Data JPA: Entity mapping and repository patterns
  • Database Connections: JDBC URLs and connection pooling
  • Migration Tools: Flyway or Liquibase (helpful but not required)

RESTful Services

Understanding of:

  • REST Controllers: @RestController and @RequestMapping
  • HTTP Methods: GET, POST, PUT, DELETE
  • JSON Serialization: Jackson integration in Spring Boot
NoteSample Application

Don’t worry if you don’t have a Spring Boot application ready—we’ll work with a sample application that demonstrates all these concepts throughout the course.

Basic Linux and Server Administration

Command Line Navigation

You should be comfortable with basic Linux commands:

# File and directory operations
ls, cd, mkdir, rm, cp, mv

# File viewing and editing
cat, less, nano, vi

# Process management
ps, kill, systemctl

# Network utilities
curl, wget, netstat

File Permissions

Understanding Linux file permissions and ownership:

# Change file permissions
chmod 755 filename

# Change ownership
sudo chown user:group filename

Service Management

Basic knowledge of systemd services (we’ll cover this in detail later):

# Service operations
sudo systemctl start service-name
sudo systemctl enable service-name
sudo systemctl status service-name

Network and Security Basics

Understanding Ports

Familiarity with common ports:

  • HTTP: 80
  • HTTPS: 443
  • SSH: 22
  • MySQL: 3306
  • Spring Boot Default: 8080

Firewall Concepts

Basic understanding of:

  • Inbound vs. Outbound Rules: Controlling traffic direction
  • Port Ranges: Allowing specific ports or ranges
  • Source Restrictions: Limiting access by IP address

Pre-Deployment Checklist

Before starting the deployment process, ensure you have:

TipTesting Your Setup

Create a simple “Hello World” Spring Boot application and run it locally to ensure your development environment is working correctly before proceeding to AWS deployment.

What’s Next

With these prerequisites in place, you’re ready to begin the deployment journey. In the next section, we’ll start by configuring development and production profiles in your Spring Boot application, setting the foundation for a smooth deployment process.

Summary and Key Takeaways

  • AWS Account: Essential for creating Lightsail instances
  • Development Tools: JDK 17+, Maven/Gradle, and a good IDE
  • Command Line Skills: SSH, Git, and basic Linux commands
  • Spring Boot Knowledge: Profiles, configuration, and basic web development
  • Server Basics: Understanding ports, services, and file permissions

Having these prerequisites covered ensures you can follow along with confidence and troubleshoot issues independently. Take time to verify each requirement before moving forward—it will save you time and frustration in the later stages of deployment.