DEV Community

Orbit Websites
Orbit Websites

Posted on

Win Big with Google Cloud NEXT '26: $1,000 in Prizes for the Best Cloud Stories

Win Big with Google Cloud NEXT '26: $1,000 in Prizes for the Best Cloud Stories

Google Cloud NEXT '26 is just around the corner — and this year, they’re not just showcasing new tech. They’re inviting developers like you to share real-world cloud stories for a shot at $1,000 in prizes.

Whether you’ve built a serverless app, migrated a legacy system, or automated DevOps with Terraform, Google wants to hear your journey. But how do you turn your project into a winning submission?

In this step-by-step, code-heavy guide, I’ll walk you through crafting a compelling, technical story — complete with working code, deployment steps, and best practices — that stands out to judges.


🎯 Step 1: Pick a Real Problem You Solved with Google Cloud

The best stories start with pain. Think: “Before GCP, we had X problem. After GCP, we achieved Y.”

Examples:

  • “Reduced API latency from 2s to 200ms using Cloud Run + Cloud SQL”
  • “Automated monthly reports with Cloud Functions and BigQuery”
  • “Scaled image processing with Cloud Storage + Pub/Sub + Cloud Functions”

👉 Your Turn: Choose one real project. We’ll use this example:

“I built a serverless URL shortener using Cloud Run, Firestore, and Firebase Hosting — cutting costs by 70% vs. EC2.”


💻 Step 2: Build & Document Your Project (With Code)

Let’s build a minimal version of the URL shortener. This gives your story technical credibility.

1. Set Up Your Environment

# Install Google Cloud CLI
curl https://sdk.cloud.google.com | bash
gcloud init

# Enable required APIs
gcloud services enable run.googleapis.com
gcloud services enable firestore.googleapis.com
gcloud services enable cloudbuild.googleapis.com
Enter fullscreen mode Exit fullscreen mode

2. Create the Flask App (main.py)

from flask import Flask, request, jsonify, redirect
from google.cloud import firestore
import string
import random

app = Flask(__name__)
db = firestore.Client()

def generate_short_id(length=6):
    return ''.join(random.choices(string.ascii_letters + string.digits, k=length))

@app.route('/shorten', methods=['POST'])
def shorten():
    data = request.get_json()
    long_url = data.get('url')
    if not long_url:
        return jsonify({'error': 'URL is required'}), 400

    short_id = generate_short_id()
    doc_ref = db.collection('urls').document(short_id)
    doc_ref.set({'long_url': long_url})

    return jsonify({'short_url': f"https://your-domain.com/{short_id}"}), 201

@app.route('/<short_id>')
def redirect_url(short_id):
    doc_ref = db.collection('urls').document(short_id)
    doc = doc_ref.get()

    if doc.exists:
        return redirect(doc.to_dict()['long_url'])
    else:
        return "Not found", 404

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
Enter fullscreen mode Exit fullscreen mode

3. Add requirements.txt

Flask==2.3.3
google-cloud-firestore==2.13.0
Enter fullscreen mode Exit fullscreen mode

4. Create Dockerfile

FROM python:3.11-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .

CMD ["python", "main.py"]
Enter fullscreen mode Exit fullscreen mode

🚀 Step 3: Deploy to Google Cloud Run

1. Build and Deploy

# Set your project ID
gcloud config set project YOUR_PROJECT_ID

# Build and deploy
gcloud run deploy url-shortener \
  --source . \
  --platform managed \
  --region us-central1 \
  --allow-unauthenticated
Enter fullscreen mode Exit fullscreen mode

✅ Output: You’ll get a public URL like https://url-shortener-abcd-uc.a.run.app

2. Test the API

curl -X POST https://url-shortener-abcd-uc.a.run.app/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://dev.to"}'
Enter fullscreen mode Exit fullscreen mode

Expected response:

{
  "short_url": "https://your-domain.com/aB3x9k"
}
Enter fullscreen mode Exit fullscreen mode

Now visit https://your-domain.com/aB3x9k — it redirects to Dev.to!


📊 Step 4: Add Monitoring (Bonus Points!)

Winning entries show observability. Let’s add Cloud Logging.

Update main.py:

import logging
import google.cloud.logging

# Enable Cloud Logging
client = google.cloud.logging.Client()
client.setup_logging()

@app.route('/shorten', methods=['POST'])
def shorten():
    logging.info("Shorten request received")
    # ... rest of code
    logging.info(f"Generated short ID: {short_id}")
    return jsonify(...)
Enter fullscreen mode Exit fullscreen mode

Now check logs in the Cloud Console.


🏆 Step 5: Write Your Story (Template Included)

Use this structure to submit:

Title

How I Built a Serverless URL Shortener on GCP — For $5/Month

Problem

I needed a cheap, scalable way to track and share links for my blog. Running EC2 was


Playful

Top comments (0)