Author: devopsy.kinsta.cloud

  • Three Mistakes to Avoid When Migrating to the Cloud

    Three Mistakes to Avoid When Migrating to the Cloud

    Migration and modernization is a process – it doesn’t all happen at once, and some applications don’t make the journey. AWS and CloudBees help customers navigate cloud adoption and DevOps transformation with tools and practices that help customers make good decisions on how to move, migrate, rebuild or replace the components you need.

    Many enterprise software companies on the road to DevOps transformation are tasked with migrating legacy applications to the cloud. But deconstructing the monolith and refactoring applications isn’t always easy. This is especially true for highly regulated industries such as government, healthcare and financial services where change management is rigorous. The DevOps challenges preventing success often lie in the ways these teams work. CloudBees and AWS can help you avoid the pitfalls and give you the best practices and tools required for lasting DevOps transformation.

    Check out this webinar recording, where we explore the top three mistakes enterprise software companies make on their journey to the cloud. We’ll also tell you what they should have done instead.

    To learn more, watch the video here:

    [su_youtube url=”https://www.youtube.com/watch?v=u8CLHGy7Eh4&feature=youtu.be&mkt_tok=eyJpIjoiTkdVellUTXpOamd4T1RFeSIsInQiOiJjaWUzMWhsb3k1YWtPaUlpZnlLbXJwNmIrXC9FMFBrY0R5MnRGbWRuV1RzV0h4cTczVFNCOWR2MEViUE9nY1Bua0paTnhHUkxZRG54RFlMVjdMeWZXY3c9PSJ9″]

  • Simplify Snyk and AWS integration with our latest AWS Quick Start

    Simplify Snyk and AWS integration with our latest AWS Quick Start

    One of the great benefits of using AWS is the ability to automate almost everything you do, which is not limited to just AWS’ own services, but ecosystem partners like Snyk as well. We’re happy to announce our second AWS Quick Start, to help you get Snyk working with Amazon Elastic Container Registry (ECR) and AWS Lambda with just the click of a button.

    Skip the manual steps and get straight to the good stuff

    Integrating Snyk with ECR and Lambda requires setting up roles that work for both the AWS service and for the Snyk service. While it’s not terribly hard to do, clicking back and forth between both interfaces and copying values from one console to another is nobody’s idea of a good time. The Snyk: Developer-first Security on the AWS Cloud Quick Start gives you three options:

    1. Full Snyk integration with both ECR and Lambda
    2. Integration with ECR only
    3. Integration with Lambda only

    Once deployed you can quickly obtain the remaining values for your ARN and AWS Region from the CloudFormation console outputs as shown below:

    Snyk Container and AWS ECR integration

    For the ECR integration, we create an IAM role that enables Snyk Container to access container images stored in ECR to scan for vulnerabilities. We create a read-only role with all the permissions outlined in our documentation and set up the necessary service integration between the Snyk service and your AWS region. From there, you can start scanning container images stored in your ECR registries and Snyk will help you select secure base images and clean up vulnerabilities in the image and code dependencies.

    Snyk Container and AWS Lambda integration

    Integrating Snyk Open Source with Lambda is similar to how the Snyk Container and ECR integration is handled. We create an appropriate read-only IAM role, following our documented configuration, and then set up the Snyk Open Source and Lambda services to talk to each other. From there, you can scan and monitor your Lambda code for vulnerable dependencies, alerting you to problems and helping you fix them so that your functions stay secure.

    Send us feedback

    To post feedback, submit feature ideas, or report bugs, use the Issues section of the GitHub repository for this Quick Start. If you’d like to submit code, please review the Quick Start Contributor’s Guide.

    You can get Snyk by signing up for a free account. For our paid tiers, both Snyk Open Source and Snyk Container are available to buy on the AWS Marketplace, as well as through private offers and custom contracts.

    Additional resources

    Snyk resources

    AWS resources

    AWS services

  • Securing Open Source Libraries – Session with O’Reilly Author Guy Podjarny

    Securing Open Source Libraries – Session with O’Reilly Author Guy Podjarny

    Listen in to hear Guy Podjarny, Snyk founder and author of O’Reilly’s latest book on open source security, share practical guidance on testing for, managing and fixing vulnerabilities in open source code packages. Insightful for both development and application security architects and practitioners, the webinar guides you through best practices and tools for:
    • Finding vulnerabilities across your open source packages  
    • Quickly remediate new vulnerabilities and make fixing easy
    • Understanding the benefits of testing at the source level and all the way through the application development process
    [su_button url=”https://info.snyk.io/webinar-securing-open-source-libraries?utm_medium=Partner&utm_source=AWS&utm_campaign=devopsy.kinsta.cloud-AWS-Community-Hub&utm_content=O%27Reilly” target=”blank” background=”#ef2d3f”]On-Demand Webinar[/su_button]
  • MediaOps Video Productions Recognized for Excellence by Association of Marketing and Communication Professionals (AMCP), Winning Multiple dotCOMM Awards

    MediaOps Video Productions Recognized for Excellence by Association of Marketing and Communication Professionals (AMCP), Winning Multiple dotCOMM Awards

    TechStrong TV Wins Platinum Award for Video Series, DevOps Unbound Awarded Gold for Video Podcast and CISO Talk Takes Gold for Video News and Information.

    BOCA RATON, Fla., Sept. 10, 2020 — MediaOps, the place for IT to tell its story in the most powerful way, has been named the recipient of three 2020 dotCOMM Award for excellence, in multiple video categories: TechStrong TV in the category of video series, DevOps Unbound for video podcast and CISO Talk in video news and information.

    The dotCOMM Awards are an international competition honoring excellence in web creativity and digital communication. They are administered and judged by the Association of Marketing and Communication Professionals (AMCP), an international organization that oversees awards and recognition programs and honors outstanding achievement and service to the profession. AMCP judges are industry professionals who look for companies and individuals whose talent exceeds a high standard of excellence and whose work serves as a benchmark for the industry.

    “We are honored to be recognized for not one, not two, but three of our video productions,” said Alan Shimel, CEO of MediaOps.”We made a bet a few years back that video was going to be an integral component of how our audience would engage with us. We built in-house expertise in video production and distribution. These awards are validation of the quality and innovation we are delivering.”

    “DevOps Unbound receiving this recognition so early in its run speaks volumes,” said Brent Remai, CMO of Tricentis. “We’ve been collaborating closely with Alan to develop a series that tackles enterprise DevOps ‘growing pains’ head on. The focus on honest discussion and lively debate really sets it apart. We’re looking forward to watching it become an integral part of the DevOps community.”

    “It is an honor to team up with Alan Shimel at MediaOps on the CISO Talk series,” said Unisys Chief Information Security Officer Mat Newfield. “The ability to bring in the best and brightest in our field and have an open and honest conversation on important topics has been incredibly rewarding. I am excited for the future of this project and am looking forward to many more great episodes.”

    MediaOps Productions Take Top Awards

    Platinum Award for Video Series:

    TechStrong TV, a streamed broadcast featuring fresh video news and information three days a week and replays of prior shows two days a week, on the Digital Anarchist network. Covering DevOps, cybersecurity, cloud native and digital transformation, TechStrong TV keeps its viewers up to date on the latest news and features  interviews with thought leaders and education in the hottest IT areas.

    Gold Award for Video News and Information:

    CISO Talks, a bi-weekly series that explores the latest in cyberspace, featuring industry experts and newsmakers in the field. Hosted by MediaOps editor in chief Alan Shimel and Unisys CISO Matthew Newfield.

    Gold Award for Video Podcast:

    DevOps Unbound, a bi-weekly/monthly roundtable sponsored by Tricentis, which provides a deep dive into DevOps, with an emphasis on automation, continuous delivery, accelerating transformation, testing and quality.

    These three series, along with more than 1,500 other videos, podcasts and webinars, are available on MediaOps’ Digital Anarchist video platform and streamed via TechStrong TV, which is available on the web at LinkedIn Live (devopsy.kinsta.cloud page), Facebook Live (devopsy.kinsta.cloud page), YouTube (DevOps TV channel), Techstrong.tv, DigitalAnarchist.com and the MediaOps community sites (devopsy.kinsta.cloud, Security Boulevard and Container Journal). TechStrong TV is also available on the devopsy.kinsta.cloud mobile app for iOS and Android and on TV via devopsy.kinsta.cloud app for OTT channels on Apple TV, Roku and Amazon Fire TV.  Episodes are available on demand at Digital Anarchist, the next-gen streaming service for tech communities, which offers in-depth coverage on DevOps, cybersecurity, cloud native and digital transformation, adding high-quality content on a regular basis.

     

    ABOUT MEDIAOPS

    MediaOps, the place to tell your story in the most powerful way, is an omniversal media company covering IT industries and practices that are re-shaping the world of technology, including DevOps, Cloud-Native, Cybersecurity and Digital Transformation. Through a convergence of new media distribution platforms, we deliver the experiential stories IT professionals need to gain fresh insights and learn new skills. For marketing partners, MediaOps delivers unparalleled access to inform and engage with a highly involved IT community, for thought leadership, demand generation and specialized campaigns. MediaOps is not only the most trusted name in technology media, but the most loved as well.

  • Serverless Security: Protect Functions Using the CLAD Security Model

    Serverless Security: Protect Functions Using the CLAD Security Model

    This book reviews how the serverless paradigm affects the security of an application, and dives into the benefits it brings. More important, it helps you, the owner of the serverless application, understand what you should do to keep your serverless apps secure, and gives some practical tips on how to do so, reviewing:

    • Security fundamentals for system dependencies & defense from DoS Attacks
    • Code and library vulnerabilities, access and permission, and data security guidelines
    • Sample application security exercise – step by step project review

    To download the free eBook, click the link below:

    https://info.snyk.io/oreilly-serverless-security

     

     

  • How to create a Kubernetes cluster on Amazon EKS in GitLab

    How to create a Kubernetes cluster on Amazon EKS in GitLab

    Kubernetes has created a whole new world for running infrastructure at scale. With the right setup, an application can go from serving a few users to millions effortlessly. Setting up Kubernetes can be tasking and can require a lot of expertise to put all the pieces together. You’ll need set up virtual or bare metal machines to use as nodes and manage SSL certificates, networking, load balancers and many other moving parts.

    The introduction of Amazon Elastic Kubernetes Service (EKS) was widely applauded as it streamlines the abstraction of the complexities in an environment most organizations are already familiar with and on a provider they already trust. Amazon EKS makes creating and managing Kubernetes clusters easier with more granular controls around security and straightforward policies of how resources are used.

    GitLab strives to increase developer productivity by automating repetitive tasks and allowing developers to focus on business logic. We recently introduced support for auto-creating Kubernetes clusters on Amazon EKS. In a few clicks with the right permissions, you’ll have a fully functional Kubernetes cluster on Amazon EKS. It doesn’t stop there however – GitLab also gives you the power to achieve the following use cases and more :

    • Highly scalable CI/CD system using GitLab Runner: There are times like holidays when little to no changes to code are pushed to production, so why keep resources tied down? With the Amazon EKS integration with GitLab, you can install GitLab Runner with just a click and your CI/CD will run effortlessly without worrying about running out of resources.
    • Shared Cluster: Maintaining multiple Kubernetes clusters can be a pain and capital intensive. With Amazon EKS, GitLab allows you to setup a cluster at Instance, Group and Project levels. Kubernetes Namespaces are created for each GitLab project when the Amazon EKS is integrated at Instance and Project level, allowing isolation and ensuring security.
    • Review Apps: Reviewing changes to code or design can be tricky, you’ll need to check out your branch and run the code in a test environment. GitLab integrated with Amazon EKS deploys your app with new changes to a dynamic environment and all you need to do is click on a “View App“ button to review changes.
    • AutoDevOps takes DevOps to a whole new level. AutoDevOps detects, builds, tests, deploys, and monitors your applications, leveraging the Amazon EKS integration. All you have to do is push your code and the magic happens. In this tutorial, we will deploy a sample application to the Amazon EKS cluster we will be creating using AutoDevOps.

    To show you how easy it is to create an Amazon EKS cluster from GitLab, the rest of this tutorial will walk you through the steps of the integration, starting with a one-time setup of necessary resources on AWS.

    One-time setup on AWS to access resources

    First, we need to create a “provision” role and a “service” role on AWS to grant GitLab access to your AWS resources and set up the necessary permissions to create and manage EKS clusters. You only need to perform these steps once and you can reuse them anytime you want to perform another integration or create more clusters.

    Step 1 – Create Provision Role

    To grant GitLab access to your AWS resources, a “provision role” is required. Let’s create one:

    1. Access GitLab Kubernetes Integration Page by clicking on the ”Kubernetes” menu for groups and Operations > Kubernetes menu for projects and click the “Add Kubernetes Cluster” button.
    2. Select “Amazon EKS” in the options provided under the “Create new cluster on EKS” tab.
    3. You are provided with an Account and External ID to use for authentication. Make note of these values to be used in a later step.Gitlab EKS Integration Page
    4. Open IAM Management Console in another tab and click on “Create Role”
    5. Click on the “Another AWS account” tab and provide the Account and External ID obtained from GitLab and click Next to set permissions as shown below:AWS Provision Role
    6. On the permissions page, click on “Create policy.” This will open a new tab where you can set either of the permissions below using JSON:
       {
           "Version": "2012-10-17",
           "Statement": [
               {
                   "Effect": "Allow",
                   "Action": [
                       "autoscaling:*",
                       "cloudformation:*",
                       "ec2:*",
                       "eks:*",
                       "iam:*",
                       "ssm:*"
                   ],
                   "Resource": "*"
               }
           ]
       }
      

      This gives GitLab full access to create and manage resources, as seen in the image below:

      AWS Role Policy

      If you prefer limited permission, you can give GitLab the ability to create resources, but not delete them with the JSON snippet below. The drawback here is if an error is encountered during the creation process, changes will not be rolled back and you must remove resources manually. You can do this by deleting the relevant CloudFormation stack.

       {
           "Version": "2012-10-17",
           "Statement": [
               {
                   "Effect": "Allow",
                   "Action": [
                       "autoscaling:CreateAutoScalingGroup",
                       "autoscaling:DescribeAutoScalingGroups",
                       "autoscaling:DescribeScalingActivities",
                       "autoscaling:UpdateAutoScalingGroup",
                       "autoscaling:CreateLaunchConfiguration",
                       "autoscaling:DescribeLaunchConfigurations",
                       "cloudformation:CreateStack",
                       "cloudformation:DescribeStacks",
                       "ec2:AuthorizeSecurityGroupEgress",
                       "ec2:AuthorizeSecurityGroupIngress",
                       "ec2:RevokeSecurityGroupEgress",
                       "ec2:RevokeSecurityGroupIngress",
                       "ec2:CreateSecurityGroup",
                       "ec2:createTags",
                       "ec2:DescribeImages",
                       "ec2:DescribeKeyPairs",
                       "ec2:DescribeRegions",
                       "ec2:DescribeSecurityGroups",
                       "ec2:DescribeSubnets",
                       "ec2:DescribeVpcs",
                       "eks:CreateCluster",
                       "eks:DescribeCluster",
                       "iam:AddRoleToInstanceProfile",
                       "iam:AttachRolePolicy",
                       "iam:CreateRole",
                       "iam:CreateInstanceProfile",
                       "iam:CreateServiceLinkedRole",
                       "iam:GetRole",
                       "iam:ListRoles",
                       "iam:PassRole",
                       "ssm:GetParameters"
                   ],
                   "Resource": "*"
               }
           ]
       }
      

      The image below visualizes what permissions are granted:

      Limited Role Policy

    7. Once the policy is created, return to the “Create Role” browser tab and refresh to see the policy we created listed. Select the policy and click “Next.”
    8. In the Tags section, we don’t need to set any Tags, except if it’s required in your organization. Let’s proceed to Review.
    9. Specify a Name for your new Role. You will see the policy we created listed under policies and click “Create Role” to complete the process.
    10. Click on the new Role you created in the list of Roles to view its details. You may have to search for it in the list of Roles if it’s not listed in the first view. Copy the Role ARN provided – we will need it on the GitLab Kubernetes Integration page.

    Step 2 – Create Service Role

    The Service Role is required to allow Amazon EKS and the Kubernetes control plane to manage AWS resources on your behalf.

    1. In the IAM Management Console, click on “Create Role” and select the “AWS service” tab.
    2. Select EKS in the list of services and Use Cases as shown below and click Next.Service Role
    3. You will notice the “AmazonEKSClusterPolicy” and “AmazonEKSServicePolicy” permissions are selected; these are all we need. Click through the Tags step and create if necessary, then click Next to get to the Review step. Click “Create Role” to complete the process.Role Summary

    GitLab EKS Integration

    This is the easy part! As mentioned earlier, you only need to create the Provision and Service role once if you don’t already have them in your organization’s AWS setup. You can reuse the roles for other integrations or cluster creations.

    1. Return to the GitLab Kubernetes Integration page and provide the Role ARN of the Provision Role we created earlier and click “Authenticate with AWS.”Gitlab EKS Integration Page
    2. Once authenticated, you’ll have a page to set the parameters needed to set up your cluster as shown in the image below and click on “Create Kubernetes Cluster” to let GitLab do its magic!The parameters you’ll need to provide are:
      • Kubernetes cluster name – The name you wish to give the cluster.
      • Environment scope – The GitLab environment associated with this cluster; * denotes the cluster will be used for deployments to all environments.
      • Kubernetes version – The Kubernetes version to use. Currently, the only version supported is 1.14.
      • Role name – The service role we created earlier.
      • Region – The AWS region in which the cluster will be created.
      • Key pair name – Select the key pair that you can use to connect to your worker nodes if required.
      • VPC – Select a VPC to use for your EKS Cluster resources.
      • Subnets – Choose the subnets in your VPC where your worker nodes will run.
      • Security group – Choose the security group to apply to the EKS-managed Elastic Network Interfaces that are created in your worker node subnets. AWS provides a default group, which can be used for the purpose of this guide. However, you are advised to setup up the right rules required for your resources.
      • Instance type – The AWS instance type of your worker nodes.
      • Node count – The number of worker nodes.
      • GitLab-managed cluster – Leave this checked if you want GitLab to manage namespaces and service accounts for this cluster.

      Gitlab EKS Integration Page

    3. The cluster creation process will take approximately 10 minutes. Once done you can proceed to install some predefined applications. At the very least, you need to install the following:
      • Helm Tiller: This is required to install the other applications.
      • Ingress: This provides SSL termination, load balancing and name-based virtual hosting you your applications. It acts as a web proxy for your application, which is useful when using AutoDevOps or deploying your own apps.
      • Cert Manager: This is a native Kubernetes certificate management controller, which helps in issuing certificates using Let’s Encrypt. You don’t need this if you want to use a custom Certificate issuer.
      • Prometheus: GitLab uses the Prometheus integration for automatic monitoring of your applications to collect metrics from Kubernetes containers allowing you to understand what is going on from within the GitLab UI.

      Gitlab EKS Integration Page

    4. To make use of Auto Review Apps and Auto Deploy stages of AutoDevOps, you will need to specify a Base Domain name with a wild card DNS pointing to the Ingress Endpoint generated when you Install Ingress in the list of predefined apps.

    Summary

    In this tutorial, we looked at how GitLab integrates with Amazon EKS, allowing Kubernetes clusters to be created easily from the GitLab UI after setting the right permissions. As we’ve seen, developer productivity is greatly improved by no longer having to manually set up clusters. Also, the same cluster can be used for multiple projects when Amazon EKS is integrated with GitLab at the Group and Instance levels, thus making onboarding new projects a breeze. After integration, the possibilities of what developers can achieve is enormous.

    In the next part of this tutorial, we will look at how to deploy your applications on an Amazon EKS cluster using AutoDevOps.

  • Using GitLab CI/CD Pipeline to Deploy AWS SAM Applications

    Using GitLab CI/CD Pipeline to Deploy AWS SAM Applications

    In order to deliver serverless applications, customers often turn to DevOps principles to efficiently build, deploy, operate, and iterate on features and changes.

    Continuous integration and continuous deployment (CI/CD) is one of the major components of DevOps that helps deliver code faster and more reliably to production.

    The continuous integration offering from GitLab, an AWS Partner Network (APN) Advanced Technology Partner with the AWS DevOps Competency, provides a rich set of features for automating how new code is incorporated into your software and how new versions of your software get built and deployed.

    In this post, you will learn how to create a sample serverless application using AWS Serverless Application Model (SAM) and how GitLab continuous integration helps with building, testing, and deploying the application in your Amazon Web Services (AWS) account.

    About AWS Serverless Application Model

    A serverless application is comprised of multiple resources, which can include functions, event sources, datastores, and other resources that work together to perform tasks.

    Serverless applications are more than just AWS Lambda functions—they can include additional resources, such as APIs, databases, and event source mappings.

    AWS Serverless Application Model is an open source framework for building serverless applications. SAM includes the AWS SAM Template Specification and AWS SAM Command Line Interface (CLI).

    The AWS SAM Template Specification is an extension of AWS CloudFormation used to define your serverless application resources as a template. It provides a more convenient and concise syntax to express functions, APIs, databases, and event source mapping when compared to typical CloudFormation template.

    The CLI enables you to build, test, and deploy serverless applications that are defined using a SAM template.

    Getting Started

    To get started, ensure you have your own GitLab account and AWS account. This post assumes you have required permissions to configure Gitlab CI/CD pipelines and create AWS resources in your account.

    We will create a sample serverless application using the SAM CLI and deploy it to an AWS account using GitLab CI/CD pipeline. We’ll use GitLab as the repository for our source code.

    When a developer checks in their new code, the GitLab continuous integration fetches the source code from the repository, and then build, package, and deploy to the AWS account.

    These are the steps in this procedure:

    1. Install and configure the SAM CLI.
    2. Create an AWS serverless application using SAM CLI.
    3. Craft the .gitlab-ci.yml file.
    4. Set up your AWS credentials in your GitLab account.
    5. Test locally.
    6. Deploy your application.
    7. Test your deployment.

    Step 1: Install and Configure the SAM CLI

    Some steps in this documentation use the SAM CLI. Please follow the instructions on installing SAM CLI.

    If you use AWS Cloud9 as your integrated development environment (IDE), the AWS Command Line Interface (CLI), SAM CLI, Docker, and necessary Docker images are installed for you.

    Create an Amazon Simple Storage Service (Amazon S3) bucket in your AWS account to store the built package for deployment. Provide required permissions to the user you will be using in later steps to deploy the SAM application to write to this bucket.

    Step 2: Creating an AWS SAM Application Using SAM CLI

    You can create a serverless application by defining all required resources in an AWS SAM template. AWS SAM also provides some quick-start templates to create an application. In this post, we’ll use one of those templates to create a sample application.

    Before you create a SAM application, create a new GitLab project and clone it to your local environment. To create a SAM app from the CLI, open a terminal, change to the newly cloned project, and enter the following text:

    sam init -r python3.8 -n gitlab-example --app-template "hello-world"

    This creates a SAM app named gitlab-example using the default configuration, a single Python 3.8 function invoked by an Amazon API Gateway endpoint.

    To see additional runtimes supported by SAM and options for sam init, enter sam init -h.

    Git push the application back to the GitLab project.

    Step 3: Crafting the .gitlab-ci.yml File

    GitLab CI/CD pipelines are configured using a YAML file called .gitlab-ci.yml within each project. This defines the structure and order of the pipelines.

    In a .gitlab-ci.yml file in the root of your project, place the following code and replace the #S3Bucket# with the Amazon S3 bucket name you created to store the package:

    image: python:3.8
    
    stages:
      - deploy
    
    production:
      stage: deploy
      before_script:
        - pip3 install awscli --upgrade
        - pip3 install aws-sam-cli --upgrade
      script:
        - sam build
        - sam package --output-template-file packaged.yaml --s3-bucket #S3Bucket#
        - sam deploy --template-file packaged.yaml --stack-name gitlab-example --s3-bucket #S3Bucket# --capabilities CAPABILITY_IAM --region us-east-1
      environment: production

    Let’s examine the config file more closely:

    • The Docker image to use for this build is specified and pulled from the Docker hub. The image with Python 3.8 is used in this example since the sample application is written in Python 3.8.
    • AWS Command Line Interface and AWS SAM CLI are installed in the script section.
    • SAM builds, packages, and deploys the application.

    As part of the CI/CD process, we recommend you scan your code for quality and vulnerabilities in bundled libraries. You can find these security offerings from our AWS Lambda Technology Partners.

    Step 4: Setting Up Your AWS Credentials with GitLab

    To interact with your AWS account, the GitLab CI/CD pipelines require both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be defined in your GitLab project settings. You can do this under Settings > CI/CD > Variables. For more information, please see this GitLab ReadMe.

    The AWS credentials you provide must include AWS Identity and Access Management (IAM) policies that provision correct access control to AWS Lambda, Amazon API Gateway, AWS CloudFormation, and IAM resources.

    Step 5: Testing Locally

    SAM provides functionality to test your applications locally. As we mentioned earlier, you must have SAM CLI installed locally for you to test locally.

    SAM provides a default event in events/event.json that includes a message body of {\"message\": \"hello world\"}. If you pass that event into the HelloWorldFunction, it should respond with the same body:

    sam local invoke HelloWorldFunction -e events/event.json

    Output should be:

    {"message": "hello world"}

    After you confirm the Lambda function is working as expected, you can test the API Gateway using the following steps.

    First start the API locally:

    sam local start-api

    SAM again launches a Docker container, this time with a mocked API Gateway listening on localhost:3000. Now, you can call the hello API as follows:

    curl http://127.0.0.1:3000/hello

    Output again should be:

    {"message": "hello world"}

    Step 6: Deploying Your Application

    Git push the changes to your GitLab repository, and the GitLab pipeline will automatically deploy your application. If your build and deploy are successful, go to the next step to test your deployed application.

    If your build fails, please take a look at the build log to see why it failed. Some common reasons are:

    • Incompatible versions of software (for example, the Python runtime version may be different from the Python on the build machine). Address this by installing the proper versions of the software. If your build machine has an incompatible version of the software, install the proper version via the .gitlab-ci.yml file.
    • You may not be able to access your AWS account from GitLab. Check the environment variables you configured with AWS credentials under the CI/CD settings in GitLab.
    • You may not have permission to deploy a serverless application. Make sure you provide all required permissions to deploy a serverless application. Your credentials must have permissions to the S3 bucket, in addition to being able to create the necessary resources of the sample SAM app.

    Step 7: Testing Your Application

    To test the application you deployed, go to the build log and click on Show Complete Raw in the upper right corner.

    GitLab-CI-CD-1.1

    Look for the HelloWorldApi – API Gateway endpoint similar to shown below.

    GitLab-CI-CD-2.1

    Finally, use curl to test the API:

    curl https://<api-id>.execute-api.us-east-1.amazonaws.com/Prod/hello/

    Output should be:

    {"message": "hello world"}

    Conclusion

    In this post, you used GitLab continuous integration and AWS Serverless Application Model to create, build, test, and deploy a serverless application. With GitLab, users can build and deploy serverless applications with minimal configuration to take advantage of continuous integration for serverless application development.

    Learn more about GitLab and AWS Serverless Application Model (SAM).

    .
    GitLab-APN-Blog-CTA-1
    .


    GitLab – APN Partner Spotlight

    GitLab is an AWS DevOps Competency Partner. Its continuous integration offering provides a rich set of features for automating how new code is incorporated into your software and how new versions of your software get built and deployed.

    Contact GitLab | Solution Overview | AWS Marketplace

    *Already worked with GitLab? Rate this Partner

    *To review an APN Partner, you must be an AWS customer that has worked with them directly on a project.

  • From monolith to microservices: How to leverage AWS with GitLab

    From monolith to microservices: How to leverage AWS with GitLab

    Ask Media Group operates over 30 websites and provides enriched search results, articles, galleries, and shopping sites to over 100 million unique visitors each month. About two years ago, Ask Media was looking for ways to grow the business, draw advertisers, and expand its audience. Routine tasks like onboarding developers or releasing software took too long. The monolithic system that was in place had limited capabilities and added financial burdens for services that went unused.

    Chenglim Ear, principal software engineer at Ask Media, recently sat down with Trevor Hansen, solutions architect at AWS, to discuss how adopting GitLab empowered developers to improve the customer experience, release software quicker, and leverage AWS cloud services.

    Building microservices from monoliths

    Ask Media was looking to move away from a monolithic system to microservices in order to modernize workflow and improve the overall business process. “We wanted to move over to microservices. We wanted to leverage Kubernetes. It was a new container world that was shaping. When we looked at GitLab, it was very complete in providing what we needed to be able to build images, to run on containers,” according to Chenglim. “That was a very big deciding factor. GitLab had everything that we needed.”

    Developers can now break services into multiples and develop them independently, own the code, and have full visibility prior to deployment. “We’re making the hidden logic transparent and we enable the parts of the logic to be independently developed in parallel. So you can have developers all working on their own, with different skillsets,” Chenglim says.

    Containers, cost, and scalability

    “We needed a system that could handle change. When we look at what we did to speed up development, make it simple and transparent, and control the cost, we see a paradigm shift. GitLab gave us push-button releases. Docker and Kubernetes enabled us to switch to a microservices architecture and AWS enabled auto scaling,” says Chenglim. “On Amazon, we started building Kubernetes clusters and GitLab became our command and control interface.”

    Ask Media was looking for a tool that could scale and grow as needed. Cost, speed, and functionality are the tenets that AWS focuses on providing to its customers, according to Hansen. AWS works closely with Ask Media to ensure that the containers in place offer the scalability, flexibility, and timeliness they need.

    With GitLab and AWS, Ask Media developers built out a platform that enables the knowledge from all members of the teams. “With AWS, we wanted a product that was fairly complete and mature. AWS has a lot of history and lots of services. We definitely wanted to be able to leverage those services and to build on a platform that was a solid,” Chenglim says. “We set off to build Kubernetes clusters, right on EC2 instances. We continue to look at opportunities to leverage the resources available through AWS.”

    To learn more about how Ask Media made the transition to cloud native, check out the full webcast.

  • Goldman Sachs improves from 1 build every two weeks to over a thousand per day

    Goldman Sachs improves from 1 build every two weeks to over a thousand per day

    Goldman Sachs is achieving what was previously assumed to be impossible. With the help of GitLab, the engineering team is now self-serving thousands of daily builds and dozens of teams are moving to production on a daily basis. Goldman Sachs empowered users with a strategic development tool and removed barriers around tool confusion and communication to speed up the delivery cycle.

    The Goldman Sachs engineering group is part of the technology division and global strategy groups which are the critical center of the financial service provider’s business. They solve the most challenging and pressing engineering problems for Goldman Sachs clients. The group builds massively scalable software and systems, architects low latency infrastructure solutions, proactively guards against cyber threats, and leverages machine learning alongside financial engineering to continuously turn data into action.

    Goldman Sachs dynamic environment requires innovative strategic thinking and immediate, real solutions. The group was looking to increase developer efficiency and software quality through faster development cycles and decreasing the time spent from feature design to production rollout. They wanted to accomplish all of this while enabling concurrent development activities.

    the challenge

    Increasing build speed by demolishing toolchain complexity

    The firm had built its own toolchain but was looking for a solution to increase concurrent development. They wanted a modern toolset for managing code that developers coming into the firm would likely already be familiar with; this led to an evaluation of GitLab and other git-based vendor products.

    From their discovery process, they decided GitLab had the best CI/CD infrastructure to meet their needs. Initial users reported that it was easy to use and offered a complete end-to-end platform for software development allowing them to replace their current toolchain and increase speed and coordination in the process.

    the solution

    GitLab increases Goldman Sachs build velocity

    GitLab is used as a complete ecosystem for development, source code control and reviews, builds, testing, QA, and production deployments. All the new strategic pieces of Goldman Sachs’ software development platforms are tied into GitLab.

    GitLab is helping the business-line engineering teams move faster to develop and improve their software and deliver for clients. One of the firm’s most important projects has moved from a release cycle of once every 1-2 weeks to once every few minutes because of GitLab.

    “GitLab has allowed us to dramatically increase the velocity of development in our Engineering Division. We believe GitLab’s dedication to helping enterprises rapidly and effectively bring software to market will help other companies achieve the same sort of efficiencies we have seen inside Goldman Sachs. We now see some teams running and merging 1000+ CI feature branch builds a day!”
    Andrew Knight
    Managing Director at Goldman Sachs

    GitLab provided them a single application to roll out DevOps to the thousands of users at the bank. The ease of people only having to learn one application accelerated their adoption time. They were concerned that multiple tools, like most companies use, would be confusing, difficult to maintain and would deter adoption.

    the results

    Dozens of teams pushing to production in less than 24 hours

    The engineering group at Goldman Sachs is achieving this increased efficiency and speed by collaborating and connecting on a new level. They are seeing dozens of teams pushing to production in less than 24 hours. By tying together all the different parts of the development lifecycle into one consistent ecosystem, GitLab has helped developers work more effectively. All the different parts of what they need to do can be brought together under a single umbrella to be more efficient.

    The team is also using GitLab as a means of moving teams to more strategic infrastructure which supports containers, as well as other strategic initiatives that are only offered on the new platform. This really helps make sure that the group is focusing efforts to use the latest technologies in the right places, and not just retrofit to the legacy infrastructure. GitLab also works well with Kubernetes out of the box which simplified their process.

    “We’re bringing into the firm a platform that our engineers actually want to use – which helps drive adoption across multiple teams and increase productivity without having to ‘force’ anyone to adopt it. This is really helping to create an ecosystem where our end users are actively helping us drive towards our strategic goals – more releases, better controls, better software.”
    George Grant
    VP technology fellow, Goldman Sachs

    All information and persons involved in case study are accurate at the time of publication.

  • Trek10 provides radical visibility to clients

    Trek10 provides radical visibility to clients

    An increasing demand for cloud native applications has left some organizations struggling to compete in a changing landscape. Without the teams, tools, or expertise to build cloud applications, organizations find themselves adrift in a sea of serverless solutions. How can organizations modernize their technology when they are not equipped with the knowledge or time to build, design, and support solutions?

    Trek10, a professional services company, combines comprehensive consulting with specialized technical skills to build and manage serverless applications, enabling enterprises to migrate to cloud native architectures. Trek10 customizes solutions to offer clients massive scalability, heavy automation, and low operating costs. Clients who collaborate with Trek10 have the option to select among various offerings, ranging from building and operationalizing applications and systems on AWS to a 24/7 managed service to oversee and respond to incidents.

    By working with clients to determine a service offering that meets their specific needs and goals, Trek10 ensures that organizations have cutting-edge solutions to tackle business demands.

    the challenge

    Clients require visibility and collaboration

    As organizations worked with Trek10 to develop customized cloud solutions, the need to create a transparent process became imperative as clients asked for updates. The team struggled with balancing the demands of building, designing, and meeting with clients to provide progress reports. Specializing in custom solutions, Trek10 encourages clients to offer feedback throughout the development lifecycle.

    When clients collaborated on projects to make decisions, the Trek10 team made adjustments, causing changes in timelines and budgets. The team tried several list-based todo apps to track progress, however there was always discrepancies and lag time between reality and the tools, due to the overhead required from the developers. While the Trek10 team highly valued client collaboration to create custom solutions, the lack of visibility into how decisions altered original plans resulted in miscommunication and friction when closing out a project.

    Information was spread across different tools, causing transparency and collaboration issues, and Trek10 needed to bridge the gap between developers and clients by having everything visible in one application.

    the solution

    GitLab for project management fosters collaborative partnerships

    Jared Short, Director of Innovation, and the Trek10 team tested several tools in hopes of solving the transparency and collaboration conundrum. While some applications offered visibility, clients did not feel comfortable navigating through difficult UIs, so the team continued to struggle. Trek10 searched for a single application that brought value to both developers and clients. Specifically, the team looked for a way to tie issues more closely with code, since developers and clients were not contributing to a single conversation.

    Looking for an end-to-end solution, Trek10 selected GitLab to deliver full transparency throughout the development cycle. The team creates separate groups within projects and develops applications with full visibility to clients, paving the way for seamless collaboration after reviewing a repository or review app environments.

    “We invite the clients and their developers, and project managers to collaborate with us, and we try to have as much visibility as possible,” explains Short. Exposing executive summaries, documentation, and spend reports offers clients real-time visibility into the development lifecycle. “With wikis, clients can easily find the information they want, helping them to quickly answer their own questions,” observes Short.

    The decision to use GitLab has had a significant impact on both development and culture, with Short remarking, “Essentially, we look at GitLab as a building block, and we just build whatever we need on top of it. Whether it’s a wiki or a custom integration, GitLab helps create an engineering culture.”

    “At Trek10, an Amazon Web Services Advanced Consulting Partner and MSP Partner, we run many of our business and technology operations on GitLab. This includes everything from collaboratively developing internal software, laying out and managing clients projects, to documentation via wikis and management of deployments via GitLab CI. All of our GitLab Infrastructure runs within our own Virtual Private Cloud in AWS (VPC). We use GitLab CI to build, test and deploy AWS infrastructure. Whether it be containers on Fargate and ECS, or serverless solutions with Lambda and API Gateway, GItLab and its integrated CI help us seamlessly and securely manage deployments across many AWS accounts on a daily basis for our clients as well as our own practice,” Short continued.

    “Essentially, we look at GitLab as a building block, and we just build whatever we need on top of it. Whether it’s a wiki or a custom integration, GitLab helps create an engineering culture.”
    Jared Short
    Director of Innovation

    the results

    Increased visibility accelerates developer velocity

    By moving to GitLab, Trek10 increased developer velocity, improved client relationships, and fostered trust and transparency. Review apps have created a direct link between developers and clients, increasing communication and allowing them to seamlessly collaborate in an improved development flow. “The concept of review apps is powerful, because developers can work within their own environment, while QA can test the features in isolation. Showing progress to executives with review apps has been a valuable component in increasing developer velocity,” says Short.

    Clients have positively responded to the comprehensive wikis and issues, which Short says is a reassuring source of information for clients, since “…they know that they have a place to go and immediately see everything.” Furthermore, the ability to collaborate directly with developers allows clients to maintain an active role in the development lifecycle.

    Trek10 uses GitLab as the core piece of an end-to-end solution for full transparency. As Short explains, “GitLab is a cohesive experience. We keep building off GitLab, because it works well when everybody lives in this little world that we created. If you adopt the philosophy and understand it, then it works.”

    Using GitLab as a project management application helps Trek10 focus on innovating solutions for its clients. “Our business runs on GitLab. It’s a central point of our operations,” Short proclaims. After using GitLab, Short emphatically believes in the application, revealing, “Because GitLab hasn’t broken for us in the past two and a half years, we auto update every day.”

    Committed to visibility and collaboration, Trek10 uses GitLab to speed up development, strengthen client relationships, and create innovative solutions.

    “Because GitLab hasn’t broken for us in the past two and a half years, we auto update every day.”
    Jared Short
    Director of Innovation

    All information and persons involved in case study are accurate at the time of publication.