Skip to content

Commit

Permalink
feat: add uv to lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
eugypalu committed Oct 17, 2024
1 parent 2242d9b commit 54d7138
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
8 changes: 6 additions & 2 deletions aws_lambda/relayers_observer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# trunk-ignore-all(checkov/CKV_DOCKER_2)
# trunk-ignore-all(checkov/CKV_DOCKER_3)
# trunk-ignore-all(hadolint/DL3013)
# trunk-ignore-all(hadolint/DL3033)
FROM amazon/aws-lambda-python:3.10

Expand All @@ -10,8 +11,11 @@ RUN yum update -y && \

WORKDIR /var/task

COPY requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt setuptools
RUN pip install --no-cache-dir uv && uv venv

COPY pyproject.toml ./

RUN pip install --no-cache-dir -e '.[lambda-dependencies]'

COPY build ./build
COPY deployments ./deployments
Expand Down
30 changes: 30 additions & 0 deletions aws_lambda/relayers_observer/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[project]
name = "relayers_observer"
version = "0.1.0"
description = "Relayers Observer Lambda function"
requires-python = ">=3.10,<3.11"

[project.optional-dependencies]
lambda-dependencies = [
"starknet-py==0.23.0",
"python-dotenv==0.21.0",
"web3==6",
"async_lru==2.0.4",
"cairo-lang==0.13.1",
"requests==2.32.3",
"eth_keys==0.5.1",
"boto3==1.35.36",
]

cdk-dependencies = ["aws-cdk-lib==2.161.1", "constructs>=10.0.0,<11.0.0"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = [
"relayers_observer.py",
"relayers_observer_lambda_stack.py",
"app.py",
]
13 changes: 0 additions & 13 deletions aws_lambda/relayers_observer/requirements.txt

This file was deleted.

0 comments on commit 54d7138

Please sign in to comment.