简体   繁体   English

使用aws api网关服务代理将对象上传到s3

[英]Upload object to s3 using aws api gateway service proxy

任何一个帮助我已经使用aws服务代理集成类型使用post方法配置了aws api网关,然后我将资源配置为s3,并将操作类型中的存储桶详细信息作为子域提供给我specefied PutObject最终创建arn并使用它,毕竟这样做我可以在存储桶中创建一个随机文件夹,但无法上传json类型的文件

  1. Created a resource in the following order (root)/s3/{key} 按以下顺序创建资源(root)/ s3 / {key}
  2. select service proxy 选择服务代理
  3. select the desired region 选择所需的区域
  4. select the desired aws service(s3 in my case) 选择所需的aws服务(在我的情况下为s3)
  5. In subdomain give bucket name 在子域中给出桶名称
  6. In path override give the parameter as {key}(because to pass the bucketname dynamically) 在路径覆盖中,将参数设置为{key}(因为要动态传递bucketname)
  7. finally for api gateway service proxy we need to add the arn for detail explanation on creation of arn follow the document http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-aws-proxy.html 最后,对于api网关服务代理,我们需要添加arn以获取有关创建arn的详细说明,请按照文档http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-aws-proxy.html
  8. In url path parameters add "key" and mapped from as method.request.path.key 在url path参数中添加“key”并从method.request.path.key映射
  9. Then deploy 然后部署

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM