Install the Amazon API Gateway Example Application
kubectl is configured to point to the cluster and namespace you want to use for the Amazon API Gateway example application.
To install Styra on your Amazon API Gateway, copy and paste the installation commands from Systems > Settings > Install for your Amazon API Gateway system into your terminal. This will download the OPA configuration, deploy the Styra Local Plane (SLP) and OPA pod, and create the Lambda function and Amazon API Gateway.
The Amazon API Gateway System Quick Start provides the link to install the example application. It consists of the following components, which run in your Kubernetes cluster. All resources are suffixed by the
SYSTEM ID to mark them as unique.
- example-app: A simple HTTP web server that allows employees of a hypothetical organization to obtain salary details at the path
/finance/salary. It also exposes a
/hr/dashboardpath that is only accessible by HR employees. Functionally, it is a simple echo server that returns a HTTP 200 response with a plain-text body which contains a success or error message.
- slp: Styra Local Plane (SLP) is a service that acts as an intermediary between the OPAs and Styra DAS. OPAs are configured to retrieve bundles from the SLP rather than directly from Styra DAS. This increases availability as SLP fetches bundles from Styra DAS and persists them to disk, so policies are still available to new or restarted OPAs even if Styra DAS is unavailable.
When you run the Amazon API Gateway example application, the OPA pod will pull down the policy from your Styra DAS tenant and start enforcing it. This process takes a few minutes to complete.