mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-09-02 23:51:02 +02:00
gh actions works (#149)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Use the official AWS Lambda Python 3.13 base image from public ECR
|
||||
FROM public.ecr.aws/lambda/python:3.13-arm64
|
||||
|
||||
# Copy function code
|
||||
COPY alpr_counts.py ${LAMBDA_TASK_ROOT}
|
||||
|
||||
# Install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Set the CMD to your handler
|
||||
CMD ["alpr_counts.lambda_handler"]
|
||||
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
import boto3
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
@@ -76,8 +77,8 @@ def lambda_handler(event, context):
|
||||
}
|
||||
|
||||
s3 = boto3.client('s3')
|
||||
bucket = 'cdn.deflock.me'
|
||||
key = 'alpr-counts.json'
|
||||
bucket = os.environ['OUTPUT_BUCKET']
|
||||
key = os.environ.get('OUTPUT_KEY', 'alpr-counts.json')
|
||||
|
||||
s3.put_object(
|
||||
Bucket=bucket,
|
||||
|
||||
Reference in New Issue
Block a user