AWS LAMBDA

AWS Lambda Creation and Automation

What is AWS Lambda

More about AWS Lambda

Summarizing: Just code and forget about the infrastructure.

About the Project

Part 1: Creating your First AWS Lambda Function

Stage 1: Create an AWS Account and Login

Stage 2: Navigate to the Lambda Service

Stage 3: Create your Lambda Function.

Stage 4: Code Your Lambda

from datetime import date

def lambda_handler(event, context):

today = date.today()
today = str(today)
print("Today`s date:", today)
return {
`statusCode`: 200
}

lambda_handler(1, 1)

Stage 5: Test Your Lambda

Stage 6: Experiment

Add On

Part 2: Automation of your AWS Lambda Function

Stage 1: Understanding the Process

Stage 2: Github Side Steps

name: deploy to lambda
on:
push:
branches:
- main
jobs:

deploy_source:
name: deploy lambda from source
runs-on: ubuntu-latest
steps:
- name: checkout source code
uses: actions/checkout@v1
- name: default deploy
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: eu-central-1
function_name: test-data
source: lambda_function.py

Summary

--

--

Full-Stack Data Scientist

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