Cloud is here to stay and more and more developers are seeking ways to effectively incorporate the cloud. Whether you are a startup recognizing limitations of your on-premise hardware and local machines or a large enterprise curious about how to slowly offload on-prem workloads, this tutorial will be insightful. I describe a phase 1 AWS architecture including Github, API Gateway, and AWS Lamba python functions. This represents an initial tutorial exposing developers to the AWS cloud adoption learning curve.

Notional Architecture:

Image for post

Architecture Diagram

The architecture above describes the basic CI/CD pipeline for deploying a python function with AWS Lambda. The developer represented above can pull and push their git repository to github using git. We configured the github actions YAML file to automatically update the AWS Lambda function once a pull request is merged to the master branch. The API Gateway represents a trigger which runs the AWS Lambda python function and returns a result. In this way, a Data Scientist (or analyst, frontend developer, or another developer) can trigger and access results in a quick and succinct fashion.

Note: AWS Lambda Functions exists in AWS Lambda, a compute resource inaccessible by the developer.

Purpose and Goals

This architecture represents an effective way for teams to build a robust CI/CD pipeline for application development and deployment. Though this architecture is “incomplete” with respect to a full-blown web application, this design can represent the first phase of building a web application. For anyone interested in offloading local compute resources, AWS Lambda serverless functions can be an effective way to leverage cloud in a cost-effective manner (AWS Lambda Functions are part of AWS always free tier). So many times, development teams design a lofty cloud based-architecture for application deployment (or migration) and fail. Conducting Proof-Of-Concepts and slowly incorporating cloud is more prudent.

#python #devops #api #data-science #aws-lambda #serverless

Git Actions with AWS Lambda Serverless Python Functions and API Gateway
3.15 GEEK