Amazon API Gateway REST to Amazon API Gateway REST

API Gateway REST API → API Gateway REST API

Create a primary API that centralizes configuration and securely proxies sub API endpoints.

This pattern creates a public Amazon API Gateway REST API endpoint that proxies two secondary API Gateway REST API endpoints. The primary gateway inserts an API Key that is validated by the secondary endpoints. Traffic is restricted to only requests coming through the primary API. This pattern allows centralized authorization, caching, throttling, and other API configurations.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-rest-apigw-rest

Deploy

sam deploy --guided


Testing

See testing in the README.md file in the repo

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Eric Johnson

Eric Johnson

Eric Johnson is a Principal Developer Advocate for Serverless Applications at Amazon Web Services and is based in Northern Colorado. Eric is a fanatic about serverless and enjoys helping developers understand how serverless technologies introduces a major paradigm shift in how they approach building and running applications at massive scale with minimal administration overhead. Prior to this, Eric has worked as a developer, solutions architect and AWS Evangelist for an AWS partner company.

Follow on LinkedIn