Lambda serves as a simple API endpoint.
- git clone <REPO_URL> && cd <REPO_FOLDER>
- mkdir packages && cd packages
- python3.12 -m venv .venv
- source .venv/bin/activate
- pip3 --ignore-installed -t . -r ../requirements.txt
- zip -r ../deployment_package.zip .
- cd ../ && zip -r deployment_package.zip lambda_function.py
- Navigate to https://console.aws.amazon.com/lambda/home and press
Create Function
- Choose the
Author from scratch
, specify whatever name you want, and selectPython 3.12
for the runtime. Keep the Architecturex86_64
. - Under
Change default execution role
you need to specify the IAM role withAdministratorAccess
(or with less permissions if you're sure on the list). - Under
Additional Configurations
tick theEnable function URL
withAuth type
isNONE
. - Press
Create function
. - Open the created function and under the
Code
tab pressUpload from
->.zip file
and choose earlier prepareddeployment_package.zip
.