forked from swxsoc/sdc_aws_artifacts_lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlambda.py
More file actions
executable file
·30 lines (23 loc) · 800 Bytes
/
Copy pathlambda.py
File metadata and controls
executable file
·30 lines (23 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
This module contains the handler function and the main function
which contains the logic that initializes the FileProcessor class
in its correct environment.
"""
from typing import Any
from process_artifacts import process_artifacts
def handler(event: dict[str, Any], context: Any) -> dict[str, int | str]:
"""
Lambda handler that proxies to :func:`process_artifacts.handle_event`.
Parameters
----------
event : dict[str, Any]
Event data passed from the Lambda trigger.
context : Any
AWS Lambda context object.
Returns
-------
dict[str, int | str]
HTTP-style response with a ``statusCode`` (200 on success, 500 on
error) and a serialized ``body`` string.
"""
return process_artifacts.handle_event(event, context)