AWS API Gateway cannot connect to S3 bucket?

0

I'm a relatively new user to AWS trying to figure out how to set up API Gateway for the first time. I've been going through this tutorial to setup a REST API to work with S3 buckets: https://docs.aws.amazon.com/apigateway/latest/developerguide/integrating-api-with-aws-services-s3.html#api-folder-operations-as-s3-bucket-actions

Near the bottom of that document, in the last section (Call the API using a REST API Client), I cannot figure out how to get step 5 to work. Sending the command
PUT /S3/apig-demo-5/Readme.txt HTTP/1.1
results in a "Could not get any response: there was an error connecting to /S3/apig-demo-5/Readme.txt%20HTTP/1.1" error.

I also tried PUT https://<api-id>.execute-api.us-east-1.amazonaws.com/test/apig-demo-5/Readme.txt, but that command threw an error which told me to use the apig-demo-5.s3.amazonaws.com endpoint. I then tried PUT https://apig-demo-51.s3.amazonaws.com/Readme.txt, which failed with a Missing required header for this request: x-amz-content-sha256 error.

What should I be doing here? Sorry if I am missing something obvious, this is all extremely new to me.

TobyP
已提問 5 年前檢視次數 370 次
1 個回答
0

Figured it out, I followed the instructions wrong and configured Gateway incorrectly.

Edited by: TobyP on Jun 25, 2019 11:10 AM

TobyP
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南