mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #144 from Hestia-Homes/main
added the reference to the github sha in the lambda function uri inst…
This commit is contained in:
commit
a4f4e8a16d
2 changed files with 3 additions and 1 deletions
1
.github/workflows/deploy_fastapi_backend.yml
vendored
1
.github/workflows/deploy_fastapi_backend.yml
vendored
|
|
@ -91,6 +91,7 @@ jobs:
|
||||||
DB_PORT: ${{ steps.set_db_credentials.outputs.db_port }}
|
DB_PORT: ${{ steps.set_db_credentials.outputs.db_port }}
|
||||||
DB_NAME: ${{ steps.set_db_credentials.outputs.db_name }}
|
DB_NAME: ${{ steps.set_db_credentials.outputs.db_name }}
|
||||||
ECR_URI: ${{ steps.set_ecr_credentials.outputs.ecr_uri }}
|
ECR_URI: ${{ steps.set_ecr_credentials.outputs.ecr_uri }}
|
||||||
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
# Fetch database credentials from AWS Secrets Manager
|
# Fetch database credentials from AWS Secrets Manager
|
||||||
SECRET_VALUE=$(aws secretsmanager get-secret-value --secret-id ${{ github.ref_name }}/assessment_model/db_credentials --query SecretString)
|
SECRET_VALUE=$(aws secretsmanager get-secret-value --secret-id ${{ github.ref_name }}/assessment_model/db_credentials --query SecretString)
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ provider:
|
||||||
DB_PASSWORD: ${env:DB_PASSWORD}
|
DB_PASSWORD: ${env:DB_PASSWORD}
|
||||||
DB_PORT: ${env:DB_PORT}
|
DB_PORT: ${env:DB_PORT}
|
||||||
ECR_URI: ${env:ECR_URI}
|
ECR_URI: ${env:ECR_URI}
|
||||||
|
GITHUB_SHA: ${env:GITHUB_SHA}
|
||||||
# Give lambda access to read from the bucket
|
# Give lambda access to read from the bucket
|
||||||
iam:
|
iam:
|
||||||
role:
|
role:
|
||||||
|
|
@ -43,7 +44,7 @@ custom:
|
||||||
functions:
|
functions:
|
||||||
app:
|
app:
|
||||||
image:
|
image:
|
||||||
uri: ${env:ECR_URI}:latest
|
uri: ${env:ECR_URI}:${env:GITHUB_SHA}
|
||||||
events:
|
events:
|
||||||
- http:
|
- http:
|
||||||
path: /{proxy+}
|
path: /{proxy+}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue