【发布时间】:2023-04-01 02:58:02
【问题描述】:
- 我将在 lambda 中执行以下命令以生成预签名 URL
'''
import boto3
from botocore.client import Config
def lambda_handler(event, context):
s3 = boto3.client('s3', config=Config(signature_version='s3v4'))
url = s3.generate_presigned_url(
'put_object',
Params={
'Bucket': 'XXX-profile',
'Key': 'test',
'ContentType': 'image/jpeg',
'ACL': 'public-read'},
ExpiresIn=600
)
return url
''' 2. 一旦我得到 URL,我就会尝试从邮递员那里发布图片
请你帮忙看看我的错误在哪里..我找不到。
【问题讨论】:
-
你的身体怎么样
binary? -
我曾经在邮递员的正文中添加一个文件
标签: python amazon-web-services amazon-s3 aws-lambda pre-signed-url