Serverless Developer Guide
Greedy path variables
If you want to handle the routing implementation outside of API Gateway, for example inside a 
Lambda function, you can use a greedy path variable in the form of a proxy resource {proxy+} to 
match all the child resources of a route for both HTTP and REST APIs.
Here are two examples of using greedy path variables:
• Use /{proxy+} to match both /users and /users/{UserID} routes
• Use the ANY method for a /{proxy+} resource at the root of your API to match all HTTP method 
types
Related resource(s):
• Use a proxy resource to streamline API setup – Set up a proxy resource and greedy path variable 
for REST APIs.
• Working with routes for HTTP APIs – Set up a greedy path variable for HTTP APIs
WebSocket APIs
WebSocket APIs are a connection of WebSocket routes that are integrated with backend HTTP 
endpoints, Lambda functions, or other AWS services. A client can send messages to a service, and 
services can independently send messages to clients, making these APIs bidirectional. Because 
of this, WebSocket APIs are often used as chat applications or for multiplayer games or ﬁnancial 
trading platforms.
Related resource(s):
• About WebSocket APIs in API Gateway - Get started with WebSocket APIs
• Tutorial: Building a serverless chat app with a WebSocket API, Lambda, and DynamoDB - 
Intermediate level WebSocket API tutorial using AWS CloudFormation
OpenAPI
The OpenAPI 3 deﬁnition allows you to import and export APIs using API Gateway. OpenAPI is a 
standard format that is language agnostic and vendor-neutral and is used to deﬁne and structure 
REST APIs. There are many Open API extensions to support the AWS-speciﬁc authorization and API 
Gateway-speciﬁc API interactions for REST APIs and HTTP APIs.
Advanced Topics 70