/devinfra-aug-2024

Shared resources and instructions for the 24 August Meetup

Primary LanguagePython

Meetup : Deploy Serverless Infrastructure

Check Setup

curl -sL https://git.io/_has | bash -s terraform aws git zip unzip python3

Setup


Workshop

on appcd

  • set filename to app.zip
  • enable function url
  • environment variable: IMAGES_BUCKET=>

clone the lambda source repo

  • clone hello-kitty, cd hello-kitty
  • make build and copy build/app.zip to exported IaC folder

deploy exported IaC

  • copy above zip file in the directory where we exported

  • run terraform apply

  • cd hello-kitty

  • copy images to the s3 bucket

    • aws s3 cp images/ s3://<your-bucket-name>/ --recursive
  • terraform output

    • aws cli `aws lambda get-function-url-config --function-name | jq '.FunctionUrl'
  • Cleanup: terraform destroy