Spring Boot Microservices in AWS CodeStar

Spring Boot Microservices in AWS CodeStar
Posted : October 11th, 2018

AWS CodeStar is a managed service from AWS that lets us quickly develop, build & deploy C#, Go, HTML, Java, Node.js, PHP, Python & Ruby apps. This article explores using CodeStar to build Spring Boot microservices.

We begin at the CodeStar home page at https://console.aws.amazon.com/codestar/home. Create a New Project & choose the Java Spring Lambda Web Service template:

Enter Project Name & ID & click Next:

Review Project Details & Create Project:

Select AWS Cloud9 as our Code Editor & click Next:

Click Next:

We now arrive at our Project Dashboard. Wait for the Cloud9 environment to finish creating. Once that’s done, we need a way to try out our brand new microservice. Add the App Endpoints tile to the Dashboard:

Open the App Endpoint in a new tab to see the output:

    "Output": "Hello World!"

Let’s try changing this! To get to our code, switch to the IDE tab & click Open IDE:

In the IDE, open HelloWorldHandler.java & change “Hello World!” to “Hello World 2!”:

Do the same in HelloWorldHandlerTest.java:

Commit & Push these changes:

Wait a few minutes for the automated Build & Deployment to finish. Now reopen the App Endpoint to see the change we made:

    "Output":"Hello World 2!"

This was a simple example demonstrating the power of CodeStar. The code can be further elaborated to create full-fledged microservices!


(Part 1/6 in AWS series)


02 AUG 2021
AWS Named as a Leader for the 11th Consecutive Year…
Know More
27 JUL 2021
Introducing Amazon Route 53 Application Recovery Controller
Know More
09 JUN 2021
Amazon SageMaker Named as the Outright Leader in Enterprise MLOps…
Know More