Upload object to s3 using aws api gateway service proxy
10,603
- Created a resource in the following order (root)/s3/{key}
- select service proxy
- select the desired region
- select the desired aws service(s3 in my case)
- In subdomain give bucket name
- In path override give the parameter as {key}(because to pass the bucketname dynamically)
- 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
- In url path parameters add "key" and mapped from as method.request.path.key
- Then deploy
Author by
krishna g
Updated on June 09, 2022Comments
-
krishna g almost 2 years
can any one help i have configured aws api gateway with post method using aws service proxy integration type, then i have configured the resource as s3 and gave bucket details as sub domain in action type i specefied PutObject finally created arn and used that,after all doing this i am able create a random folder in bucket but unable to upload a file which is json type
-
Oli about 8 yearsCould you please elaborate on steps 1, 6 and 8?
-
peralmq almost 8 years@Oli the steps are explained in more detail here docs.aws.amazon.com/apigateway/latest/developerguide/…
-
Aaron St. Clair over 4 yearsThank you for this concise explanation. I cannot find Step 5 about the subdomain in the detailed instructions, and that's where I was getting hung up. Official docs seems to imply the bucket should be in the path instead of the subdomain.