Skip to content

Commit 5657896

Browse files
committed
start dry-running lambda deploy
1 parent c4b8c09 commit 5657896

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/deploy-to-lambda.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,18 @@ jobs:
5252
if: startsWith(github.ref, 'refs/tags/')
5353
with:
5454
files: dist/*.zip
55+
56+
- name: Deploy to Lambda
57+
uses: appleboy/lambda-action@v0.1.9
58+
with:
59+
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
60+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
61+
aws_region: us-east-1
62+
function_name: solesearch-api
63+
zip_file: $build_file
64+
timeout: 10
65+
handler: main.handler
66+
runtime: python3.12
67+
role: arn:aws:iam::930702711470:role/service-role/solesearch-api-role-qr34kqa5
68+
dry_run: true
69+
debug: true

src/api/main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
from fastapi import FastAPI
2-
3-
# from mangum import Mangum
4-
from starlette.middleware.sessions import SessionMiddleware
5-
2+
from mangum import Mangum
63
from src.api.routes import auth, sneakers
4+
from starlette.middleware.sessions import SessionMiddleware
75

86
app = FastAPI(
97
redoc_url=None,
@@ -14,4 +12,4 @@
1412

1513
app.include_router(sneakers.router)
1614
app.include_router(auth.router)
17-
# handler = Mangum(app)
15+
handler = Mangum(app)

0 commit comments

Comments
 (0)