我想通过API网关将图像上传到AWS lambda。如何从Lambda处理程序获取图像?
本地代码:
import requests
url = 'https://_________.execute-api.us-east-1.amazonaws.com/default/_________'
files = {'image': open('image.jpg', 'rb')}
r = requests.post(url, files=files)
print(r.content)
Lambda代码:
def lambda_handler(event, context):
image = event['image']??????????????<---HOW DO I GET THE IMAGE?????????????????
注意:我不想将图像上传到S3,然后从Lambda中从S3获取图像