Chapter 24 Further Reading: Connecting Python to Cloud Services


Official Documentation

boto3 (AWS SDK for Python)

URL: https://boto3.amazonaws.com/v1/documentation/api/latest/index.html

The official boto3 documentation is comprehensive and well-organized. The S3 service reference at boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html covers every S3 operation with parameter descriptions and usage examples. The "User Guide" section is particularly useful for understanding authentication options and session management. Pay special attention to the "Error Handling" guide — understanding ClientError and how to read its response codes is essential for production code.


AWS S3 Documentation

URL: https://docs.aws.amazon.com/s3/

The AWS S3 documentation covers not just API reference but practical guides: bucket naming rules, storage classes (Standard, Infrequent Access, Glacier), lifecycle policies for automatic archival, and access control. The "Best Practices Design Patterns" guide explains S3 key naming for performance at scale — relevant when you have thousands of objects.


gspread Documentation

URL: https://docs.gspread.org/en/latest/

The gspread documentation is readable and example-driven. The "User Guide" section covers authentication (including the service account flow described in this chapter), reading data, writing data, and cell formatting. The API reference is useful when you need less common operations like appending rows, finding cells by value, or working with named ranges.


Google Sheets API Reference

URL: https://developers.google.com/sheets/api/reference/rest

When gspread's high-level methods are not enough, the raw Google Sheets API lets you do advanced operations: conditional formatting, merged cells, named ranges, charts. The batchUpdate endpoint is the workhorse for any formatting or structural changes. The "Samples" section has copy-paste examples for common operations.


python-dotenv Documentation

URL: https://saurabh-kumar.com/python-dotenv/

Short but complete documentation covering all load_dotenv() options: override parameter, .env.shared and .env.local patterns, using dotenv_values() as a dict instead of injecting into environment, and integration with frameworks like Django and Flask.


SQLAlchemy Documentation

URL: https://docs.sqlalchemy.org/en/20/

The SQLAlchemy 2.0 documentation is extensive. For this chapter's use cases, focus on the "Core Tutorial" (connection strings, creating engines, executing SQL) and the "ORM Quickstart" if you are interested in object-relational mapping. The "Connection Pooling" section explains pool_pre_ping, pool_size, and how SQLAlchemy manages connections to cloud databases.


AWS Security and IAM

AWS IAM Best Practices

URL: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html

AWS's own guide to identity and access management best practices. Covers least-privilege principles, when to use roles versus users, multi-factor authentication, and credential rotation. Essential reading before you manage production AWS credentials. The "Grant least privilege" section directly applies to the IAM policies discussed in this chapter.


AWS Secrets Manager Developer Guide

URL: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html

When .env files and environment variables are not enough — production applications with rotating credentials, multiple services sharing the same secret, or audit trail requirements — AWS Secrets Manager is the next step. This guide explains the concepts and shows Python examples for retrieving secrets at runtime.


Cloud Database Resources

Supabase Documentation

URL: https://supabase.com/docs

Supabase provides PostgreSQL plus a web dashboard, auto-generated REST API, real-time subscriptions, and more. The "Getting Started" guide covers creating a project and getting your connection string in under ten minutes. The "Python" section shows how to connect both via SQLAlchemy (as covered in this chapter) and via Supabase's own Python client.


Railway Documentation

URL: https://docs.railway.app

Railway's "Deploy PostgreSQL" guide walks through provisioning a database, finding the connection string, and connecting from a Python application. The platform's free tier is generous for development and small production workloads.


Serverless Computing

AWS Lambda Python Documentation

URL: https://docs.aws.amazon.com/lambda/latest/dg/python-handler.html

The Lambda Python handler documentation explains the required function signature, the event and context parameters, how to package dependencies (Lambda Layers), and how to test functions locally. The "Building Lambda functions with Python" tutorial is the best starting point for deploying your first Lambda.


AWS EventBridge Scheduler

URL: https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.html

EventBridge Scheduler is how you run Lambda functions on a schedule (the equivalent of cron in the cloud). The documentation shows how to create scheduled rules using cron expressions (cron(0 7 ? * MON *) for every Monday at 7 AM UTC) and how to attach them to Lambda functions.


Python and Cloud Patterns

Real Python: Python, Boto3, and AWS S3 Tutorial

URL: https://realpython.com/python-boto3-aws-s3/

A practical tutorial from Real Python covering S3 operations with boto3 including upload, download, listing, presigned URLs, and error handling. Written for Python developers rather than AWS experts, which aligns with this book's approach. Good supplementary examples for each concept in this chapter.


The Twelve-Factor App: Config

URL: https://12factor.net/config

A concise explanation of why application configuration (credentials, environment-specific settings) should live in environment variables rather than code. This is the theoretical foundation for the .env pattern. The full twelve-factor methodology describes how to build applications that are portable between environments — highly relevant as your Python scripts mature into production systems.


Security Resources

OWASP: Secrets Management Cheat Sheet

URL: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html

The Open Web Application Security Project's comprehensive guide to secrets management. Covers credential types, storage best practices, rotation strategies, and detection of exposed secrets. More detailed than this chapter's treatment — a useful reference when you need to explain your credential practices to an auditor or security team.


GitGuardian: How to Revoke Exposed Credentials

URL: https://blog.gitguardian.com/how-to-revoke-exposed-credentials/

If you ever accidentally commit credentials, this guide explains exactly what to do: revoke the credential first (before cleaning git history), check for unauthorized usage in cloud audit logs, and then clean the repository history. Reading this before you need it means you will respond calmly rather than panicking if it ever happens.


Video Learning

AWS S3 and Python with boto3 (AWS Training and Certification)

URL: https://explore.skillbuilder.aws/learn

AWS offers free self-paced training through AWS Skill Builder. The "Introduction to AWS Lambda" and "AWS Cloud Practitioner Essentials" courses are accessible to non-cloud-engineers and provide good context for the serverless concepts introduced in this chapter.


After completing this chapter, consider these learning paths:

If you want to go deeper on AWS: Start with the AWS Cloud Practitioner certification materials (free through AWS Skill Builder). It gives you the vocabulary and conceptual framework for all AWS services, not just S3 and Lambda.

If you want to go deeper on Google Cloud: The Google Cloud Skills Boost platform (cloud.google.com/learn) has free introductory courses on Cloud Storage and Cloud Functions that extend what this chapter introduces.

If you want to automate report delivery without serverless: Python's schedule library (pypi.org/project/schedule/) lets you run functions on a schedule within a long-running Python script. Simpler than Lambda for scripts that run on a machine you control.

If you want to move toward building web applications: The Flask framework (flask.palletsprojects.com) is the natural next step from "scripts that interact with Google Sheets" to "web application with a real user interface." Chapter 37 of this book covers Flask fundamentals.


Annotation note: All URLs were verified as active reference resources. Cloud documentation URLs may redirect to updated versions — search for the topic name if a link returns a 404.