This sample demonstrates how to connect to a Cloud Function (gen2) from an Apigee API Proxy.
Cloud Functions is Google Cloud's Functions-as-a-Service offering.
This sample will use a Cloud Function that responds to HTTP calls. In this sample, the Cloud Function runs with the identity of a specific service account, and the Apigee proxy that invokes it, runs with the identity of a different service account.
-
Access to import and deploy proxies to Apigee, and deploy Cloud Functions
-
Configure external access for API traffic to your Apigee X instance
There are two ways to use this sample:
-
Click a link to follow the guided tutorial that relies on GCP Cloud Shell.
-
Follow the steps Manually in your own terminal.
The two following sections provide the guidance for these respective options. You only need one!
Click the link to follow a tutorial that runs right within GCP Cloud Shell. Follow the instructions as shown on the right hand side of your browser window.
You will need to open a Linux-like terminal in order to follow these steps. The Debian variant in Google Cloud Shell works; MacOS works; sorry, Powershell does not. This sample demonstrates how to connect to a Cloud Function from an Apigee Proxy.
Make sure the following tools are available in your terminal's PATH
- gcloud SDK
- unzip
- curl
- jq
- npm
Cloud Shell has all of these pre-configured. If you use your own machine, you will need to install these yourself.
After you've insured the pre-requisites are in order, you can get started. Follow the steps in Manual-Steps.md.