Update Products_Glue_Job.py #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AWS Resource Creation | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
Deploy_CFT: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Upload Scripts to S3 Bucket | |
run: | | |
aws s3 cp Products_Glue_Job.py s3://sarthak-dbda-final-project/github/products/ | |
aws s3 cp Sales.py s3://sarthak-dbda-final-project/github/sales/ | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} | |
- name: Deploy CloudFormation stack | |
run: | | |
aws cloudformation deploy \ | |
--stack-name AutomateStack \ | |
--template-file .github/workflows/automate.yml \ | |
--capabilities CAPABILITY_IAM | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} | |
# - name: Run Glue Job for Sales | |
# run: | | |
# aws glue start-job-run --region us-east-1 --job-name Sales_Glue_Job | |
# env: | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# AWS_DEFAULT_REGION: us-east-1 | |
# AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} | |
# | |
# - name: Run Glue Job for Products | |
# run: | | |
# aws glue start-job-run --region us-east-1 --job-name Product_Glue_Job | |
# env: | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# AWS_DEFAULT_REGION: us-east-1 | |
# AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} | |