I've successfully built an API Gateway integrated with Lambda which in turn writes out to S3. The gateway is also integrated with a Cognito user pool and I've even been able to pass the claim subject all the way back to S3 for use in partitioning the bucket. Really sweet!
The next item on my list has been to get the configuration out of AWS console and into infra-as-code using SAM. Leveraging an export of your gateway API is definitely the way to go with additionally provisioning via SAM. The AWS Serverless Land YouTube channel has a great video on doing exactly that - "Using OpenAPI in AWS SAM to manage API Gateway".
I was applying what I learned there to my case but didn't following every step exactly as noted. I was getting a nondescript error message when deploying and knew it had to be a SAM/template issue. Sure enough when I read the doc on how I was including the OpenAPI definition in my SAM template (via CodeUri instead of CodeBody) I found this:
The next item on my list has been to get the configuration out of AWS console and into infra-as-code using SAM. Leveraging an export of your gateway API is definitely the way to go with additionally provisioning via SAM. The AWS Serverless Land YouTube channel has a great video on doing exactly that - "Using OpenAPI in AWS SAM to manage API Gateway".
I was applying what I learned there to my case but didn't following every step exactly as noted. I was getting a nondescript error message when deploying and knew it had to be a SAM/template issue. Sure enough when I read the doc on how I was including the OpenAPI definition in my SAM template (via CodeUri instead of CodeBody) I found this:
Intrinsic functions are not supported in external OpenApi files referenced by DefinitionUri. Use instead the DefinitionBody property with the Include Transform to import an OpenApi definition into the template.