Secure Google Cloud Functions with API Gateway

Photo by Sara Julie on Unsplash — This glass probably need an API Gateway



Create Google Cloud Functions

mkdir listSmoothies
mkdir orderSmoothie
touch listSmoothies/
touch orderSmoothie/
touch listSmoothies/requirements.txt
touch orderSmoothie/requirements.txt
gcloud functions deploy listSmoothies --region=europe-west2 --trigger-http --entry-point listSmoothies --runtime python38 --no-allow-unauthenticated
gcloud functions deploy orderSmoothies --region=europe-west2 --trigger-http --entry-point orderSmoothies --runtime python38 --no-allow-unauthenticated

Create the API

  1. Connect to your Google Cloud Console :
gcloud services enable 
gcloud services enable
gcloud services enable

API Part

Name : SmoothAPIID : smoothapi

API Config Part

  1. Keep “Create new API config”
Api Config Name : Medium Config
Select “Cloud Function Invoker”

Gateway part

Name : SmoothAPI Gateway


Access the API

Huuuuurrrrayyyyyy!! Instagramable smoothies!!

Rate Limit & Secure the API with API Keys




Future Unicorn Founder — Using tech for good

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Developing our own Operating System (Part 08)

Battle Tested: How We Built and Master Our CI/CD Pipeline

CI/CD Easy Way With GitLab

Improve FHIR Search — GSoC 2020 with OpenMRS


Definition of Logic Gates | Positive and Negative Logic | Truth table | Types of Logic Gates

✨Harmony Launcher NFTO Whitelist on Genpad🔥

Building and Deploying C# Azure Functions using Multi-Stage Pipelines in Azure DevOps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Beranger Natanelic

Beranger Natanelic

Future Unicorn Founder — Using tech for good

More from Medium

Reduce DB upgrade downtime to less than 10 minutes using DMS on Google Cloud

Create your own API in Google Cloud with Terraform

Building a Scalable and Audit-Ready Event-Driven Application on Google Cloud Platform

Google Cloud Artifact Registry with GitHub Actions