Serverless application repository return a 500 error when including an openapi specification with Fn::Transform in DefinitonBody of serverless::api

0

Hi,

I'm currently creating a pipeline with CodePipeline which builds SAM templates for different services, and in some of these services we use a reference to an openapi specification through Fn::Transform and AWS::Include referencing a specification which is uploaded to an S3 bucket. This does not seem to be working when publishing a new version of the transformed SAM template to the Serverless Application Repository. I've investigated why this is and it does not seem to be the definition of the API itself (tried the most basic openapi specification possible with a single endpoint and no references) but specifically the:

DefinitionBody:
    "Fn::Transform":
      Name: "AWS::Include"
      Parameters:
        Location: <S3 link>

part that is failing. As soon as I remove that part the new version can be published.

This definition works just fine when deploying through "sam deploy". When we have done the "sam build" command we try to publish a new version of the transformed specification and get a 500 internal server error back. When looking into the aws cloudtrail we do not get any more specific information either. We cannot use DefinitionUri either to handle it due to the references between the SAM template and the openapi specification. I've tried to find information on how to do

Is there some alternative way to handle this issue which is supported by the Serverless Application Repository? Or is this an issue with serverless application repository itself?

Edit: Just to clarify, I have added permission to read the bucket for the serverless application repository (and verified it works)

asked 2 years ago92 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions