DevOps in a Serverless Environment: 7 Best Practices

7 Best Practices of DevOps in a Serverless Environment

Define the Process Before Implementing It

Your DevOps process should be treated with the same care that any other project gets — and that means defining it before you try and implement it. This way, you’ll create a reliable process that answers both the stakeholders’ needs and creates an optimal developer experience.

Document the Solution

Documenting your DevOps process is critical to success. For instance, what you see in the diagram below represents a tried and true DevOps process that has worked in real serverless environments. Documenting in as much detail as possible will help provide clarity and streamlines getting buy-in from impacted teams.

  • Playbooks
  • Checklists
  • Templates
  • Any other documentation that makes the processes consistent and repeatable
  • Folder structure
  • Build file location
  • Location of supporting DevOps files like deploy scripts

Use Source Control and a Good Branching Model

Our diagram above includes branching and source control within the process, and for a good reason. Using these tools is key to a successful DevOps process.

Use Automation

Of course, a best practices list for DevOps wouldn’t be complete without talking about leveraging automation. Your DevOps process should automate as much as is appropriate and feasible.

  • Deployments
  • QA
  • Security checks

CI/CD in the Lower Environments, Manual Approvals for Production

Continuous deployment in lower environments is a great way to accelerate the process. If a dev or test environment breaks due to a bad code release, no one will be overly concerned. If production breaks, however, you could have a full-blown incident on your hands.

Use Infrastructure as Code as Much as Possible

To put it plainly, it would be tough to manage a sizeable serverless footprint without using Infrastructure as Code (IaC). IaC is self-documenting, ensuring that all of your growing serverless services are documented, and it’s a key enabler of automated deployments.

  • CloudFormation: AWS CloudFormation templates describe resources and dependencies for stack deployments
  • SAM: Serverless Application Model (SAM) is an open-source framework used for IaC
  • Serverless Framework: Another open-source framework for IaC, written in Node.js for AWS Lambda
  • Terraform: A multi-cloud tool for IaC

Review Measures and Goals

While we’ve already talked about the importance of measurement and goals when we looked at common blind spots, it also belongs in any list of best practices for serverless DevOps.

  • Number of rollbacks
  • Deployment success
  • Deployment time
  • Bugs caught in QA
  • Downtime
  • Etc.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aaron Lieberman

Aaron Lieberman


Aaron’s passion for technology drives him to find innovative ways to help advance organizations through technology.