From aaceebbab8294eeb4cfefd875915bf6456ec9248 Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Sun, 2 Feb 2025 17:00:03 -0600 Subject: [PATCH] cfn fixes --- .github/workflows/deploy-dev.yml | 14 +++++++++----- .github/workflows/deploy.yml | 14 +++++++++----- cloudformation/main.yml | 14 +++++++------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index f4aabe9..0ee2413 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -12,10 +12,10 @@ jobs: name: Run Unit Tests steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 for testing + - name: Set up Python 3.12 for testing uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Setup Node LTS uses: actions/setup-node@v4 with: @@ -36,6 +36,10 @@ jobs: - uses: aws-actions/setup-sam@v2 with: use-installer: true + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 - uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -84,10 +88,10 @@ jobs: - deploy-cf-pages-dev steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 for testing + - name: Set up Python 3.12 for testing uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Setup Node LTS uses: actions/setup-node@v4 with: @@ -102,4 +106,4 @@ jobs: RB_PLAYWRIGHT_USERNAME: ${{ secrets.RB_PLAYWRIGHT_USERNAME }} RB_PLAYWRIGHT_PASSWORD: ${{ secrets.RB_PLAYWRIGHT_PASSWORD }} RB_JWT_SECRET: ${{ secrets.RB_JWT_SECRET }} - CI: true \ No newline at end of file + CI: true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0803575..1ff0c05 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,10 +12,10 @@ jobs: name: Run Unit Tests steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 for testing + - name: Set up Python 3.12 for testing uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Setup Node LTS uses: actions/setup-node@v4 with: @@ -36,6 +36,10 @@ jobs: - uses: aws-actions/setup-sam@v2 with: use-installer: true + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 - uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -84,10 +88,10 @@ jobs: name: Perform live testing steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 for testing + - name: Set up Python 3.12 for testing uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Setup Node LTS uses: actions/setup-node@v4 with: @@ -169,4 +173,4 @@ jobs: - name: Call the API healthz endpoint run: curl -f https://resumes.aws.acmuiuc.org/api/v1/healthz - name: Call the base UI endpoint - run: curl -f https://resumes.acm.illinois.edu \ No newline at end of file + run: curl -f https://resumes.acm.illinois.edu diff --git a/cloudformation/main.yml b/cloudformation/main.yml index 580e819..fe4dff1 100644 --- a/cloudformation/main.yml +++ b/cloudformation/main.yml @@ -103,7 +103,7 @@ Resources: Properties: CodeUri: ../api AutoPublishAlias: live - Runtime: python3.10 + Runtime: python3.12 Description: Resume Book API Lambda - No VPC attachment FunctionName: !Sub ${LambdaFunctionName}-novpc Handler: app.lambda_handler @@ -131,7 +131,7 @@ Resources: Properties: CodeUri: ../api AutoPublishAlias: live - Runtime: python3.10 + Runtime: python3.12 Description: Resume Book API Lambda FunctionName: !Ref LambdaFunctionName Handler: app.lambda_handler @@ -161,7 +161,7 @@ Resources: Properties: CodeUri: ../api/authorizers/ AutoPublishAlias: live - Runtime: python3.10 + Runtime: python3.12 Description: Resume Book Auth Lambda FunctionName: !Ref AuthLambdaFunctionName Handler: combined.lambda_handler @@ -299,14 +299,14 @@ Resources: Condition: IsProd Properties: AlarmName: !Sub '${ResumeBookApiGWName}-latency-alarm' - AlarmDescription: !Sub 'Alarm if ${ResumeBookApiGWName} API gateway latency is > 3s.' + AlarmDescription: !Sub 'Alarm if ${ResumeBookApiGWName} API gateway latency is too high.' Namespace: 'AWS/ApiGateway' MetricName: 'Latency' - Statistic: 'Average' + ExtendedStatistic: 'tm99' Period: '60' - EvaluationPeriods: '1' + EvaluationPeriods: '5' ComparisonOperator: 'GreaterThanThreshold' - Threshold: '8000' + Threshold: '2000' AlarmActions: - !Ref AlertSNSArn Dimensions: