Posts

Showing posts from April, 2026

Deploying a Java Code using AWS EC2

Image
  In this post, we will see how to deploy the JAR on a EC2 instance with Auto Scaling Group with Load Balancer. We can do the same using AWS Code Deploy with orchestration using AWS Code Pipeline. We are taking a different path. In the previous post, https://rsinfomindss.blogspot.com/2026/04/aws-codebuild.html  Once the build is stored in the S3. We have to perform the below steps in a EC2 instance to run the code. 1)        Download Java. 2)        Create a folder for the application. 3)        Download the JAR from S3. 4)        Start the JAR. I will start with creating a Launch Template. Refer to https://rsinfomindss.blogspot.com/2023/04/aws-launch-template.html  Make sure IAM EC2 instance profile is create with the permission to download S3 objects (JAR) from the EC2 instance. Refer to example below. S3 bucket "demo-java-application-a...

AWS CodeBuild

Image
  AWS CodeBuild is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy.   With CodeBuild, you don’t need to worry about provisioning and managing your own building infrastructure.   You simply provide your build project’s source code and build settings, and CodeBuild handles the rest. With AWS Code Deploy, you can avoid the manual process of deploying code, reduce the risk of errors and downtime, and improve the overall efficiency of your deployment process. For example, if you have a web application that you want to deploy , you can use CodeBuild to compile your source code, run unit tests, and produce a deployable package.   What is Buildspec file for Codebuild? The Buildspec file is a configuration file used by AWS CodeBuild to define how to build and deploy your application or software project. It is written in YAML or JSON format and contains ·     ...

AWS Code Commit with Git Basics

Image
AWS Code Commit is a fully managed, secure, private Git repository service used to store, version, and collaborate on source code and other assets. It eliminates the need to host your own Git server and integrates tightly with AWS services. Let's start with creating a code commit repository from the AWS Console: Repository name is " book " and I am going to create a file from the console by the name called " facts.txt " with the below content. Here is the commit message for the file. Now, our file is ready. Take a note at the " Reference " as " main " which shows the file is created under main branch. No need to worry about the terms branch, commit and others. This series covers it. Now, our file is ready. Consider the file under the "main" branch is the ONE VIEWED/USED by everyone. Now, we have been asked to make changes to the file. Change the numbers from 8,848.86 to ~ 9,000 meters. In real, no organization allows to make chan...