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

posta 4 anni fa321 visualizzazioni
1 Risposta
0

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

con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande