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 年前327 查看次数
1 回答
0

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

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则