Skip to content

Commit

Permalink
Updates 2024-07-10 - Lambda function refresh Git Action
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Jul 10, 2024
1 parent 1bb2e8e commit 53a9fc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/lambda_zipper.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Zip Lambda Jobs and Upload to S3

name: Herding Cats Lambda Deploy
on:
push:
branches:
- main
paths:
- 'herding_cats_pipelines/lambda_jobs/**'

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -20,7 +18,6 @@ jobs:
run: pip install ruff
- name: Run Ruff
run: ruff check ./herding_cats_pipelines/lambda_jobs

zip-and-upload:
needs: lint
runs-on: ubuntu-latest
Expand All @@ -41,4 +38,10 @@ jobs:
- name: Upload to S3
run: |
cd ./herding_cats_pipelines/lambda_jobs
aws s3 cp lambda_herding_cats_jobs.zip s3://${{ secrets.S3_BUCKET_NAME }}/lambda_herding_cats_jobs.zip
aws s3 cp lambda_herding_cats_jobs.zip s3://${{ secrets.S3_BUCKET_NAME }}/lambda_herding_cats_jobs.zip
- name: Update Lambda Function
run: |
aws lambda update-function-code \
--function-name ${{ secrets.LAMBDA_FUNCTION_NAME }} \
--s3-bucket ${{ secrets.LAMBDA_BUCKET }} \
--s3-key lambda_herding_cats_jobs.zip
2 changes: 1 addition & 1 deletion herding_cats_pipelines/lambda_jobs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def lambda_handler(event, context) -> json:
Body=json.dumps(data),
ContentType='application/json'
)
logger.success("Data Successfully Dumped!!!")
logger.success("Data Was Successfully Dumped!")

return {
'statusCode': 200,
Expand Down

0 comments on commit 53a9fc0

Please sign in to comment.