API Gateway V1 Build Issue - CloudFormation

0

Hello,

I'm trying to figure out in exactly what format CloudFormation requires the BodyS3Location to import an openapi file successfully. I have tried the bucket name in various formats, and nothing is working. My template is below. In API Gateway V2 I can simply put 'bca-cf-templates' and the Key, and it imports it without issue.

But due to either an API Gateway V2 issue or the fact that this is a REST API, when I try to do the same in V1 it fails saying it needs the endpoint, and then when I supply the endpoint, I get various errors, such as "the specified bucket does not exist."

Here are the formats I have tried, all to no avail (note, this is not the exact bucket name, i had to change it for security purposes for my company):
https://bca-cf-templates.s3-us-east-1.amazonaws.com
https://bca-cf-templates.s3-us-east-1.amazonaws.com/
https://bca-cf-templates.s3.amazonaws.com
https://bca-cf-templates.s3.amazonaws.com/
bca-cf-templates.s3-us-east-1.amazonaws.com
bca-cf-templates.s3.amazonaws.com

If I try any other format, such as s3://bca-cf-templates I get an error "The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint."

Not sure where to go here, hoping someone can provide some clarity.

Thanks!
Pat

Parameters:
APIBodyS3Location:
Description: Enter the S3 bucket where the API Body file exists
Type: String

APIBodyKey:
Description: Enter the S3 Key for the file
Type: String

Resources:
Gateway:
Type: AWS::ApiGateway::RestApi
Properties:
BodyS3Location:
Bucket: !Ref APIBodyS3Location
Key: !Ref APIBodyKey

Edited by: holycow02 on Feb 11, 2020 10:23 AM

已提問 4 年前檢視次數 303 次
1 個回答
0

Seems I was going across region for the bucket (CF in Ohio, bucket in N.Virginia).

已回答 4 年前

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

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

回答問題指南