Skip to content

Commit

Permalink
Add AWS_REGION in code sample for S3 bucket (#1805)
Browse files Browse the repository at this point in the history
* Add AWS_REGION in code sample for S3 bucket

* Add additional context on why someone might want to set AWS_REGION

* Move comment to line above and shorten

* Update cloud_bucket_mount.py

Reword to clarify how this should be used

---------

Co-authored-by: Michael Waskom <mwaskom@users.noreply.github.com>
  • Loading branch information
yirenlu92 and mwaskom committed Jun 11, 2024
1 parent 865c3d5 commit 2b013d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modal/cloud_bucket_mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ class _CloudBucketMount:
app = modal.App() # Note: "app" was called "stub" up until April 2024
secret = modal.Secret.from_dict({
# Required: specify the access key of your AWS account
"AWS_ACCESS_KEY_ID": "...",
# Required: specify the secret access key of your AWS account
"AWS_SECRET_ACCESS_KEY": "...",
# Optional: specify the region of your S3 bucket.
# This can help when automatic detection of the bucket region fails.
"AWS_REGION": "...",
})
@app.function(
volumes={
Expand Down

0 comments on commit 2b013d0

Please sign in to comment.