Creating a Cloud Storage Bucket and Cloud Function | Scribe

    Creating a Cloud Storage Bucket and Cloud Function

    • Hafeez Baig |
    • 16 steps |
    • 39 seconds
    1
    Sign in into the **Google Cloud Platform**
    2
    Type "**Cloud Storage**" in the search bar and click on the **Cloud Storage** option
    information ordinal icon
    **What is Cloud Storage?**\ \ **Cloud Storage** in Google Cloud is a scalable, secure, and durable service for storing and retrieving large amounts of data, such as files, backups, and multimedia. It supports a wide range of use cases, including data archiving, serving website content, and hosting large datasets. You can store objects (files) in **buckets** and access them from anywhere via the web using Google's infrastructure.
    3
    **Buckets** wizard will open, click on the **CREATE** button
    4
    **Create a bucket** wizard will open, give the Name as - "**my_bucket_tied_with_cf_1_in28minutes**"
    5
    Scroll to the **Location type** section and select the option **Multi-region**
    6
    Scroll the page and click on the **CREATE** button
    7
    **my_bucket_tied_with_cf_1_in28minutes** wizard will open, here you can view all the details of the Bucket
    8
    Click on the **back** icon to go to **Buckets** wizard
    9
    On the **Buckets** wizard, scroll to the right side and click on the three dots for more options
    10
    Click on the option **Process with Cloud Run functions**
    information ordinal icon
    **What is Process with Cloud Run functions?**\ \ **Process with Cloud Run functions** refers to using Google Cloud Run to deploy and run containerized applications or services in response to HTTP requests or events. Cloud Run allows you to execute stateless functions or applications in a fully managed environment, scaling automatically based on demand. It integrates with other Google Cloud services, enabling you to process tasks like data transformation, API requests, or background jobs with minimal infrastructure management.
    11
    **Create function** wizard will open on the right side, here you can configure the Environment and Name
    12
    Scroll to the **Trigger type** dropdown section and select the option **Cloud Storage**
    13
    Scroll to the **Event Type** dropdown section and select the option **google.cloud.storage.object.v1.finalized**
    information ordinal icon
    **What is google.cloud.storage.object.v1.finalized?**\ \ `google.cloud.storage.object.v1.finalized` is an event type in Google Cloud that triggers when a new object is successfully created and finalized in a Cloud Storage bucket. This event indicates that the object upload or creation is complete, making it ready for access. It can be used to automate processes like triggering Cloud Functions or Cloud Run to perform tasks when a file is added to a bucket, such as processing, logging, or notifications.
    14
    Scroll to the **Runtime** dropdown section and select the option **Node.js 20** or whichever is the latest version
    information ordinal icon
    **What is Runtime:Node js?**\ \ **Runtime: Node.js** refers to the execution environment that supports applications written in JavaScript using Node.js in Google Cloud services like Cloud Functions or Cloud Run. It allows you to run JavaScript code on the server-side, handling tasks like HTTP requests, API processing, or event-driven workloads. Node.js is popular for building scalable, event-driven applications due to its asynchronous, non-blocking architecture.
    15
    Scroll to the code editor section, here you can modify the code
    16
    Scroll the page and click on the **DEPLOY FUNCTION** button