Hey everyone! I'm just getting started with AWS and DevOps, and I need some help. I'm working on a Java Spring application that includes five separate services, databases, and a Kafka broker, all set up using Docker containers. What's the most straightforward and beginner-friendly method to deploy this entire setup on AWS? Any advice would be appreciated!
5 Answers
For your Java Spring app, I recommend containerizing it and then using AWS ECS (Elastic Container Service) behind a load balancer. If you're expecting low traffic, you can deploy all your containers within the same tasks to save costs, or even consider deploying it as a single container monolith. For your databases and Kafka, AWS offers managed versions like RDS for databases and MSK for Kafka, which can save you a lot of hassle. It's best to use CloudFormation or CDK for deployment instead of the AWS console.
You might also want to look into AWS AppRunner. It's similar to ECS and Fargate, but a bit more limited and easier to set up.
One last tip: If you want to see a demo, I’ve done a similar setup for a PHP-based app, which you can check out here: https://youtu.be/_69HsZjn-DY.
Totally agree with TechieTom! I'm a fan of Terraform, but CloudFormation works great too. My approach is to update the microservice images and trigger new ECS deployments through GitHub Actions. Also, pay attention to your VPC setup—you’ll want to plan your networking and connections before diving into other aspects. Security groups and WAF configuration with your ALB are key, especially if you're not using Cognito for auth.
Check out ECS with Fargate! It's a really beginner-friendly option, as it takes care of scaling and server management for you.
Yeah, I agree! Fargate is perfect for getting started without worrying about the underlying infrastructure.