Skip to main content

Install the Amazon API Gateway Example Application

Confirm 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 all six 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 should now be running 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/dashboard path 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.

AWS API Gateway Example ApplicationAWS API Gateway Example Application