Skip to content

Add python-boto3-aws-s3 materials folder - #989

Open
realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-boto3-aws-s3-20261203
Open

realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-boto3-aws-s3-20261203

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the companion code for Python, Boto3, and AWS S3: Demystified, which had no materials folder.

The files mirror the full-update draft (admin: https://realpython.com/pbjt/blog/post/2434/change/): helpers.py holds the article's helper functions (create_bucket() with the us-east-1 location-constraint fix, create_temp_file(), copy_to_bucket(), enable_bucket_versioning(), delete_all_objects()), and s3_tutorial.py runs every step of the tutorial in order, including the ACL practice setup (ObjectWriter ownership plus removing the public access block), and then deletes everything it created. The one deviation: the download step writes to tempfile.gettempdir() instead of /tmp, so the script also runs on Windows. The pin matches the article's dependencies field: boto3==1.44.18.

Trello card: https://trello.com/c/9kv88ZKp

Verification (Python 3.15.2, venv on the pinned requirements plus moto[s3]==5.2.6; no real AWS credentials in the VM):

  • s3_tutorial.py ran end to end inside moto.mock_aws in both eu-west-1 and us-east-1. Output matches the tutorial's (grants, AES256, STANDARD_IA, Enabled, the traversals, and the delete lists), apart from random names, version IDs, and timestamps.
  • moto doesn't enforce the ACLs-disabled default for new buckets, so the ACL setup calls were checked against the AWS Object Ownership docs.
  • ruff format --check, ruff check (0.14.1), and dircheck.py pass.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant