mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +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_NAME: ${{ steps.set_db_credentials.outputs.db_name }}
|
||||
ECR_URI: ${{ steps.set_ecr_credentials.outputs.ecr_uri }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
# 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)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ provider:
|
|||
DB_PASSWORD: ${env:DB_PASSWORD}
|
||||
DB_PORT: ${env:DB_PORT}
|
||||
ECR_URI: ${env:ECR_URI}
|
||||
GITHUB_SHA: ${env:GITHUB_SHA}
|
||||
# Give lambda access to read from the bucket
|
||||
iam:
|
||||
role:
|
||||
|
|
@ -43,7 +44,7 @@ custom:
|
|||
functions:
|
||||
app:
|
||||
image:
|
||||
uri: ${env:ECR_URI}:latest
|
||||
uri: ${env:ECR_URI}:${env:GITHUB_SHA}
|
||||
events:
|
||||
- http:
|
||||
path: /{proxy+}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue