<?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 Doğukan Özdemir on Medium]]></title>
        <description><![CDATA[Stories by Doğukan Özdemir on Medium]]></description>
        <link>https://medium.com/@dogukanozdemir?source=rss-a25e8bccbad1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*x3ptMkf4090r3G3pMXrf3A.png</url>
            <title>Stories by Doğukan Özdemir on Medium</title>
            <link>https://medium.com/@dogukanozdemir?source=rss-a25e8bccbad1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 23:54:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dogukanozdemir/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[Ultimate Guide to AWS & CI / CD With Spring Part 2]]></title>
            <link>https://awstip.com/ultimate-guide-to-aws-with-spring-part-2-945dcbf2c9b2?source=rss-a25e8bccbad1------2</link>
            <guid isPermaLink="false">https://medium.com/p/945dcbf2c9b2</guid>
            <category><![CDATA[aws-codepipeline]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[elastic-beanstalk]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Doğukan Özdemir]]></dc:creator>
            <pubDate>Wed, 31 May 2023 10:40:25 GMT</pubDate>
            <atom:updated>2023-06-03T15:47:14.663Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy your Spring app on AWS with a full-fledged CI/CD pipeline and SSL domain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w7k1CZNolhcBaV93bL88Ow.jpeg" /></figure><p>Welcome to Part 2 of the <strong>Ultimate Guide to AWS With Spring</strong>! In this section, we’ll focus on creating a <strong>CI/CD Pipeline to set up automated deployment to Elastic Beanstalk</strong> whenever we push changes to our code repository.</p><p>If you haven’t read Part 1 of this guide, make sure you do, as we’ll be <strong>building on what we’ve already established.</strong></p><p>Let’s begin by <strong>connecting GitHub</strong> to CodePipeline for creating our CI/CD pipeline</p><h3><strong>Connecting GitHub to CodePipeline for Creating a CI/CD Pipeline</strong></h3><p>Open your <strong>AWS account</strong> and type <strong>CodePipeline</strong> in the search bar. Click on the CodePipeline service, and on the resulting page, click the orange <strong>Create Pipeline</strong> button.</p><p>Enter a name for your pipeline in the <strong>Pipeline </strong>name and click on<strong> Next.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*Fu9_h1kL0EWUwpnbCbATsA.png" /><figcaption>Source Github</figcaption></figure><p>In Step 2, we need to choose the source from which our application will be deployed. Select <strong>GitHub (Version 2)</strong> as the source, and some additional fields will appear. Press the orange <strong>Connect</strong> button next to the <strong>Connection</strong> field</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNIPebM-QcwInVi6Le0_HQ.png" /><figcaption>Github Connection</figcaption></figure><p>Choose a connection name and press <strong>Connect to Github.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*-1ht9pOUGVdZD2XLM1qO9w.png" /><figcaption>Github Account</figcaption></figure><p>Click on <strong>Install a new app to proceed</strong>. This will redirect you to the GitHub Login Page where you need to enter the credentials for the GitHub account that owns the repository to which you push your changes.</p><p>Once you have logged in, you will see a page from GitHub. Scroll down to the bottom of the page, where you will find the option to select t<strong>he repositories that AWS will have permission to access</strong>. You can choose to share all repositories or select specific ones.</p><p>In this case, let’s select the <strong>sample-project</strong> repository. After selecting the repository, click on <strong>Save </strong>and then click on <strong>Connect </strong>to establish the connection between <strong>AWS </strong>and <strong>GitHub</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*Wg1VuNQvRfOQEKbmzo-bAg.png" /><figcaption>Repository Selection</figcaption></figure><p>Now, Select your repository, and select the branch that will be deployed once you push changes, Click on <strong>Next.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*6krPeKHsFi7oiOvyp825SQ.png" /><figcaption>Repository and Branch</figcaption></figure><p>Okay, we are on Step 3, which is really <strong>crucial, So, pay attention. </strong>On the <strong>Build provider </strong>Select <strong>AWS CodeBuild</strong> and select a region on the next field.</p><p>After that Click on <strong>Create Project</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*PRgJaRYLP_7FR0hsYRZwdA.png" /><figcaption>CodeBuild</figcaption></figure><p>Enter a project name. In the <strong>Environment </strong>section, set the following configurations:</p><ol><li>Operating System → <strong>Amazon Linux 2</strong></li><li>Image → <strong>aws/codebuild/amazonlinux2-x86_64-standard:4.0</strong></li><li>Image Version → <strong>Always use the latest image for this runtime version</strong></li><li>Environment type → Linux</li></ol><p>Now, we need to tell AWS CodeBuild, Well, how to actually build and compile our app. This is where <strong>buildspec.yml </strong>file comes in to play.</p><p>In the Buildspec section, Select <strong>Insert build commands</strong> press on<strong> switch to editor.</strong></p><p>In the editor, copy and paste the following <strong>.yml</strong> file:</p><pre>version: 0.2<br>phases: <br>  pre_build:<br>    commands: <br>      - echo In the pre_build phase...<br>      - mvn test -Dspring.profiles.active=main<br>  build: <br>    commands: <br>      - echo Build completed on `date`<br>      - mvn package -Dspring.profiles.active=main<br>  post_build:<br>    commands:<br>      - echo Build completed on `data`<br>artifacts:<br>  files:<br>    - target/*.jar<br>  discard-paths: yes</pre><p>Couple of important points here, at 2nd line of both <strong>commands</strong> that say</p><pre>mvn test -Dspring.profiles.active=main</pre><p>and</p><pre>mvn package -Dspring.profiles.active=main</pre><p>Notice that we specify the <strong>Maven which Spring profile </strong>to use for compilation and building. In this case, the profile in the <strong>sample-project</strong> is <strong>main</strong> Please check your project’s <strong>application.properties</strong> and <strong>application-main.yml</strong> files to make the necessary changes according to your project. Click on <strong>Continue to pipeline</strong> and then <strong>Next</strong>.</p><p>We have completed the <strong>CodeBuild</strong> setup. Now, let’s move on to the final part: <strong>deployment</strong>. On the final page, choose the deployment options:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*yj4JNc0jS3dPlrab-U17Rw.png" /><figcaption>CodeDeploy</figcaption></figure><ol><li>Deploy Provider → <strong>AWS Elastic Beanstalk</strong></li><li>Region → <strong>your region of choice</strong></li><li>Application name → <strong>Select the application you created when setting up the Elastic Beanstalk Environment.</strong></li><li>Environment Name → <strong>Select your Elastic Beanstalk Environment</strong></li></ol><p>Click on <strong>Next</strong> and we are done. you should see a page similar to this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrcZGYqHRkl8AsW0nC5cDw.png" /><figcaption>Pipeline Execution</figcaption></figure><p>At this point, the pipeline will<strong> acquire the source code from the repository,</strong> <strong>build it</strong>, and finally <strong>deploy it to our Beanstalk Environment</strong>. The process usually takes around <strong>4–5 minutes</strong>, depending on the size of your project.</p><p>Now, go back to your Elastic Beanstalk Environment and you’ll notice that the environment <strong>health is failing.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wG407ejNIs2mQCvKegywpA.png" /><figcaption>EB Fail</figcaption></figure><p>This happens because Spring launches the environment <strong>on port 8080</strong> by default, but Beanstalk expects the application <strong>to run on port 5000</strong>. We need to add an environment variable to make Beanstalk launch the environment <strong>on port 5000.</strong></p><p>In your environment’s left-hand side, click on <strong>Configuration</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/178/1*OC0nlWTo5SVlIiGfi1uj-A.png" /><figcaption>EB Configuration</figcaption></figure><p>Scroll down until you see a section titled, <strong>Updates, monitoring and logging,</strong> Click on <strong>Edit.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAu-mVba4w1c5KunZskNbw.png" /><figcaption>Updates, monitoring and logging</figcaption></figure><p>Once again, scroll down to the bottom until you see the section <strong>Environment properties</strong> and Click on <strong>Add environment property</strong></p><p>Name → <strong>SERVER_PORT</strong></p><p>Value → <strong>5000</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*5Fo05dNurAg3Ccbac-VANw.png" /><figcaption>Port</figcaption></figure><p>Click on <strong>Apply, </strong>and wait a couple of minutes for Beanstalk to update your environment based on the recent changes. After the update is complete, the health should return to green.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*Ar1moJfR9rnPKiNKB_PBvA.png" /><figcaption>Success</figcaption></figure><p>To test if our services are working, we can use Postman. I’ll demonstrate using the <strong>sample-project</strong>. Open Postman and use your <strong>registered domain</strong> with <strong>https</strong> to test your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ztsdQB3tUf-PPAZ3zdBOQ.png" /><figcaption>Postman Request</figcaption></figure><p>That concludes the guide! It can be challenging to follow and implement, but if you <strong>pay attention</strong> and <strong>follow each step</strong>, you’ll be able to achieve the desired setup.</p><p>Thank you for reading this two-part guide on <strong>AWS with Spring</strong>. I hope you found it useful. If you have any questions about any part, d<strong>on’t hesitate to contact me</strong>. I would also highly appreciate any feedback you might have.</p><p>Take care!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=945dcbf2c9b2" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/ultimate-guide-to-aws-with-spring-part-2-945dcbf2c9b2">Ultimate Guide to AWS &amp; CI / CD With Spring Part 2</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ultimate Guide to AWS & CI / CD With Spring]]></title>
            <link>https://awstip.com/ultimate-guide-to-aws-ci-cd-with-spring-135fa2615ec1?source=rss-a25e8bccbad1------2</link>
            <guid isPermaLink="false">https://medium.com/p/135fa2615ec1</guid>
            <category><![CDATA[elastic-beanstalk]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Doğukan Özdemir]]></dc:creator>
            <pubDate>Tue, 30 May 2023 13:05:40 GMT</pubDate>
            <atom:updated>2023-06-03T15:47:19.045Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy your Spring app on AWS with a full-fledged CI/CD pipeline and SSL domain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92CiTC6Mr-51bSwgLuyqGA.png" /></figure><p>In the ever-evolving world of software development, deploying applications to the cloud has become a crucial aspect of building robust and scalable systems. <strong>Amazon Web Services (AWS)</strong> and the <strong>Spring framework</strong> are two powerful tools widely used in the industry, and mastering their integration can significantly enhance your development process.</p><p>This Guide is a comprehensive article series that aims to help you deploy your <strong>Spring application on AWS with a full-fledged CI/CD pipeline and SSL domain.</strong> This step-by-step guide will walk you through the process of setting up your environment, configuring AWS services, and seamlessly deploying your application while ensuring secure connections.</p><p>First things first, you need to create an <strong>AWS account.</strong> AWS requires entering your credit card information, and <strong>while some services we are going to use are not free, they are not expensive either.</strong> For example, if you have a project running with an additional RDS database, you might be charged around <strong>$4–5 a month.</strong></p><p>Secondly, this step is optional if you <strong>only</strong> want to deploy your app and have a CI/CD pipeline. However, in this tutorial, we are going to set up everything as if we are <strong>deploying a production-ready app</strong>. So, we need a domain. I bought my domain from <strong>GoDaddy (</strong><a href="https://www.godaddy.com/"><strong>https://www.godaddy.com</strong></a><strong>)</strong> and will use it to provide the path and examples. But you are free to choose whichever service you like.</p><h3><strong>Table of contents:</strong></h3><ol><li><strong>Cloning the Sample Spring App</strong></li><li><strong>Migrating your nameservers from GoDaddy to Cloudflare</strong></li><li><strong>Creating a SSL and using it with AWS ACM</strong></li><li><strong>Deploying Your Spring App to Elastic Beanstalk (EB) with SSL Properties on Load Balancer</strong></li><li><strong>Connecting GitHub to CodePipeline for Creating a CI/CD Pipeline to Elastic Load Balancer (ELB)</strong></li></ol><h3>Cloning the Sample Spring App</h3><p>I have created a Spring application for this article, and we are going to use this project as an example to deploy on AWS. It’s a simple CRUD project integrated with an H2 Database. Go ahead and clone the project to your repository to get started.</p><p><a href="https://github.com/dogukanozdemir/spring-sample-project">GitHub - dogukanozdemir/spring-sample-project</a></p><h3>Migrating your nameservers from GoDaddy to Cloudflare</h3><p>Create a free account on <strong>Cloudflare (</strong><a href="https://www.cloudflare.com/"><strong>https://www.cloudflare.com</strong></a><strong>)</strong> and set up your account. Next, add your site with your registered domain. After you have added your domain, you should see a page similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*bKvoXV3ZFGLKN1mwu6JxEw.png" /><figcaption>Cloudflare domain setup</figcaption></figure><p>Click on <strong>Review settings </strong>and complete the 3-step HTTPS configuration settings. This will ensure force HTTPS to your domain that will be connected to your ELB (Elastic Load Balancer).</p><p>Copy the Nameserver 1 and 2 and head over to your <strong>GoDaddy account → My Products → DNS </strong>and scroll down until you see <strong>Name Servers</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*plQyP_KmHWkGpxjXUfTO3A.png" /><figcaption>My Products -&gt; DNS</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yUi2xXCt-lvE-cryqNV9_Q.png" /><figcaption>Name Servers</figcaption></figure><p>Click on <strong>Change</strong> and paste the links you copied from Cloudflare. Save the changes, and on the Cloudflare page, click on <strong>Check nameservers</strong>. Just like how it states on the Cloudflare page, this migration may take a while, so sit tight.</p><h3><strong>Creating a SSL and using it with AWS ACM</strong></h3><p>After your nameservers are validated, you will need an SSL to use with your domain</p><p>Go to <strong>SSL/TLS → Origin Server → Create Certificate</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_CCa2KT07AItjEh9xasjw.png" /><figcaption>Cloudflare SSL creation page</figcaption></figure><p>Create the certificate with default settings, and you should see a page like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*oi-tNsmuzl9FMtIxEzePZA.png" /></figure><p>Copy down the <strong>Origin certificate</strong> as well as the <strong>Private Key. </strong>Afterwards, head over to this link:</p><p><a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca">Origin CA certificates · Cloudflare SSL/TLS docs</a></p><p>and scroll down until you see the Additional details section and download the PEM file that says <strong>Cloudflare Origin RSA PEM</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*jVouqHah5mKpWXsxgGDLcg.png" /></figure><p>We have officially created our SSL Certificate. Now, it’s time to import it to <strong>AWS ACM (AWS’s Certificate Manager).</strong> Go to your AWS Account, type <strong>“ACM”</strong> into the search bar, Click on <strong>Certificate Manager </strong>and from the page, choose the option to import a certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAMZEK9Ktdfpzkwtg-ALgw.png" /></figure><p>Paste the texts you acquired from Cloudflare into the respective fields: <strong>Cloudflare SSL Origin Certificate</strong> → <em>Certificate Body</em></p><p><strong>Cloudflare SSL Private Key</strong> → <em>Certificate private key.</em></p><p>Now, open the PEM file you just downloaded, copy and paste the contents of the file to the <strong>Certificate chain. </strong>Press Next until you have created the certificate. After you have created your certificate it should be issued immediately:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdQlaev-qwAa0YV6FxHOFA.png" /><figcaption>ACM Certificate Issued</figcaption></figure><h3><strong>Deploying Your Spring App to Elastic Beanstalk (EB) with SSL Properties on Load Balancer</strong></h3><p>We have created an SSL Certificate. Now, let’s create the environment that will host our app.</p><p>Go to your <strong>AWS Account → Elastic Beanstalk → Create Environment</strong></p><p>You should see a page like follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*6cxSZIjgYpfB0zR7b30dXw.png" /></figure><p>Enter an Application name and an Environment name you choose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*UuwR7kKewNDro_gI_cDfVg.png" /><figcaption>EB Settings</figcaption></figure><ol><li>Select <strong>Java </strong>as the platform,<strong> Corretto 17</strong> as the platform version, and <strong>3.4.7</strong> as the application version.</li><li>Choose to start the initial environment with a <strong>Sample Application</strong>, as we’ll integrate our actual application later using AWS CodePipeline. Select <strong>Custom configuration</strong> in Presets.</li><li>Proceed with the default settings until Step 4.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*SAhFDdxYx-s5b1ChEp_nsA.png" /><figcaption>EB Capacity</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*v2VbzZbEwOzZz2Sb0rFXtQ.png" /><figcaption>Load Balancer Type</figcaption></figure><p>In the Capacity section, select <strong>Load Balanced</strong> as the Environment type. This will create a Load Balancer instance for our environment. Make sure to choose <strong>Application load balancer</strong> as the Load Balancer Type.</p><p>In the Listener Section, Click on <strong>Add Listener.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*dHWPywnlZjmGnp0bo9vWbQ.png" /><figcaption>Listener Settings</figcaption></figure><ol><li>Listener Port → <strong>443.</strong></li><li>Listener Protocol → <strong>HTTPS</strong></li><li>SSL → From the drop-down menu, select the SSL Certificate we created on <strong>AWS ACM</strong>.</li><li>SSL policy → <strong>ELBSecurityPolicy-FS-2018–06</strong></li></ol><p>Click on Save.</p><p>Afterwards, select the default process with <strong>port 80</strong> in the <strong>Process section.</strong> Elastic Beanstalk (EB) <strong>performs a health check</strong> on the server to determine if it’s running or has failed. This check is done by<strong> sending GET requests</strong> to a specific <strong>route</strong> in your app, and the <strong>response status from the server</strong> determines <strong>it’s health.</strong></p><p>In the case of our sample project you cloned from the repository at the start of the article, which utilizes <strong>Spring Boot’s actuator module</strong>, we can leverage a <strong>pre-defined health check route</strong> provided by <strong>Spring</strong>, which is <strong>/actuator/health.</strong> By configuring EB to check this route, we can ensure that the health of our server is accurately monitored.</p><p>Click on <strong>Actions → Edit</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*1xsL77-DmkcJGT4SIr7m0w.png" /><figcaption>EB Processes</figcaption></figure><p>expand the <strong>Heath Check </strong>section.</p><p>Type <strong>/actuator/health </strong>in the<strong> Path field</strong></p><p>You can also configure the HTTP response code <strong>that AWS health check considers as healthy</strong> by changing the <strong>Health Code</strong> field. However, for now, let’s leave it as the default value of<strong> 200</strong>. Click on <strong>Save</strong></p><p>Now, we are going to be <strong>adding rules</strong> for our <strong>listener ports.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*vDQturKl0nfMyRzl6ymfQQ.png" /><figcaption>EB Rule for Port 80</figcaption></figure><p>Next, we’ll add rules for our listener ports:</p><ol><li>In the Rules section, click on <strong>Add rule</strong>.</li><li>Name → <strong>default</strong></li><li>Listener Port → <strong>80</strong></li><li>Value → <strong>/*</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*heR-mJJ2eEBkfPoyTac4gQ.png" /><figcaption>EB Rule for Port 443</figcaption></figure><p>Now, add another rule:</p><ol><li>Name → <strong>https</strong></li><li>Listener Port → <strong>80</strong></li><li>Value → <strong>/*</strong></li></ol><p>After completing these steps, your configuration should resemble the provided image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*PP3oIYtHdiu7z6qIJoyifQ.png" /><figcaption>Settings</figcaption></figure><p>Finally, click <strong>Next </strong>until you have created your <strong>Elastic Beanstalk Environment</strong>.</p><p>If you have followed all the steps correctly, when you click on the <strong>link in the domain section</strong> of the Environment, you should see your application running successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RS2y5ZdyGY5BbQssSsIN_g.png" /><figcaption>Environment Domain</figcaption></figure><p>You should see a page like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FE7_mdh9IErAGDplUvGOrw.png" /></figure><p>However, you may notice that the link in the search bar shows <strong>Not secure</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*Czu4VlxktMT1lrctsAKkUA.png" /><figcaption>Not Secure</figcaption></figure><p>Why? Didn’t we spend hours creating and importing a certificate for our app and added it when configuring Listener Ports?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*5PsX_8vjQ4M2WKiSiL2ADw.png" /><figcaption>example SSL domain</figcaption></figure><p>The Certificate states that it will provide a secure connection to the domain example.com and to it’s subdomains (<em>api.example.com, test.example.com etc.</em>)</p><p>Well, the issue lies in <strong>directing our domain or subdomain</strong> to the <strong>ELB </strong>(Elastic Load Balancer), which we haven’t done yet. But don’t worry, it’s a quick fix!</p><p>In AWS, search for <strong>Load Balancers </strong>and select the Load Balancer <strong>that was automatically created</strong> when creating our Elastic Beanstalk Environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0dQyAmU09I4T8h7Nb5d9xA.png" /><figcaption>ELB</figcaption></figure><p>After you clicked on the Load Balancer, Copy down the <strong>DNS Name.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zvQu38nA5p8bD0G57Bqk7A.png" /><figcaption>ELB DNS Name</figcaption></figure><p>Go to your <strong>Cloudflare Account → DNS → Records </strong>From the page Click on <strong>Add Record</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bdKPYQbWaevaufYCfAdqA.png" /><figcaption>DNS Records</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*urDtxITNBFiyttuWi5rUIw.png" /></figure><ol><li>Type → <strong>CNAME</strong></li><li>Name → A subdomain name of your choice, <strong>test.</strong>example.com, <strong>api</strong>.example.com or you can even leave it blank to direct it to the root domain; <strong>example.com</strong></li><li>Target → <strong>Load Balancer DNS Name we acquired from AWS</strong></li></ol><p>After that, Click on <strong>Save</strong>.</p><p>Now, <strong>visit the subdomain</strong> you just added in <strong>Cloudflare</strong>, and you should see your application <strong>running with a secure connection.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wnsI9cRLMfrE9mUNx7rGkQ.png" /><figcaption>Secure Domain Success</figcaption></figure><p>Great job! You have successfully created <strong>an SSL certificate</strong> and imported it to <strong>AWS</strong>, <strong>launched an Elastic Beanstalk environment</strong>, and created a<strong> secure subdomain directed to your Elastic Load Balancer.</strong></p><p>In the next part of this guide, we will focus on <strong>connecting your GitHub repository</strong> and <strong>creating an automated pipeline using AWS CodePipeline</strong>. This pipeline will ensure that the latest version of your application is <strong>deployed automatically whenever you push changes to the repository.</strong></p><p>Please note that the steps involved in this process can be <strong>complex</strong>. It’s important to <strong>follow the instructions carefully and apply each step accurately</strong> before proceeding to the next part. If you encounter any difficulties, don’t hesitate to drop a response and I will do my best to help.</p><p>Here’s the part 2:<br><a href="https://medium.com/@dogukanozdemir/ultimate-guide-to-aws-with-spring-part-2-945dcbf2c9b2">https://medium.com/@dogukanozdemir/ultimate-guide-to-aws-with-spring-part-2-945dcbf2c9b2</a></p><p>Good luck, and take care!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=135fa2615ec1" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/ultimate-guide-to-aws-ci-cd-with-spring-135fa2615ec1">Ultimate Guide to AWS &amp; CI / CD With Spring</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why 99% of People Fail to Learn to Code]]></title>
            <link>https://medium.com/@dogukanozdemir/why-99-of-people-fail-to-learn-to-code-4e1bf0ab4b9c?source=rss-a25e8bccbad1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e1bf0ab4b9c</guid>
            <category><![CDATA[practical]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[learn-fast]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Doğukan Özdemir]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 07:08:18 GMT</pubDate>
            <atom:updated>2023-04-11T07:08:18.943Z</atom:updated>
            <content:encoded><![CDATA[<h3>Avoid making these crucial mistakes when learning a new programming language, framework, technology etc.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xymsl4nefnf1B3BCEZSG_w.jpeg" /><figcaption>Learn Faster</figcaption></figure><p>Aren’t you tired of being stuck in tutorials, repeating every process and still failing to finish your project or understand?</p><p>Do you feel like you’re running on a hamster wheel, endlessly repeating the same processes and never making any progress? Well, fear not, because we’ve got some tricks up our sleeves that will have you zooming through technology like The Flash.</p><h3><strong>Avoid Tutorial Hell at all costs.</strong></h3><p>Oh, Tutorial Hell. It’s like being stuck in a never-ending loop of Groundhog Day, except instead of Bill Murray, you have a never-ending supply of programming tutorials. You watch, you learn, you feel like a coding genius. And then, you try to actually apply what you’ve learned, and it’s like your brain short-circuits. What gives?</p><p>Let’s say you’re learning how to build a mobile app using<strong> React Native.</strong> You stumble across a tutorial that walks you through building a simple to-do list app. <strong>You follow along</strong>, everything makes sense, you’re feeling pretty good about yourself. But then, when it’s time to actually code it yourself, <strong>your brain turns into a bowl of mashed potatoes. </strong>Suddenly, you can’t remember anything you just watched.</p><p>That’s where <strong>Tutorial Hell</strong> comes in. It’s like being stuck in a never-ending horror movie, except instead of ghosts and goblins, you have an endless stream of coding tutorials. It’s easy to get sucked in, but it’s hard to break free.</p><p>So, how do you escape? The key is to actively <strong>apply what you’re learning.</strong> Don’t just watch the tutorial and move on to the next one. Take the time to code along with it, and then try to put your own spin on it.</p><p>For example, with our to-do list app, why not try adding some <strong>new features</strong>? Maybe you could implement <strong>a system to remind you to actually do the tasks on your list</strong>. Or, if you’re feeling really adventurous, you could try adding a feature to share your to-do list with friends. The sky’s the limit!</p><p>Remember, practice makes perfect. Don’t be afraid to make mistakes and learn from them. And most importantly, don’t get stuck in Tutorial Hell — break free and start applying what you’ve learned in the real world!</p><h3>Look for tutorials that have you build something with them</h3><p>Ah, the age-old struggle of finding programming tutorials that don’t put you to <strong>sleep with basic explanations of variables and loops</strong>. Don’t get me wrong, these are important concepts to understand, but let’s face it — they’re not exactly thrilling.</p><p>What you really need is a tutorial that throws you into the deep end and forces you to learn by doing. Let’s say you’re trying to learn how to build a <strong>chat app using Node.js.</strong> Instead of a tutorial that spends <strong>an hour explaining what a variable is</strong>, look for one that has you building the app from scratch.</p><p>Imagine starting with a blank slate, and by the end of the tutorial, <strong>you have a fully functional chat app that you built yourself</strong>. Now that’s the kind of tutorial that will get your blood pumping!</p><p>When I was starting out learning to become a Backend Developer, I spent hours scouring YouTube for tutorials, but all I could find were playlists with hundreds of videos that talked about the basics of <strong>Go.</strong></p><p>Just when I was about to give up hope, I stumbled upon a video titled <strong>“Learn Go Programming by Building 11 Projects — Full Course”</strong> by FreeCodeCamp. I was skeptical at first — could it really be that easy?</p><p>But as soon as I started watching the video, I knew I had struck gold. The instructor dove right into <strong>building real-world projects</strong>, and I was able to follow along and actually build something useful.</p><p>By the end of the course, I had built 11 different projects, including <strong>A CRUD API, MYSQL Book Management System, </strong>and<strong> </strong>even a <strong>complete serverless stack.</strong> I felt a real sense of accomplishment, and it was all thanks to finding a tutorial that didn’t waste my time on basic concepts.</p><p>The point is, find tutorials that don’t just explain the basics, <strong>but have you building something from the get-go</strong>. <strong>You’ll learn by doing</strong>, which is much more engaging and memorable than just watching someone explain concepts.</p><p>And who knows, you might even surprise yourself with what you can create! Just remember to take breaks and have fun with it — programming can be frustrating at times, but it’s also incredibly rewarding when you see your creation come to life.</p><h3>Learn how to propely Google</h3><p>Ladies and gentlemen, it’s time for a little drum roll please…because we’re about to talk about the most important skill you’ll ever learn as a programmer: <strong>how to properly Google.</strong></p><p>Yes, you heard that right. Googling isn’t just about typing in a bunch of keywords and hoping for the best. It’s a skill that takes time and practice to master, but once you do, it will save you hours (if not days) of frustration and confusion.</p><p>Let’s face it — programming can be tough. And when you’re just starting out, it can feel like you’re swimming in a sea of jargon and syntax that makes no sense. That’s why being able to effectively use Google is absolutely critical.</p><p>But here’s the thing — most people suck at Googling. They don’t know how to narrow down their search results, or they give up after the first page of results doesn’t provide them with the answer they’re looking for.</p><p><strong>And that’s why 99% of people have such a hard time learning to code.</strong> It’s not because they’re not smart enough or because programming is too hard. It’s because they don’t know how to use the most powerful tool at their disposal — the almighty search engine.</p><p>Here are some examples of googling bad and good:</p><ul><li><strong>Bad: </strong>“My C# application doesn’t connect to the database”</li><li><strong>Good: </strong>“connection refused error MySQL C#”</li><li><strong>Bad: </strong>“How can I add database to my spring app”</li><li><strong>Good: </strong>“Connect Node.js to MongoDB”</li><li><strong>Bad: </strong>“How can I create a navigation bar that changes when resizing the window”</li><li><strong>Good: </strong>“Responsive navbar react example”</li><li><strong>Bad: </strong>“How to fix Spring Boot errors?”</li><li><strong>Good: </strong>“”ClassNotFound” exception spring”</li></ul><p>The just of these examples is <strong>BE SPECIFIC</strong>. pretend as if you are talking to a caveman, just put specific keywords that are relevant to your goal and issue. Don’t google as if you are talking to a human being :)</p><p>In conclusion, learning a new technology can be an intimidating task, but it doesn’t have to be a daunting one. By avoiding tutorial hell, looking for project-based tutorials, and mastering the art of Googling, you can save yourself a lot of time and frustration. Remember that programming is not just about memorizing syntax or reading a book, but it’s more about building things and solving problems. So, don’t be afraid to dive into your first project and start coding. The more you build, the better you will become. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e1bf0ab4b9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Have Been Coding Wrong, Here’s How You Can Make it Cleaner]]></title>
            <link>https://medium.com/@dogukanozdemir/you-have-been-coding-wrong-heres-how-you-can-make-it-cleaner-77bc045cf23a?source=rss-a25e8bccbad1------2</link>
            <guid isPermaLink="false">https://medium.com/p/77bc045cf23a</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[implementation]]></category>
            <category><![CDATA[programming-skills]]></category>
            <dc:creator><![CDATA[Doğukan Özdemir]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 22:23:10 GMT</pubDate>
            <atom:updated>2023-04-07T22:40:47.762Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q21cXiQ_Zztq-HWV" /><figcaption>Photo by <a href="https://unsplash.com/@cdr6934?utm_source=medium&amp;utm_medium=referral">Chris Ried</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Are you tired of looking at your code and feeling lost?</p><p>Are you struggling to understand code written by your team members or EVEN YOURSELF? Fear not! In this article, I will show you 4 ways to make your code cleaner, more maintainable, and easier to read.</p><p>By implementing these practices, you’ll take your coding skills to the next level and produce code that is a joy to work with. So, let’s get started!</p><h3>1 — Naming Naming and Naming</h3><p>What’s in a name? Well, in the world of software development, a lot. Choosing the right names for your variables, classes, and methods can make the difference between clean, readable code and a confusing mess.</p><p>Imagine you’re reading someone else’s code or coming back to your own after months or years, and you’re faced with variable names like “a”, “b”, and “c”. It’s like trying to navigate through a maze blindfolded.</p><p>So, what makes a good name? A good name should be descriptive and accurately convey the purpose or content of the variable, class, or method. It should be easy to read and understand, even for someone who is not familiar with the code.</p><p>Here’s a bad example:</p><pre>public void order(Request req){<br>    Order order = Order.builder()<br>        .name(req.getName())<br>        .mail(req.getMail())<br>        .adress(req.getAdress())<br>        .productSku(req.getSku())<br>        .quantity(req.getAmount())<br>        .build();<br><br>    order = repo.save(order);<br>    String result = paymentGateway.process(reg.getToken());<br><br>    if (result == &quot;success&quot;) {<br>        shippingProvider.start(order.getId(), reg.getShippingMethod());<br>        order.setStatus(&quot;pending shipment&quot;);<br>    } else {<br>        order.setStatus(&quot;failed payment&quot;);<br>        repo.save(order);<br>        throw new PaymentProcessingException(&quot;Payment failed with error: &quot; + result);<br>}</pre><p>First of all, the method name, <strong>order</strong>, doesn’t tell us much about what it does. And the parameter named <strong>Request</strong> is about as helpful as naming your dog “Dog”. Lazy and unhelpful.</p><p>Also, using the name <strong>repo?</strong> this isn’t your WhatsApp chat message.</p><p>And then there’s the string <strong>result</strong>. We can probably guess what it represents, but returning a string for something as important as processing a customer’s order is a recipe for disaster.</p><p>It’s unclear what the function <strong>process </strong>does exactly, leaving us scratching our heads.</p><p>And finally, comparing a string using the “==” sign is a big no-no. And what does <strong>shippingProvider.start</strong> even do? Ship the order? Package the order? Who knows?</p><p>Here’s a good example:</p><pre>public void placeOrder(PlaceOrderRequest placeOrderRequest){<br>    Order order = Order.builder()<br>        .customerName(placeOrderRequest.getCustomerName())<br>        .customerEmail(placeOrderRequest.getCustomerEmail())<br>        .shippingAddress(placeOrderRequest.getShippingAddress())<br>        .productSku(placeOrderRequest.getProductSku())<br>        .quantity(placeOrderRequest.getQuantity())<br>        .build();<br><br>    order = orderRepository.save(order);<br>    PaymentResponse paymentResponse = paymentGateway.processPayment(orderRequest.getPaymentToken());<br><br>    if (paymentResponse.isSuccess()) {<br>        shippingProvider.initiateShipment(order.getId(), <br>                          orderRequest.getShippingMethod());<br>        order.setStatus(OrderStatus.PENDING_SHIPMENT);<br>        orderRepository.save(order);<br>    } else {<br>        order.setStatus(OrderStatus.FAILED_PAYMENT);<br>        orderRepository.save(order);<br>        throw new PaymentProcessingException(&quot;Payment failed with error: &quot; + paymentResponse.getErrorMessage());<br>}</pre><p>What changed?</p><p>The method name “placeOrder” is a vast improvement over the previous “order”. And the parameter name “placeOrderRequest” is so friendly and descriptive, it’s like the code is saying “please place your order here!”</p><p>And let’s not forget about the new entity <strong>PaymentResponse</strong>. Instead of using a string to represent the payment status, this entity captures all the relevant information about the payment. Everything’s more clear</p><p>And speaking of clarity, check out that enum for the order status. It’s like a saying “These are all the valid options!” It’s so much better than trying to compare a string to a magic value and hoping for the best. Or worst, getting a <strong>NullPointerException</strong></p><p>Note, In a real life scenario you would probably return something like PlaceOrderResponse, but for simplicity sake, I just made the function return nothing.</p><h3><strong>2 —Method Code Length</strong></h3><p>Have you ever seen a function that’s longer than a CVS receipt? I have, and let me tell you, it’s not pretty. It’s like trying to read a novel written by a 5-year-old.</p><p>But, There’s a solution — breaking up your functions into smaller, more manageable pieces. It’s like taking a chainsaw to that CVS receipt and making it into something you can actually read.</p><p>Not only does this make your code more readable, but it also makes it easier to test and maintain. And who doesn’t love easier testing? Plus, you can impress your coworkers by saying things like “I refactored that function into smaller, more modular pieces” at your next team meeting.</p><h3>3 — Remove Comments, Unless Necessary</h3><p>Listen, I know we were taught in school to add comments everywhere to our code so we could understand it later. But let’s be real, sometimes those comments are about as useful as a sunscreen in a submarine.</p><p>Here’s an example:</p><pre>public PaymentResponse processOrderPayment(PaymentRequest paymentRequest ){<br><br>        // find the customer based on the payment request information<br>        // get the customer Id and the date that the payment was placed on<br>        Customer customer = orderRepository.findbyCustomerIdandOrderDate(<br>                paymentRequest.getCustomerId(),<br>                paymentRequest.getOrderPlacementDate());<br><br>        // here we check if the payment token is still valid<br>        // if not we return a unauthorized exception and inform the client <br>        // to renew their token.<br>        if (!isValidToken(paymentRequest.getToken())) {<br>            throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, <br>                    &quot;Please refresh your payment token!&quot;);<br>        }<br><br>        // Create transaction<br>        // The create payment method is a method in paymentgateaway<br>        // it takes the current customer and starts their payment and creates a transaction<br>        TransactionResponse transactionResponse =<br>                PaymentGateway.createPaymentTransaction(customer);<br><br>        // Get payment amount and currency<br>        double amount = paymentRequest.getAmount();<br>        PaymentCurrency currency = paymentRequest.getCurrency();<br><br>        // Calculate tax and total amount<br>        // based on the currency, where the tax applied is different for different currency<br>        double tax = calculateTax(amount, currency);<br>        double totalAmount = amount + tax;<br><br>        // finally return the payment information<br>        return PaymentResponse.builder()<br>                .paymentId(transactionResponse.getPaymentId())<br>                .tax(tax)<br>                .totalAmountPaid(totalAmount)<br>                .paymentCurrency(currency)<br>                .build();<br>    }</pre><p>In the above example, the method names, variable names and the flow of the function is pretty clear(not a real life example code, I made it up)<br>and the comments in this context serve no purpose.</p><p>If you are having poor choices on naming your variables, methods and classes. It’s like wearing a hat to cover up your bad haircut. Instead of relying on comments, focus on writing clean, readable code that speaks for itself. Only resort to comments where you can’t make the code self-explanatory.(or you are creating documentation with Swagger etc.) Your future self (and your coworkers) will thank you.</p><h3>4 — No Hard Coded Values, Only Constants</h3><p>Instead of using hardcoded values, it’s a good practice to make them constants in your classes. This not only helps you to avoid typos, but it also makes your code more readable and maintainable. And let’s be honest, who wants to spend hours trying to debug a typo that could have been avoided with a simple constant?</p><p>But wait, there’s more! You can even give your constants good names, like “MAX_NUMBER_OF_USERS_ALLOWED” or “DEFAULT_FONT_SIZE”. It’s a way of giving your code a dictionary, so anyone who reads it can easily understand what each constant means.</p><p>Plus, you will be happy that you avoided a bug that otherwise would have been caused by forgetting to put a <em>.json extension</em> on your hard coded string.</p><p>In conclusion, by implementing these 4 practices — naming, method code length, comments and using constant s— you can make your code cleaner, more maintainable, and easier to read. These practices can help you take your coding skills to the next level and produce code that is a joy to work with.</p><p>Take Care!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77bc045cf23a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>