Skip to content

Instantly share code, notes, and snippets.

@maplebed
Created January 1, 2018 01:26
Show Gist options
  • Save maplebed/41dfd414eb0b56ef23bc0b133b342197 to your computer and use it in GitHub Desktop.
Save maplebed/41dfd414eb0b56ef23bc0b133b342197 to your computer and use it in GitHub Desktop.
today's adventure in iterating on a lambda python playground
#!/bin/bash
num=$(grep playver index.py | grep -E -o '[0-9]+')
newnum=$((num+1))
echo https://s3.amazonaws.com/mybucket/testlambda/archive${newnum}.zip
sed -i -e "s/= ${num}$/= ${newnum}/" index.py
python make-archive.py
aws s3 cp archive.zip s3://mybucket/testlambda/archive${newnum}.zip
aws lambda update-function-code --function-name testlambda_playground --s3-bucket mybucket --s3-key testlambda/archive${newnum}.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment