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
gefragt vor 5 Jahren370 Aufrufe
1 Antwort
0

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

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

TobyP
beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen