-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9c5b6b
commit 765cb6b
Showing
10 changed files
with
757 additions
and
64 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.12 | ||
|
||
RUN dnf install -y git | ||
|
||
ARG reqs="lambda_requirements copy.txt" | ||
|
||
COPY ${reqs} ${LAMBDA_TASK_ROOT}/requirements.txt | ||
|
||
RUN pip install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" | ||
|
||
COPY src/ ${LAMBDA_TASK_ROOT} | ||
|
||
# Pass the name of the function handler as an argument to the runtime | ||
CMD [ "regtech_data_validator.lambda_wrapper_parquet.lambda_handler" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
polars | ||
awslambdaric | ||
pandera | ||
ujson | ||
boto3 | ||
tabulate | ||
fsspec | ||
s3fs | ||
sqlalchemy | ||
pydantic | ||
psycopg2-binary | ||
pyarrow |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[virtualenvs] | ||
in-project = true |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from regtech_data_validator.service_parquet import service_validate_parquet | ||
|
||
|
||
def lambda_handler(event, context): | ||
request = event['responsePayload'] if 'responsePayload' in event else event | ||
|
||
bucket = request['Records'][0]['s3']['bucket']['name'] | ||
file = request['Records'][0]['s3']['object']['key'] | ||
service_validate_parquet(bucket, file) | ||
|
||
|
||
# def test(): | ||
# event = { | ||
# "Records": [{ | ||
# "s3": { | ||
# "bucket": { | ||
# "name": "cfpb-regtech-devpub-lc-test" | ||
# }, | ||
# "object": { | ||
# "key": "upload/2024/1234364890REGTECH006/6265_pqs/" | ||
# }, | ||
# }} | ||
# ] | ||
# } | ||
# # s3://cfpb-regtech-devpub-lc-test/upload/2024/1234364890REGTECH006/6254.csv/ | ||
# lambda_handler(event, None) | ||
|
||
|
||
# if __name__ == "__main__": | ||
# test() |
Oops, something went wrong.