Get image and save this inside "products/" (folder) and "product_id" (folder) in differents sizes.
pip install --target . json
pip install pip install --target . boto3
pip install pip install --target . requests
pip install pip install --target . PIL
pip install pip install --target . Pillow
_Error: cannot import name 'imaging' from 'PIL' Python 3.7 runtime
Pillow swouldswould ork but the solution is download the file and decompress inside in the same folder:
Pillow-7.1.2-cp37-cp37m-manylinux1_x86_64.whl
zip -x '.git' -x '.git/' -x 'documentation' -x 'documentation/' -r9 '../upload_images.zip' .
add Gateway for external connection.
Configure the python version and name of the lambda file and function:
Set time for wait the function run and set the memory quantity.
curl -X POST -k -H 'Content-Type: application/json' -i '<API endpoint>' --data '[{"url": "<source_image_name>", "bucket_prefix":"<prefix>", "bucket_name": "<bucket_name>", "bucket_suffix": "<suffix>", "product_id": "<folder_name>", "name": "<destination_file_name>"}]'