Intermediate 25 min

Prerequisites

Before we start building, let’s make sure you have everything you need.

Technical Prerequisites

HTTP and JSON basics

  • You understand how web requests work
  • You can read JSON data
  • You know what GET and POST mean

Programming language

  • Comfortable with Node.js or Python
  • Can write simple functions
  • Understand basic error handling

Cloud account

  • AWS, Azure, or GCP account
  • Free tier is enough for this tutorial
  • Access to create resources

Account Setup

You’ll need accounts for:

  1. Cloud provider (choose one):

  2. Email service (choose one):

    • SendGrid: sendgrid.com (free tier: 100 emails/day)
    • Mailgun: mailgun.com (free tier: 5,000 emails/month)
    • AWS SES: Included with AWS account
    • Azure Logic Apps: Included with Azure account

Architecture Overview

Here’s how the components fit together:

1. Upload 2. Event 3. Invoke 4. Send File Upload Storage Bucket Event Trigger Serverless Function Email Service

Component Breakdown

1. Storage Bucket

  • Stores uploaded files
  • Emits events when files are added
  • Provides file metadata (name, size, path)

2. Event Trigger

  • Listens for storage events
  • Routes events to serverless function
  • Can filter by file type or path

3. Serverless Function

  • Receives event with file details
  • Processes the information
  • Calls email service

4. Email Service

  • Sends notification emails
  • Handles delivery and retries
  • Provides delivery status

Cloud Provider Services

Each cloud provider has different names for similar services. Here’s the mapping:

Storage:      Amazon S3 (Simple Storage Service)
Function:    AWS Lambda
Trigger:    S3 Event Notification
Email:      Amazon SES (Simple Email Service)
          OR SendGrid / Mailgun

Service Names:
- S3 Bucket → Storage bucket
- Lambda Function → Serverless function
- S3 Event → Trigger configuration
- SES → Email sending service

Service Comparison Table

ComponentAWSAzureGCP
StorageS3Blob StorageCloud Storage
FunctionLambdaFunctionsCloud Functions
TriggerS3 EventBlob TriggerStorage Trigger
EmailSESLogic AppsSendGrid/Mailgun

All three providers offer similar capabilities. The main differences are in naming and configuration steps.

Quick Setup Checklist

Before moving to the next page, complete these steps:

Cloud Account Setup

  • Create cloud account (AWS, Azure, or GCP)
  • Verify account (may require credit card for free tier)
  • Choose a region (pick one close to you)
  • Set up billing alerts (optional, but recommended)

Email Service Setup

  • Create email service account (SendGrid, Mailgun, or use cloud-native)
  • Get API key (save it securely, you’ll need it later)
  • Verify sender email (follow service instructions)
  • Test email sending (optional, but good to verify)

Development Environment

  • Install CLI tools (AWS CLI, Azure CLI, or gcloud)
  • Set up credentials (configure authentication)
  • Test CLI access (run a simple command to verify)

Knowledge Check

Let’s test your understanding of the architecture:

What’s Next?

Now that you understand the architecture, let’s start building. In the next page, we’ll create the storage bucket. This is where files will be uploaded and where events will originate.