serverless-application-model
serverless-application-model copied to clipboard
S3 Integration definitions in OpenAPI document are dropped in cloudformation processing
Description:
I have a SAM Project with an embedded OpenAPI file. This OpenAPI file contains definitions to integrate S3 via x-amazon-apigateway-integration
of type aws
. If I import this OpenAPI file directly on the API Gateway console, it works fine. If I do a sam deploy
, those S3 endpoints don't get deployed. When I check the processed template in Cloudformation Console, those endpoints have been stripped away - the unprocessed template still shows them.
Steps to reproduce the issue:
- Create a template.yaml file with included OpenAPI Definition
- In the OpenAPI definition, create S3 integration via x-
amazon-apigateway-integration
of typeaws
- Run
sam deploy
- Check deployed API / processed Cloudformation Template
Observed result:
S3 Integration Endpoints are not there
Expected result:
I expect S3 Integration Endpoints to be there
@k3vur What type of API are you using? Could you give us a sample template to reproduce the issue?
I was trying to provide S3 Upload / Download through API Gateway. The template.yaml file contains an inline OpenAPI spec with x-amazon-apigateway-integration
addons. As I already said, pasting the OpenAPI spec into the API Gateway Console import function (and un-indenting by 4 levels), it imports alright and works.
The Lambda function under /generate
imports fine via sam deploy
though.
I attached the template.yaml
file and edited out our IAM Role arns and bucket names.
Closing because Issue was due to using a reserved resource name and a fix was implemented in sam cli to warn users of this occuring 2907