API Gateway Models are defined using JSON Schema. You can reference a Model inside another Model using the $ref field. If you are familiar with the OpenAPI Specification fka Swagger, you may have seen something like this:
{ |
To make model references work with API Gateway, you need to provide an absolute reference that is predefined by AWS: https://apigateway.amazonaws.com/restapis/$ApiId/models/$ModelName
Let’s translate this to a CloudFormation template:
{ |
That’s it. Now you can build sophisticated API Gateway models that reference each other in CloudFormation.
Discover more from Free Exam Prep By IT Professionals | CertificationTest | ExamTopics
Subscribe to get the latest posts sent to your email.
- Reduce GitHub runner costs by leveraging EC2 spot instances
- Show Me Your Architecture Vol. 2: Platform Engineering on AWS
- A neglected serverless data store: Cloud Directory
- Review: Amazon Aurora Serverless – A cloud-native and production-ready relational database?
- EC2 Instance Connect is an insecure default!

















