<?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 Niyaz Abbasov on Medium]]></title>
        <description><![CDATA[Stories by Niyaz Abbasov on Medium]]></description>
        <link>https://medium.com/@niyazabbasov?source=rss-da1aa0b84c5e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ajjMXnCWmHYY67gLfl-9_Q.png</url>
            <title>Stories by Niyaz Abbasov on Medium</title>
            <link>https://medium.com/@niyazabbasov?source=rss-da1aa0b84c5e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:20:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@niyazabbasov/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 Build Serverless API using AWS Serverless Application Model (AWS SAM)]]></title>
            <link>https://medium.com/pashabank/how-to-build-serverless-api-using-aws-serverless-application-model-aws-sam-965d9d9410d5?source=rss-da1aa0b84c5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/965d9d9410d5</guid>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lambda]]></category>
            <dc:creator><![CDATA[Niyaz Abbasov]]></dc:creator>
            <pubDate>Sat, 30 May 2020 13:23:00 GMT</pubDate>
            <atom:updated>2020-05-30T13:23:49.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*A8IMPwaKpE1bmCQ_zmWw2Q.jpeg" /></figure><h3>Introduction</h3><p>Using infrastructure as code is the best way to build production serverless applications. You can build a serverless API easily through the AWS console UI. But in a real-life scenario, you’d never build a production application this way. It’s just a good learning experience. In this article, I’ll show you how to build a simple Serverless API using<strong> AWS Serverless Application Model (AWS SAM)</strong>.</p><p>What is <a href="https://aws.amazon.com/serverless/sam/">AWS SAM</a>? AWS SAM is a serverless development framework that allows you to deploy your service applications onto AWS. All the configuration for your serverless applications is going to be a simple YAML code. AWS SAM generates complex CloudFormation from your simple YAML file.</p><p>AWS SAM is an extension of CloudFormation with a few new resource types that simplifies the development of serverless applications. It supports anything that CloudFormation supports, so we can use Outputs, Mappings, Resources and etc.</p><p>What is <a href="https://aws.amazon.com/cloudformation/">CloudFormation</a>? CloudFormation is a declarative way of outlining your AWS Infrastructure for any kind of resource (most of them are supported). For example, within a CloudFormation template, you say: <em>I need two EC2 machines, two Elastic IPs for these EC2 machines, and Elastic Load Balancer in front of these machines.</em> CloudFormation creates those resources for you, with the exact configuration that you specify.</p><p>Before start, you’ll need to go through the SAM CLI <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html">installation guide</a> page.</p><h3>Student Management API</h3><p>I’ll use a simple Student Management API for this article. Student Management API is able to list, store, update, and delete students in a <a href="https://aws.amazon.com/dynamodb/">DynamoDB</a> database. The following diagram is an overview of the components of the solution, and how they interact:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*e_RHV_jMp78Ox5A9Md6vcA.png" /></figure><h3>Setup infrastructure</h3><p>Here is the student_infrastructure.yaml— the file where we specify the infrastructure:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d11b124782ce690606e58ff33b1facb/href">https://medium.com/media/4d11b124782ce690606e58ff33b1facb/href</a></iframe><p>The first two lines are SAM boilerplate and the third being a description of the application.</p><p>Next is the Resources section, where CloudFormation resources are defined.</p><ul><li>AWS::Serverless::SimpleTable — specifying the resource to be a DynamoDB table naming Students with the primary key.</li><li>AWS::Serverless::Api — specifying the resource to be an API Gateway with endpoint and integration with the Lambda.</li><li>AWS::Serverless::Function — specifying the function, when invoked will look for a Lambda studentManagement.handler in lambda_handler folder.</li></ul><p>Last section Outputs is optional to declare output values after stack creation.</p><h3>Deploy</h3><p>Here is deploy command:</p><pre>$ sam deploy --guided --template-file student_infrastructure.yaml</pre><p>This command takes student_infrastructure.yaml and uses it to create or update a CloudFormation stack. --guided argument helps us to set stack-name, region, and other options in dialog mode.</p><p>After getting a successful creation message in CLI, navigate to the AWS CloudFormation service, you should see the stack was created successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQEOBy93vIuNi7YhO60W4g.png" /><figcaption>AWS CloudFormation service</figcaption></figure><p>If you click into your stack and then go to the Resources tab, you should see all resources were created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCY2UHj_kduTqBHNHLlEGg.png" /><figcaption>Stack’s resources</figcaption></figure><p>If you click on the Students in Physical ID column, you’ll be navigated to the DynamoDB console. In the Items tab, you’ll see that table is empty. Let’s import our dummy data. To import data run this command:</p><pre>aws dynamodb batch-write-item --request-items file://students.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XSCOOjyqyLBYF6gjjRqQ0w.png" /><figcaption>AWS DynamoDB — Students table</figcaption></figure><p>Let’s navigate to AWS API Gateway service and you should see Students API. If you click onStudents API, you’ll be navigated to the page where API resources are described:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zCNPTnT4f_QWlP8oRUmfTw.png" /><figcaption>API Gateway Students API resources</figcaption></figure><p>If you navigate to the Lambda service, you should see the student-management-app-*Lambda function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocKC1dDw1HxCLhnb8vkOXw.png" /><figcaption>AWS Lambda</figcaption></figure><p>Here is our Lambda function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a98f6bc17b6c6107a8fde48fd06e7d7/href">https://medium.com/media/5a98f6bc17b6c6107a8fde48fd06e7d7/href</a></iframe><h3>Testing</h3><p>To test our API we’ll use <a href="https://www.postman.com/">Postman</a>. First, navigate to the API Gateway services, click on your stack, Stages menu and select prod. Under prod stage copy Invoke URL. This is a public URL provided by AWS where API is deployed. Here is a sample URL: <a href="https://j0bd959rp2.execute-api.eu-central-1.amazonaws.com/prod/students">https://j0bd959rp2.execute-api.eu-central-1.amazonaws.com/prod/students</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1qK5VEXh0Ot60xW6_MkBiQ.png" /><figcaption>List students</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mXVIYlwcDJrBS1rtpYuMg.png" /><figcaption>Get student by id</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKuBpiaUFRGe6JoQMrBqoA.png" /><figcaption>Create a student</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5cifkh6tf8wWSn6bO5U9Qg.png" /><figcaption>Delete a student</figcaption></figure><h3>Conclusion</h3><p>You can see the complete project <a href="https://github.com/niyazabbasov/student-management-app">here</a>.</p><p>If you are interested, you may read the <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html">Benefits of Using AWS SAM</a> and with this article, AWS SAM might be a good choice for triggering your Lambdas in the cloud.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=965d9d9410d5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pashabank/how-to-build-serverless-api-using-aws-serverless-application-model-aws-sam-965d9d9410d5">How to Build Serverless API using AWS Serverless Application Model (AWS SAM)</a> was originally published in <a href="https://medium.com/pashabank">PASHA Bank</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pipeline for static code analysis using Jenkins + SonarQube + BitBucket Server]]></title>
            <link>https://medium.com/@niyazabbasov/pipeline-for-static-code-analysis-using-jenkins-sonarqube-bitbucket-server-911055e33025?source=rss-da1aa0b84c5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/911055e33025</guid>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sonarqube]]></category>
            <dc:creator><![CDATA[Niyaz Abbasov]]></dc:creator>
            <pubDate>Sat, 03 Nov 2018 20:12:10 GMT</pubDate>
            <atom:updated>2018-11-04T16:22:52.630Z</atom:updated>
            <content:encoded><![CDATA[<p>The goal of this article is to summarize the creating a Jenkins pipeline for static code analysis of Java projects with Maven in SonarQube and show the analysis results in BitBucket pull request.</p><p>There are many articles regarding the installation of Jenkins, SonarQube and BitBucket server. That’s why I will not show the installation of the required environments in this article. Just will mention the versions of them:</p><ul><li>Jenkins 2.138.2</li><li>SonarQube 7.1</li><li>Bitbucket v5.9.1</li></ul><h4>Step 1 — SonarQube configuration:</h4><p>SonarQube is a static code analysis tool that helps developers write clean code and detect bugs.</p><p>If you successfully installed SonarQube then you have to add a <em>“Branch plugin”</em>. Mention that this plugin is available for Developer edition of SonarQube and not for free. But in Github you may find the source code of this plugin for SonarQube 7.1:</p><p><a href="https://github.com/msanez/sonar-branch-community">msanez/sonar-branch-community</a></p><p>Clone this repository and build using Maven. After successful building copy <em>sonar-branch-2.0.0.jar</em> to <em>/opt/sonarqube/extensions/plugins</em> folder in SonarQube server and restart the server. After restarting the server open SonarQube <em>“Administration”</em> menu to ensure that plugin successfully installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJEXaDChkLAp7wAhDc2sZQ.jpeg" /><figcaption>SonarQube administration page</figcaption></figure><p><strong>Step 2 — BitBucket configuration:</strong></p><p>Bitbucket Server is self-hosted Git repository collaboration and management for professional teams.</p><p>Here are steps for creation of integration with SonarQube:</p><ol><li>Install <em>“Sonar for BitBucket Server”</em> add-on:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVYiiENPalcrKTLhv0ORwg.png" /><figcaption>BitBucket manage add-ons page</figcaption></figure><p>2. Add your SonarQube server details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPsqq2TYPHWfhs-zYIDuZw.png" /></figure><p>3. Enable Sonar feature in the repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mnD4Hgxi6Y2HP5VZ4rEtyw.png" /></figure><p>4. Enable branching feature:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_aDQm037iX28imFlvIhf_Q.png" /></figure><p>5. Use special pull request branches:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74xv2Vk0WOtqU0E-7sJqVw.png" /></figure><p>6. Save configuration.</p><p>Next configuration is to add “<em>Parametrized build for” Jenkins </em>hook in <em>“Hooks” </em>menu. This plugin gives us a chance to send environment parameters to Jenkins. Enable this hook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mCTFd4VP8no1IhYM_il9tA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5tEHz3dspE9ZKCLIoCUKpA.png" /></figure><p><strong>Step 3 — Jenkins configuration:</strong></p><p>Before starting to create pipeline go to <em>Manage Jenkins → Configure System </em>menu to enter SonarQube server details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJBIueaXx6qjKF-BCpkzPA.png" /></figure><p>Next, go to the <em>“New Item”</em> menu to create a pipeline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZkTKaW1oM2u4Ip9xWhUQpQ.jpeg" /></figure><p>Configure pipeline:</p><ol><li>Check <em>“This project is parametrized”</em>.</li><li>Enter these string parameters (you can add default values) which are already written in BitBucket hook:</li></ol><ul><li>BRANCH_NAME</li><li>REPOSITORY</li><li>PROJECT</li><li>PRID</li></ul><p>3. Check <em>“ Trigger builds remotely (e.g., from scripts)”</em> and add authorization token <em>terminal-payments </em>(from BitBucket hook configuration)<em>.</em></p><p>4. Add this pipeline script:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dbb101d39f03356fd21a96802b8a1a52/href">https://medium.com/media/dbb101d39f03356fd21a96802b8a1a52/href</a></iframe><p>If your Jenkins server is integrated with Slack, you may keep <em>slackSend </em>command to send build status to Slack channel.</p><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kynt67Xp_WhiMoLJ5Tq-_Q.png" /><figcaption>Pull request details</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=911055e33025" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>