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년 전377회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠