File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Python Scraper to AWS
2+
3+ on :
4+ push :
5+ branches :
6+ - release
7+ workflow_dispatch :
8+
9+ env :
10+ LAMBDA_FUNCTION_ARN : arn:aws:lambda:us-east-1:211635102441:function:TransnetLambda
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Configure AWS credentials
21+ uses : aws-actions/configure-aws-credentials@v4
22+ with :
23+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
24+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25+ aws-region : ${{ secrets.AWS_REGION }}
26+
27+ - name : Zip Lambda files
28+ # Zipping 'lambda_function.py' and 'models.py'
29+ run : zip lambda-deployment.zip lambda_function.py models.py
30+
31+ - name : Deploy to AWS Lambda
32+ run : |
33+ aws lambda update-function-code \
34+ --function-name ${{ env.LAMBDA_FUNCTION_ARN }} \
35+ --zip-file fileb://lambda-deployment.zip
You can’t perform that action at this time.
0 commit comments