<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Maheshsable on Medium]]></title>
        <description><![CDATA[Stories by Maheshsable on Medium]]></description>
        <link>https://medium.com/@maheshsable55?source=rss-a35b536ceae2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VFUIS-Nkg-nBvAKu</url>
            <title>Stories by Maheshsable on Medium</title>
            <link>https://medium.com/@maheshsable55?source=rss-a35b536ceae2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:51:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maheshsable55/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How To Optimized an AWS CI/CD Pipeline for Faster Deployments]]></title>
            <link>https://medium.com/@maheshsable55/how-to-optimized-an-aws-ci-cd-pipeline-for-faster-deployments-5c0664c2e2d6?source=rss-a35b536ceae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c0664c2e2d6</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-pipeline]]></category>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[aws-codebuild]]></category>
            <dc:creator><![CDATA[Maheshsable]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 05:16:13 GMT</pubDate>
            <atom:updated>2026-10-29T05:20:13.174Z</atom:updated>
            <content:encoded><![CDATA[<p>CI/CD pipelines often become slower over time as more tests, security scans, build steps, and deployment checks are added.</p><p>Recently, I worked on optimizing an <strong>AWS-based CI/CD pipeline</strong>. Instead of simply increasing compute resources, I focused on a simpler principle:</p><p><strong><em>Run the right check at the right stage, cache what can be reused, and avoid doing the same work twice.</em></strong></p><p>Here are the key improvements.</p><h3>1. Separate Quality Checks from Deployment</h3><p>One of the most useful changes was separating <strong>code validation</strong> from <strong>application deployment</strong>.</p><p>The quality workflow handles:</p><ul><li>Unit tests</li><li>Integration tests</li><li>Testcontainers-based tests</li><li>Code coverage</li><li>SonarQube analysis</li><li>Quality gates</li></ul><p>The deployment workflow remains focused on:</p><ul><li>Gradle build and packaging</li><li>Docker image creation</li><li>Amazon ECR push</li><li>Amazon ECS deployment</li></ul><p>This avoids repeating expensive tests during deployment while still keeping quality checks in the development lifecycle. The pipeline analysis also identified repeated Gradle execution and integration-test overhead as optimization opportunities.</p><h3>2. Use Gradle Caching Effectively</h3><p>Repeated dependency downloads and unchanged compilation tasks waste build time.</p><p>Using the <strong>Gradle build cache</strong> and caching Gradle dependencies in <strong>AWS CodeBuild</strong> allows reusable outputs to survive across suitable builds.</p><p>In my optimization work, cached Gradle tasks were observed being restored with FROM-CACHE, confirming that reusable work was being avoided.</p><h3>3. Take Advantage of Docker Layer Caching</h3><p>A Docker image does not need to be rebuilt completely when only a small part of the application changes.</p><p>Structuring the Dockerfile correctly and enabling <strong>Docker layer caching</strong> allows unchanged layers to be reused.</p><p>Combined with <strong>Amazon ECR</strong>, this significantly reduces unnecessary Docker build work. The optimized builds showed cached Docker steps and reuse of existing ECR layers.</p><h3>4. Run Security Scanning Strategically</h3><p>Dependency scanning is important, but an expensive vulnerability scan does not necessarily need to run identically on every pipeline execution.</p><p>A better strategy is to define appropriate scanning points, such as:</p><ul><li>Pull requests or controlled branches</li><li>Main/release branches</li><li>Scheduled security scans</li></ul><p>This maintains security visibility without unnecessarily slowing every developer feedback cycle. Dependency scanning was one of the significant sources of pipeline overhead identified during the analysis.</p><h3>5. Optimize Amazon ECS Deployment</h3><p>Build optimization is only half the story.</p><p>For services deployed to <strong>Amazon ECS behind an Application Load Balancer</strong>, review:</p><ul><li>ALB health-check configuration</li><li>Healthy threshold</li><li>Health-check interval</li><li>ECS health-check grace period</li><li>Target deregistration delay</li></ul><p>These settings should be tuned carefully, especially in production. Overly conservative settings can make a healthy application wait unnecessarily during deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c0664c2e2d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Integrate CycloneDX SBOM into Java/Gradle and AWS CodeBuild]]></title>
            <link>https://medium.com/@maheshsable55/integrated-sbom-into-java-gradle-services-ad6d45fdd9b7?source=rss-a35b536ceae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad6d45fdd9b7</guid>
            <dc:creator><![CDATA[Maheshsable]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 10:29:45 GMT</pubDate>
            <atom:updated>2026-10-27T10:25:28.100Z</atom:updated>
            <content:encoded><![CDATA[<h3>A practical guide to generating CycloneDX SBOMs, defining component information, and integrating SBOM tracking into CI/CD</h3><p>Modern Java applications depend on many open-source libraries. Knowing exactly which components and versions are included in a release is important for vulnerability management, compliance, and software supply-chain security.</p><p>A <strong>Software Bill of Materials (SBOM)</strong> provides this visibility by creating a machine-readable inventory of the components included in an application.</p><p>In this article, I’ll walk through a practical approach for integrating <strong>CycloneDX SBOM generation into a Java/Gradle application</strong> and then using the generated SBOM in an <strong>AWS CodeBuild pipeline</strong>.</p><p>The integration follows this simple flow:</p><p><strong>Gradle Build → Generate SBOM → Define Component → Upload SBOM → Deploy Application → Mark Version as Deployed</strong></p><h3>1. Add CycloneDX to Gradle</h3><p>The first step is to enable SBOM generation in build.gradle.</p><h4><strong>plugins {<br> id “org.cyclonedx.bom” version “2.0.0”<br>}</strong></h4><p>Then configure the SBOM:</p><h4><strong>cyclonedxBom {<br> projectType = “application”<br> schemaVersion = “1.4”<br> componentVersion = version<br> outputFormat = “json”<br> includeBomSerialNumber = true<br>}</strong></h4><p>This allows Gradle to generate a CycloneDX SBOM containing information about the application and its dependencies.</p><p>Generate it using:</p><p><strong>./gradlew cyclonedxBom</strong></p><p>A typical output is:</p><p>build/reports/bom.json</p><p>This file becomes the dependency manifest that can be stored or uploaded to an SBOM inventory platform.</p><p><strong>2. Create a Dedicated SBOM Gradle Task:</strong></p><p>tasks.register(“sbom”) {<br> description = “Generates the CycloneDX SBOM”<br> group = “reporting”<br> dependsOn “cyclonedxBom”</p><p>doLast {<br> File bom = file(“${buildDir}/reports/bom.json”)</p><p>if (bom.exists()) {<br> println “SBOM generated: ${bom.absolutePath}”<br> }<br> }<br>}</p><p>Now SBOM creation becomes a simple command:</p><p>./gradlew sbom</p><p>This also gives developers an easy way to verify the integration locally before adding it to CI/CD.</p><h3>3. Define the SBOM Component Identity</h3><p>Generating bom.json is only part of the integration.</p><p>The SBOM also needs to be associated with the correct application component.</p><p>For example:</p><p>env:<br> variables:<br> NAMESPACE_ID: “my-namespace”<br> APP_ID: “my-application”<br> APP_COMPONENT_REF: “backend-service”</p><p>These values provide a logical hierarchy:</p><p>Namespace<br> └── Application<br> └── Component</p><p>For example:</p><p>engineering<br> └── order-management<br> └── order-api</p><p>The important point is that <strong>APP_COMPONENT_REF should uniquely identify the deployable component whose dependencies are represented by the SBOM</strong>.</p><p>This makes the same approach reusable across multiple services.</p><h3>4. Create an Immutable Version Reference</h3><p>Each generated SBOM should also be associated with the exact source version that produced it.</p><p>In <strong>AWS CodeBuild</strong>, a useful approach is:</p><p>pre_build:<br> commands:<br> — VERSION_REF=”$CODEBUILD_RESOLVED_SOURCE_VERSION”<br> — echo “SBOM version reference: $VERSION_REF”</p><p>VERSION_REF can then be used when uploading and later marking the component as deployed.</p><p>The relationship becomes:</p><p>Component<br> └── Version / Commit<br> └── bom.json</p><p>This provides an important traceability chain:</p><p><strong>Source commit → Build → SBOM → Deployment</strong></p><p>One recommendation is to keep the Docker image tag and SBOM version identity logically separate.</p><p>For example:</p><p>TAG_VERSION=”v1.4.2&quot;<br>VERSION_REF=”$CODEBUILD_RESOLVED_SOURCE_VERSION”</p><p>TAG_VERSION is useful for operational readability, while VERSION_REF provides immutable source traceability.</p><h3>5. Generate the SBOM in CodeBuild</h3><p>Once the Gradle configuration is ready, SBOM generation can be added to buildspec.yml.</p><p>A simplified example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*S-V2rrxc5JfKHJcD0zlPmQ.png" /></figure><p>The test command is small but useful:</p><p><strong>test -f build/reports/bom.json</strong></p><p>If the expected SBOM was not generated, the pipeline fails rather than continuing with a missing artifact.</p><h3>6. Upload the SBOM</h3><p>After generation, the SBOM can be compressed before uploading:</p><p><strong>cd build/reports<br>gzip -k bom.json</strong></p><p>This produces:</p><p><strong>bom.json.gz</strong></p><p>A generic upload structure might look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*gLkxn7fHRXHqH7cU1y5IOw.png" /><figcaption>Authentication will depend on the target platform.</figcaption></figure><p>For AWS-hosted APIs, the request can also use <strong>AWS Signature Version 4 (SigV4)</strong> and temporary credentials rather than embedding long-lived credentials in the pipeline.</p><p>The key idea is the URL structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*K8y1zBlr1uRl11v6UyY_sA.png" /></figure><p>This allows the inventory platform to store multiple components and versions independently.</p><h4><strong>7. Mark the Same Version as Deployed</strong></h4><p>Uploading an SBOM tells us:</p><p>This version exists.</p><p>But deployment tracking should tell us:</p><p>This exact version is currently deployed in this environment.</p><p>After a successful deployment, the same VERSION_REF can therefore be used to update the deployment state.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*fKPxyCGNMarVNn4w_B_sLw.png" /></figure><p>Where:</p><p><strong>STAGE=”dev”</strong></p><p>The important rule is:</p><p><strong>Generate → Upload → Deploy → Mark Deployed</strong></p><p>Do not mark an SBOM version as deployed before the application deployment has completed successfully.</p><h3>8. Complete CodeBuild Flow</h3><p>The resulting pipeline is straightforward:</p><p>version: 0.2</p><p>env:<br> variables:<br> NAMESPACE_ID: “my-namespace”<br> APP_ID: “my-application”<br> APP_COMPONENT_REF: “backend-service”</p><p>phases:</p><p>pre_build:<br> commands:<br> — VERSION_REF=”$CODEBUILD_RESOLVED_SOURCE_VERSION”<br> — echo “Version: $VERSION_REF”</p><p>build:<br> commands:<br> — ./gradlew clean build<br> — ./gradlew sbom<br> — test -f build/reports/bom.json</p><p>- gzip -k build/reports/bom.json</p><p>- echo “Uploading SBOM”<br> # Upload bom.json.gz to the SBOM inventory</p><p>post_build:<br> commands:<br> — echo “Deployment completed”</p><p># Mark the same VERSION_REF as deployed</p><p>In a production pipeline, the upload and deployment-marking commands should use the authentication mechanism required by the target SBOM inventory service.</p><h3>9. What the Integration Achieves</h3><p>After implementation, every successful release can have a direct relationship between:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*i9qLc45gze3JRlytc_gsEA.png" /></figure><h3>10. Recommended Integration Pattern</h3><p>For Java/Gradle services, I recommend keeping the integration simple:</p><ol><li>Add the <strong>CycloneDX Gradle plugin</strong>.</li><li>Configure cyclonedxBom.</li><li>Create a dedicated sbom task.</li><li>Define the application’s <strong>namespace, application ID, and component reference</strong>.</li><li>Use the source commit as an immutable VERSION_REF.</li><li>Generate bom.json during every CI build.</li><li>Validate that the SBOM exists.</li><li>Upload the SBOM to the inventory platform.</li><li>Deploy the application.</li><li>Mark the <strong>same </strong><strong>VERSION_REF</strong> as deployed only after successful deployment.</li></ol><h3>Final Thoughts</h3><p>SBOM integration does not need to make the build pipeline complicated.The most important part is maintaining a consistent relationship between:</p><p><strong>Application → Component → Source Version → SBOM → Deployment Stage</strong></p><p>Once this relationship is automated in Gradle and CI/CD, the SBOM stops being just another generated report. It becomes part of the application’s release metadata and provides continuous visibility into the software components running across environments.</p><p>For teams already using <strong>Java, Gradle, CycloneDX, and AWS CodeBuild</strong>, this pattern can be introduced with relatively small build and pipeline changes while providing a meaningful improvement in software supply-chain traceability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad6d45fdd9b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>