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

preguntada hace 4 años304 visualizaciones
1 Respuesta
0

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

respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas