mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
check if lambda is set up correctly
This commit is contained in:
parent
6652553c04
commit
006eccf8ec
4 changed files with 29 additions and 4 deletions
25
.github/workflows/lambda_main.yml
vendored
25
.github/workflows/lambda_main.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Lambda Main Workflow
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [main, feautre/additional_features_in_condition_report_extraction]
|
||||
branches: [main, feautre/walthamforest_etl]
|
||||
|
||||
env:
|
||||
AWS_REGION: eu-west-2
|
||||
|
|
@ -67,3 +67,26 @@ jobs:
|
|||
git-sha: ${{ github.sha }}
|
||||
git-ref: ${{ github.ref_name }}
|
||||
|
||||
|
||||
walthamforest-etl:
|
||||
runs-on: ubuntu-latest
|
||||
needs: shared-lambda-terraform
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Build and deploy WalthamForest ETL
|
||||
uses: ./.github/workflows/actions/lambda-deploy
|
||||
with:
|
||||
lambda_name: walthamforest_etl
|
||||
dockerfile_path: ./deployment/lambda/walthamforest_etl/docker/Dockerfile
|
||||
ecr_tf_dir: ./deployment/lambda/walthamforest_etl/docker/
|
||||
lambda_tf_dir: ./deployment/lambda/walthamforest_etl/
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
git-sha: ${{ github.sha }}
|
||||
git-ref: ${{ github.ref_name }}
|
||||
|
|
@ -4,6 +4,8 @@ from pprint import pprint
|
|||
|
||||
def handler(event, context):
|
||||
# read data for houses only
|
||||
print("waltham forest set up correctly")
|
||||
return None
|
||||
df = pd.read_excel("../../home/Downloads/data.xlsx", sheet_name="Houses Asset Data")
|
||||
|
||||
element_cols = [
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# ECR repo
|
||||
resource "aws_ecr_repository" "walthamforest_etl" {
|
||||
name = "walthamforest_etl"
|
||||
name = "walthamforest_etl_ecr"
|
||||
}
|
||||
|
||||
# ECR policy to allow Lambda access
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ data "aws_ecr_repository" "walthamforest_etl_ecr" {
|
|||
name = "walthamforest_etl_ecr"
|
||||
}
|
||||
|
||||
# SQS queue for extractor_and_loader
|
||||
# SQS queue
|
||||
resource "aws_sqs_queue" "walthamforest_etl_queue" {
|
||||
name = "walthamforest_etl-queue"
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ resource "aws_iam_role_policy_attachment" "walthamforest_etl_policy_attach" {
|
|||
}
|
||||
|
||||
# Lambda function
|
||||
resource "aws_lambda_function" "waltham_forest_etl" {
|
||||
resource "aws_lambda_function" "walthamforest_etl" {
|
||||
function_name = "walthamforest_etl"
|
||||
role = data.aws_iam_role.lambda_exec_role.arn
|
||||
package_type = "Image"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue