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년 전328회 조회
1개 답변
0

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

답변함 4년 전

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

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

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

관련 콘텐츠