Alternatives to AWS Lambda logo

Alternatives to AWS Lambda

Serverless, Azure Functions, AWS Elastic Beanstalk, AWS Step Functions, and Google App Engine are the most popular alternatives and competitors to AWS Lambda.
24K
432

What is AWS Lambda and what are its top alternatives?

AWS Lambda is a compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, and security.
AWS Lambda is a tool in the Serverless / Task Processing category of a tech stack.

Top Alternatives to AWS Lambda

  • Serverless
    Serverless

    Build applications comprised of microservices that run in response to events, auto-scale for you, and only charge you when they run. This lowers the total cost of maintaining your apps, enabling you to build more logic, faster. The Framework uses new event-driven compute services, like AWS Lambda, Google CloudFunctions, and more. ...

  • Azure Functions
    Azure Functions

    Azure Functions is an event driven, compute-on-demand experience that extends the existing Azure application platform with capabilities to implement code triggered by events occurring in virtually any Azure or 3rd party service as well as on-premises systems. ...

  • AWS Elastic Beanstalk
    AWS Elastic Beanstalk

    Once you upload your application, Elastic Beanstalk automatically handles the deployment details of capacity provisioning, load balancing, auto-scaling, and application health monitoring. ...

  • AWS Step Functions
    AWS Step Functions

    AWS Step Functions makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Building applications from individual components that each perform a discrete function lets you scale and change applications quickly. ...

  • Google App Engine
    Google App Engine

    Google has a reputation for highly reliable, high performance infrastructure. With App Engine you can take advantage of the 10 years of knowledge Google has in running massively scalable, performance driven systems. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. ...

  • AWS Batch
    AWS Batch

    It enables developers, scientists, and engineers to easily and efficiently run hundreds of thousands of batch computing jobs on AWS. It dynamically provisions the optimal quantity and type of compute resources (e.g., CPU or memory optimized instances) based on the volume and specific resource requirements of the batch jobs submitted. ...

  • AWS Fargate
    AWS Fargate

    AWS Fargate is a technology for Amazon ECS and EKS* that allows you to run containers without having to manage servers or clusters. With AWS Fargate, you no longer have to provision, configure, and scale clusters of virtual machines to run containers. ...

  • Docker
    Docker

    The Docker Platform is the industry-leading container platform for continuous, high-velocity innovation, enabling organizations to seamlessly build and share any application — from legacy to what comes next — and securely run them anywhere ...

AWS Lambda alternatives & related posts

Serverless logo

Serverless

1.3K
1.2K
26
The most widely-adopted toolkit for building serverless applications
1.3K
1.2K
+ 1
26
PROS OF SERVERLESS
  • 14
    API integration
  • 7
    Supports cloud functions for Google, Azure, and IBM
  • 3
    Lower cost
  • 1
    Auto scale
  • 1
    Openwhisk
CONS OF SERVERLESS
    Be the first to leave a con

    related Serverless posts

    Praveen Mooli
    Engineering Manager at Taylor and Francis · | 19 upvotes · 4M views

    We are in the process of building a modern content platform to deliver our content through various channels. We decided to go with Microservices architecture as we wanted scale. Microservice architecture style is an approach to developing an application as a suite of small independently deployable services built around specific business capabilities. You can gain modularity, extensive parallelism and cost-effective scaling by deploying services across many distributed servers. Microservices modularity facilitates independent updates/deployments, and helps to avoid single point of failure, which can help prevent large-scale outages. We also decided to use Event Driven Architecture pattern which is a popular distributed asynchronous architecture pattern used to produce highly scalable applications. The event-driven architecture is made up of highly decoupled, single-purpose event processing components that asynchronously receive and process events.

    To build our #Backend capabilities we decided to use the following: 1. #Microservices - Java with Spring Boot , Node.js with ExpressJS and Python with Flask 2. #Eventsourcingframework - Amazon Kinesis , Amazon Kinesis Firehose , Amazon SNS , Amazon SQS, AWS Lambda 3. #Data - Amazon RDS , Amazon DynamoDB , Amazon S3 , MongoDB Atlas

    To build #Webapps we decided to use Angular 2 with RxJS

    #Devops - GitHub , Travis CI , Terraform , Docker , Serverless

    See more
    Nitzan Shapira

    At Epsagon, we use hundreds of AWS Lambda functions, most of them are written in Python, and the Serverless Framework to pack and deploy them. One of the issues we've encountered is the difficulty to package external libraries into the Lambda environment using the Serverless Framework. This limitation is probably by design since the external code your Lambda needs can be usually included with a package manager.

    In order to overcome this issue, we've developed a tool, which we also published as open-source (see link below), which automatically packs these libraries using a simple npm package and a YAML configuration file. Support for Node.js, Go, and Java will be available soon.

    The GitHub respoitory: https://github.com/epsagon/serverless-package-external

    See more
    Azure Functions logo

    Azure Functions

    672
    699
    62
    Listen and react to events across your stack
    672
    699
    + 1
    62
    PROS OF AZURE FUNCTIONS
    • 14
      Pay only when invoked
    • 11
      Great developer experience for C#
    • 9
      Multiple languages supported
    • 7
      Great debugging support
    • 5
      Can be used as lightweight https service
    • 4
      Easy scalability
    • 3
      WebHooks
    • 3
      Costo
    • 2
      Event driven
    • 2
      Azure component events for Storage, services etc
    • 2
      Poor developer experience for C#
    CONS OF AZURE FUNCTIONS
    • 1
      No persistent (writable) file system available
    • 1
      Poor support for Linux environments
    • 1
      Sporadic server & language runtime issues
    • 1
      Not suited for long-running applications

    related Azure Functions posts

    Kestas Barzdaitis
    Entrepreneur & Engineer · | 16 upvotes · 769.2K views

    CodeFactor being a #SAAS product, our goal was to run on a cloud-native infrastructure since day one. We wanted to stay product focused, rather than having to work on the infrastructure that supports the application. We needed a cloud-hosting provider that would be reliable, economical and most efficient for our product.

    CodeFactor.io aims to provide an automated and frictionless code review service for software developers. That requires agility, instant provisioning, autoscaling, security, availability and compliance management features. We looked at the top three #IAAS providers that take up the majority of market share: Amazon's Amazon EC2 , Microsoft's Microsoft Azure, and Google Compute Engine.

    AWS has been available since 2006 and has developed the most extensive services ant tools variety at a massive scale. Azure and GCP are about half the AWS age, but also satisfied our technical requirements.

    It is worth noting that even though all three providers support Docker containerization services, GCP has the most robust offering due to their investments in Kubernetes. Also, if you are a Microsoft shop, and develop in .NET - Visual Studio Azure shines at integration there and all your existing .NET code works seamlessly on Azure. All three providers have serverless computing offerings (AWS Lambda, Azure Functions, and Google Cloud Functions). Additionally, all three providers have machine learning tools, but GCP appears to be the most developer-friendly, intuitive and complete when it comes to #Machinelearning and #AI.

    The prices between providers are competitive across the board. For our requirements, AWS would have been the most expensive, GCP the least expensive and Azure was in the middle. Plus, if you #Autoscale frequently with large deltas, note that Azure and GCP have per minute billing, where AWS bills you per hour. We also applied for the #Startup programs with all three providers, and this is where Azure shined. While AWS and GCP for startups would have covered us for about one year of infrastructure costs, Azure Sponsorship would cover about two years of CodeFactor's hosting costs. Moreover, Azure Team was terrific - I felt that they wanted to work with us where for AWS and GCP we were just another startup.

    In summary, we were leaning towards GCP. GCP's advantages in containerization, automation toolset, #Devops mindset, and pricing were the driving factors there. Nevertheless, we could not say no to Azure's financial incentives and a strong sense of partnership and support throughout the process.

    Bottom line is, IAAS offerings with AWS, Azure, and GCP are evolving fast. At CodeFactor, we aim to be platform agnostic where it is practical and retain the flexibility to cherry-pick the best products across providers.

    See more
    Michal Nowak

    In a couple of recent projects we had an opportunity to try out the new Serverless approach to building web applications. It wasn't necessarily a question if we should use any particular vendor but rather "if" we can consider serverless a viable option for building apps. Obviously our goal was also to get a feel for this technology and gain some hands-on experience.

    We did consider AWS Lambda, Firebase from Google as well as Azure Functions. Eventually we went with AWS Lambdas.

    PROS
    • No servers to manage (obviously!)
    • Limited fixed costs – you pay only for used time
    • Automated scaling and balancing
    • Automatic failover (or, at this level of abstraction, no failover problem at all)
    • Security easier to provide and audit
    • Low overhead at the start (with the certain level of knowledge)
    • Short time to market
    • Easy handover - deployment coupled with code
    • Perfect choice for lean startups with fast-paced iterations
    • Augmentation for the classic cloud, server(full) approach
    CONS
    • Not much know-how and best practices available about structuring the code and projects on the market
    • Not suitable for complex business logic due to the risk of producing highly coupled code
    • Cost difficult to estimate (helpful tools: serverlesscalc.com)
    • Difficulty in migration to other platforms (Vendor lock⚠️)
    • Little engineers with experience in serverless on the job market
    • Steep learning curve for engineers without any cloud experience

    More details are on our blog: https://evojam.com/blog/2018/12/5/should-you-go-serverless-meet-the-benefits-and-flaws-of-new-wave-of-cloud-solutions I hope it helps 🙌 & I'm curious of your experiences.

    See more
    AWS Elastic Beanstalk logo

    AWS Elastic Beanstalk

    2.1K
    1.8K
    241
    Quickly deploy and manage applications in the AWS cloud.
    2.1K
    1.8K
    + 1
    241
    PROS OF AWS ELASTIC BEANSTALK
    • 77
      Integrates with other aws services
    • 65
      Simple deployment
    • 44
      Fast
    • 28
      Painless
    • 16
      Free
    • 4
      Well-documented
    • 3
      Independend app container
    • 2
      Postgres hosting
    • 2
      Ability to be customized
    CONS OF AWS ELASTIC BEANSTALK
    • 2
      Charges appear automatically after exceeding free quota
    • 1
      Lots of moving parts and config
    • 0
      Slow deployments

    related AWS Elastic Beanstalk posts

    Julien DeFrance
    Principal Software Engineer at Tophatter · | 16 upvotes · 3.2M views

    Back in 2014, I was given an opportunity to re-architect SmartZip Analytics platform, and flagship product: SmartTargeting. This is a SaaS software helping real estate professionals keeping up with their prospects and leads in a given neighborhood/territory, finding out (thanks to predictive analytics) who's the most likely to list/sell their home, and running cross-channel marketing automation against them: direct mail, online ads, email... The company also does provide Data APIs to Enterprise customers.

    I had inherited years and years of technical debt and I knew things had to change radically. The first enabler to this was to make use of the cloud and go with AWS, so we would stop re-inventing the wheel, and build around managed/scalable services.

    For the SaaS product, we kept on working with Rails as this was what my team had the most knowledge in. We've however broken up the monolith and decoupled the front-end application from the backend thanks to the use of Rails API so we'd get independently scalable micro-services from now on.

    Our various applications could now be deployed using AWS Elastic Beanstalk so we wouldn't waste any more efforts writing time-consuming Capistrano deployment scripts for instance. Combined with Docker so our application would run within its own container, independently from the underlying host configuration.

    Storage-wise, we went with Amazon S3 and ditched any pre-existing local or network storage people used to deal with in our legacy systems. On the database side: Amazon RDS / MySQL initially. Ultimately migrated to Amazon RDS for Aurora / MySQL when it got released. Once again, here you need a managed service your cloud provider handles for you.

    Future improvements / technology decisions included:

    Caching: Amazon ElastiCache / Memcached CDN: Amazon CloudFront Systems Integration: Segment / Zapier Data-warehousing: Amazon Redshift BI: Amazon Quicksight / Superset Search: Elasticsearch / Amazon Elasticsearch Service / Algolia Monitoring: New Relic

    As our usage grows, patterns changed, and/or our business needs evolved, my role as Engineering Manager then Director of Engineering was also to ensure my team kept on learning and innovating, while delivering on business value.

    One of these innovations was to get ourselves into Serverless : Adopting AWS Lambda was a big step forward. At the time, only available for Node.js (Not Ruby ) but a great way to handle cost efficiency, unpredictable traffic, sudden bursts of traffic... Ultimately you want the whole chain of services involved in a call to be serverless, and that's when we've started leveraging Amazon DynamoDB on these projects so they'd be fully scalable.

    See more

    We initially started out with Heroku as our PaaS provider due to a desire to use it by our original developer for our Ruby on Rails application/website at the time. We were finding response times slow, it was painfully slow, sometimes taking 10 seconds to start loading the main page. Moving up to the next "compute" level was going to be very expensive.

    We moved our site over to AWS Elastic Beanstalk , not only did response times on the site practically become instant, our cloud bill for the application was cut in half.

    In database world we are currently using Amazon RDS for PostgreSQL also, we have both MariaDB and Microsoft SQL Server both hosted on Amazon RDS. The plan is to migrate to AWS Aurora Serverless for all 3 of those database systems.

    Additional services we use for our public applications: AWS Lambda, Python, Redis, Memcached, AWS Elastic Load Balancing (ELB), Amazon Elasticsearch Service, Amazon ElastiCache

    See more
    AWS Step Functions logo

    AWS Step Functions

    240
    390
    31
    Build Distributed Applications Using Visual Workflows
    240
    390
    + 1
    31
    PROS OF AWS STEP FUNCTIONS
    • 7
      Integration with other services
    • 5
      Easily Accessible via AWS Console
    • 5
      Complex workflows
    • 5
      Pricing
    • 3
      Scalability
    • 3
      Workflow Processing
    • 3
      High Availability
    CONS OF AWS STEP FUNCTIONS
      Be the first to leave a con

      related AWS Step Functions posts

      Shared insights
      on
      AWS Step FunctionsAWS Step FunctionsAirflowAirflow

      I am working on a project that grabs a set of input data from AWS S3, pre-processes and divvies it up, spins up 10K batch containers to process the divvied data in parallel on AWS Batch, post-aggregates the data, and pushes it to S3.

      I already have software patterns from other projects for Airflow + Batch but have not dealt with the scaling factors of 10k parallel tasks. Airflow is nice since I can look at which tasks failed and retry a task after debugging. But dealing with that many tasks on one Airflow EC2 instance seems like a barrier. Another option would be to have one task that kicks off the 10k containers and monitors it from there.

      I have no experience with AWS Step Functions but have heard it's AWS's Airflow. There looks to be plenty of patterns online for Step Functions + Batch. Do Step Functions seem like a good path to check out for my use case? Do you get the same insights on failing jobs / ability to retry tasks as you do with Airflow?

      See more
      Matheus Moreira
      Backend Engineer at IntuitiveCare · | 5 upvotes · 244.9K views
      Shared insights
      on
      AWS Step FunctionsAWS Step FunctionsAirflowAirflow

      We have some lambdas we need to orchestrate to get our workflow going. In the past, we already attempted to use Airflow as the orchestrator, but the need to coordinate the tasks in a database generates an overhead that we cannot afford. For our use case, there are hundreds of inputs per minute and we need to scale to support all the inputs and have an efficient way to analyze them later. The ideal product would be AWS Step Functions since it can manage our load demand graciously, but it is too expensive and we cannot afford that. So, I would like to get alternatives for an orchestrator that does not need a complex backend, can manage hundreds of inputs per minute, and is not too expensive.

      See more
      Google App Engine logo

      Google App Engine

      10.2K
      8K
      611
      Build web applications on the same scalable systems that power Google applications
      10.2K
      8K
      + 1
      611
      PROS OF GOOGLE APP ENGINE
      • 145
        Easy to deploy
      • 106
        Auto scaling
      • 80
        Good free plan
      • 62
        Easy management
      • 56
        Scalability
      • 35
        Low cost
      • 32
        Comprehensive set of features
      • 28
        All services in one place
      • 22
        Simple scaling
      • 19
        Quick and reliable cloud servers
      • 6
        Granular Billing
      • 5
        Easy to develop and unit test
      • 5
        Monitoring gives comprehensive set of key indicators
      • 3
        Really easy to quickly bring up a full stack
      • 3
        Create APIs quickly with cloud endpoints
      • 2
        No Ops
      • 2
        Mostly up
      CONS OF GOOGLE APP ENGINE
        Be the first to leave a con

        related Google App Engine posts

        Nick Rockwell
        SVP, Engineering at Fastly · | 12 upvotes · 433.4K views

        So, the shift from Amazon EC2 to Google App Engine and generally #AWS to #GCP was a long decision and in the end, it's one that we've taken with eyes open and that we reserve the right to modify at any time. And to be clear, we continue to do a lot of stuff with AWS. But, by default, the content of the decision was, for our consumer-facing products, we're going to use GCP first. And if there's some reason why we don't think that's going to work out great, then we'll happily use AWS. In practice, that hasn't really happened. We've been able to meet almost 100% of our needs in GCP.

        So it's basically mostly Google Kubernetes Engine , we're mostly running stuff on Kubernetes right now.

        #AWStoGCPmigration #cloudmigration #migration

        See more
        Aliadoc Team

        In #Aliadoc, we're exploring the crowdfunding option to get traction before launch. We are building a SaaS platform for website design customization.

        For the Admin UI and website editor we use React and we're currently transitioning from a Create React App setup to a custom one because our needs have become more specific. We use CloudFlare as much as possible, it's a great service.

        For routing dynamic resources and proxy tasks to feed websites to the editor we leverage CloudFlare Workers for improved responsiveness. We use Firebase for our hosting needs and user authentication while also using several Cloud Functions for Firebase to interact with other services along with Google App Engine and Google Cloud Storage, but also the Real Time Database is on the radar for collaborative website editing.

        We generally hate configuration but honestly because of the stage of our project we lack resources for doing heavy sysops work. So we are basically just relying on Serverless technologies as much as we can to do all server side processing.

        Visual Studio Code definitively makes programming a much easier and enjoyable task, we just love it. We combine it with Bitbucket for our source code control needs.

        See more
        AWS Batch logo

        AWS Batch

        90
        250
        6
        Fully Managed Batch Processing at Any Scale
        90
        250
        + 1
        6
        PROS OF AWS BATCH
        • 3
          Containerized
        • 3
          Scalable
        CONS OF AWS BATCH
        • 3
          More overhead than lambda
        • 1
          Image management

        related AWS Batch posts

        AWS Fargate logo

        AWS Fargate

        599
        405
        0
        Run Containers Without Managing Infrastructure
        599
        405
        + 1
        0
        PROS OF AWS FARGATE
          Be the first to leave a pro
          CONS OF AWS FARGATE
          • 2
            Expensive

          related AWS Fargate posts

          Cyril Duchon-Doris

          We build a Slack app using the Bolt framework from slack https://api.slack.com/tools/bolt, a Node.js express app. It allows us to easily implement some administration features so we can easily communicate with our backend services, and we don't have to develop any frontend app since Slack block kit will do this for us. It can act as a Chatbot or handle message actions and custom slack flows for our employees.

          This app is deployed as a microservice on Amazon EC2 Container Service with AWS Fargate. It uses very little memory (and money) and can communicate easily with our backend services. Slack is connected to this app through a ALB ( AWS Elastic Load Balancing (ELB) )

          See more
          Sujith Kattathara Bhaskaran

          Heroku is unable to handle payment issues arising due to Indian Reserve Bank's decision to stop recurring card payments. I am using the following Heroku services:

          1. Web Dyno
          2. Worker Dyno (Scheduler)
          3. Cron To Go (Queue)
          4. ClearDB (MySQL)
          5. Heroku Redis (Queue Driver)

          I have to migrate my Apache/ PHP/ Laravel/ HTML/ CSS/ jQuery/ MySQL application hosted on Heroku to a new provider. My current options visible are:

          1. AWS Fargate
          2. AWS Beanstalk
          3. Quovery
          4. Microsoft Azure
          5. Laravel Vapor
          6. Laravel Forge

          Does anyone have any guidance on which of the above options (or any other option not identified above) is recommended for migrating away from Heroku? and why?

          See more
          Docker logo

          Docker

          174.2K
          140K
          3.9K
          Enterprise Container Platform for High-Velocity Innovation.
          174.2K
          140K
          + 1
          3.9K
          PROS OF DOCKER
          • 823
            Rapid integration and build up
          • 692
            Isolation
          • 521
            Open source
          • 505
            Testa­bil­i­ty and re­pro­ducibil­i­ty
          • 460
            Lightweight
          • 218
            Standardization
          • 185
            Scalable
          • 106
            Upgrading / down­grad­ing / ap­pli­ca­tion versions
          • 88
            Security
          • 85
            Private paas environments
          • 34
            Portability
          • 26
            Limit resource usage
          • 17
            Game changer
          • 16
            I love the way docker has changed virtualization
          • 14
            Fast
          • 12
            Concurrency
          • 8
            Docker's Compose tools
          • 6
            Fast and Portable
          • 6
            Easy setup
          • 5
            Because its fun
          • 4
            Makes shipping to production very simple
          • 3
            It's dope
          • 3
            Highly useful
          • 2
            Does a nice job hogging memory
          • 2
            Open source and highly configurable
          • 2
            Simplicity, isolation, resource effective
          • 2
            MacOS support FAKE
          • 2
            Its cool
          • 2
            Docker hub for the FTW
          • 2
            HIgh Throughput
          • 2
            Very easy to setup integrate and build
          • 2
            Package the environment with the application
          • 2
            Super
          • 0
            Asdfd
          CONS OF DOCKER
          • 8
            New versions == broken features
          • 6
            Unreliable networking
          • 6
            Documentation not always in sync
          • 4
            Moves quickly
          • 3
            Not Secure

          related Docker posts

          Simon Reymann
          Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 11.1M views

          Our whole DevOps stack consists of the following tools:

          • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
          • Respectively Git as revision control system
          • SourceTree as Git GUI
          • Visual Studio Code as IDE
          • CircleCI for continuous integration (automatize development process)
          • Prettier / TSLint / ESLint as code linter
          • SonarQube as quality gate
          • Docker as container management (incl. Docker Compose for multi-container application management)
          • VirtualBox for operating system simulation tests
          • Kubernetes as cluster management for docker containers
          • Heroku for deploying in test environments
          • nginx as web server (preferably used as facade server in production environment)
          • SSLMate (using OpenSSL) for certificate management
          • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
          • PostgreSQL as preferred database system
          • Redis as preferred in-memory database/store (great for caching)

          The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

          • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
          • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
          • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
          • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
          • Scalability: All-in-one framework for distributed systems.
          • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
          See more
          Tymoteusz Paul
          Devops guy at X20X Development LTD · | 23 upvotes · 9.7M views

          Often enough I have to explain my way of going about setting up a CI/CD pipeline with multiple deployment platforms. Since I am a bit tired of yapping the same every single time, I've decided to write it up and share with the world this way, and send people to read it instead ;). I will explain it on "live-example" of how the Rome got built, basing that current methodology exists only of readme.md and wishes of good luck (as it usually is ;)).

          It always starts with an app, whatever it may be and reading the readmes available while Vagrant and VirtualBox is installing and updating. Following that is the first hurdle to go over - convert all the instruction/scripts into Ansible playbook(s), and only stopping when doing a clear vagrant up or vagrant reload we will have a fully working environment. As our Vagrant environment is now functional, it's time to break it! This is the moment to look for how things can be done better (too rigid/too lose versioning? Sloppy environment setup?) and replace them with the right way to do stuff, one that won't bite us in the backside. This is the point, and the best opportunity, to upcycle the existing way of doing dev environment to produce a proper, production-grade product.

          I should probably digress here for a moment and explain why. I firmly believe that the way you deploy production is the same way you should deploy develop, shy of few debugging-friendly setting. This way you avoid the discrepancy between how production work vs how development works, which almost always causes major pains in the back of the neck, and with use of proper tools should mean no more work for the developers. That's why we start with Vagrant as developer boxes should be as easy as vagrant up, but the meat of our product lies in Ansible which will do meat of the work and can be applied to almost anything: AWS, bare metal, docker, LXC, in open net, behind vpn - you name it.

          We must also give proper consideration to monitoring and logging hoovering at this point. My generic answer here is to grab Elasticsearch, Kibana, and Logstash. While for different use cases there may be better solutions, this one is well battle-tested, performs reasonably and is very easy to scale both vertically (within some limits) and horizontally. Logstash rules are easy to write and are well supported in maintenance through Ansible, which as I've mentioned earlier, are at the very core of things, and creating triggers/reports and alerts based on Elastic and Kibana is generally a breeze, including some quite complex aggregations.

          If we are happy with the state of the Ansible it's time to move on and put all those roles and playbooks to work. Namely, we need something to manage our CI/CD pipelines. For me, the choice is obvious: TeamCity. It's modern, robust and unlike most of the light-weight alternatives, it's transparent. What I mean by that is that it doesn't tell you how to do things, doesn't limit your ways to deploy, or test, or package for that matter. Instead, it provides a developer-friendly and rich playground for your pipelines. You can do most the same with Jenkins, but it has a quite dated look and feel to it, while also missing some key functionality that must be brought in via plugins (like quality REST API which comes built-in with TeamCity). It also comes with all the common-handy plugins like Slack or Apache Maven integration.

          The exact flow between CI and CD varies too greatly from one application to another to describe, so I will outline a few rules that guide me in it: 1. Make build steps as small as possible. This way when something breaks, we know exactly where, without needing to dig and root around. 2. All security credentials besides development environment must be sources from individual Vault instances. Keys to those containers should exist only on the CI/CD box and accessible by a few people (the less the better). This is pretty self-explanatory, as anything besides dev may contain sensitive data and, at times, be public-facing. Because of that appropriate security must be present. TeamCity shines in this department with excellent secrets-management. 3. Every part of the build chain shall consume and produce artifacts. If it creates nothing, it likely shouldn't be its own build. This way if any issue shows up with any environment or version, all developer has to do it is grab appropriate artifacts to reproduce the issue locally. 4. Deployment builds should be directly tied to specific Git branches/tags. This enables much easier tracking of what caused an issue, including automated identifying and tagging the author (nothing like automated regression testing!).

          Speaking of deployments, I generally try to keep it simple but also with a close eye on the wallet. Because of that, I am more than happy with AWS or another cloud provider, but also constantly peeking at the loads and do we get the value of what we are paying for. Often enough the pattern of use is not constantly erratic, but rather has a firm baseline which could be migrated away from the cloud and into bare metal boxes. That is another part where this approach strongly triumphs over the common Docker and CircleCI setup, where you are very much tied in to use cloud providers and getting out is expensive. Here to embrace bare-metal hosting all you need is a help of some container-based self-hosting software, my personal preference is with Proxmox and LXC. Following that all you must write are ansible scripts to manage hardware of Proxmox, similar way as you do for Amazon EC2 (ansible supports both greatly) and you are good to go. One does not exclude another, quite the opposite, as they can live in great synergy and cut your costs dramatically (the heavier your base load, the bigger the savings) while providing production-grade resiliency.

          See more