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:
- Visit aws.amazon.com
- Click “Create an AWS Account”
- Follow the registration process
- Provide payment information (required even for free tier services)
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.
Domain Registrar (Optional but Recommended)
While not strictly required, having a custom domain makes your application look more professional. You can register domains through:
- AWS Route 53
- Namecheap
- GoDaddy
- Cloudflare
- Any other domain registrar
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 -versionIf 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 -versionGradle:
# Check Gradle installation
gradle -versionIf 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 -VGit
Version control is essential for managing your Spring Boot project:
# Check Git installation
git --versionIf 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)
AWS CLI (Recommended)
While not strictly required, the AWS CLI can be helpful for advanced configurations:
# Check AWS CLI installation
aws --versionInstall from AWS CLI documentation.
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.propertiesorapplication.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:
@RestControllerand@RequestMapping - HTTP Methods: GET, POST, PUT, DELETE
- JSON Serialization: Jackson integration in Spring Boot
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
File Permissions
Understanding Linux file permissions and ownership:
# Change file permissions
chmod 755 filename
# Change ownership
sudo chown user:group filenameService 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-nameNetwork 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:
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.