This post explains how to create 1st gen HTTP Cloud Function in GCP.
Cloud Functions is a serverless execution environment for building and connecting cloud services. Cloud function is triggered when an event being watched is fired, or by an HTTP request. Learn more about Cloud Functions at https://cloud.google.com/functions
See Also: 1st vs 2nd gen Cloud Functions
See Also: How to create 2nd gen Cloud functions
1. Navigate to Google Cloud Console https://console.cloud.google.com/.
2. In the search bar type Cloud Functions and select Cloud Functions from the results.
3. Click on CREATE FUNCTION.
4. Enabled the required APIs.
5. Select the Environment, provide Function Name, select Region. From the Trigger select HTTP and note down the function URL.
6. In Authentication select Allow unauthenticated invocations and click on SAVE
7. Keep the default in Runtime, build, connection and security settings and click on NEXT.
8. In the Runtime select Python 3.9 and click on deploy.
9. Once the function deployment is complete, hit the URL from 5 and you should see below response in browser.
Category: GCP