Beam allows you to mount your own S3 buckets to your apps. Buckets are mounted using AWS’s mountpoint-s3. For an S3-compatible provider, configure its endpoint, region, credentials, and path-style requirements. Compatibility depends on the provider and the operations your application uses.Mountpoint is optimized for reading large files with high throughput and writing new files from a single client at a time. It does not provide full POSIX compliance. For instance, it does not support appending to files.
Cloud buckets allow you to expose your own S3-compatible storage as a file
system.
External S3 buckets are special cases of the volume abstraction with some extra configuration. To connect your bucket to your app, you need to provide the following:
The bucket name
An AWS access key
An AWS secret key
An S3 endpoint (if you’re using a non-AWS S3-compatible provider)
These will need to have permissions to read, write, and list objects in the bucket. Within AWS, you can use IAM policies to control these permissions. Other S3-compatible providers (like Cloudflare R2 and Tigris) often provide these keys when you sign up for their service.You will need to store the access key and secret key in Beam’s secret manager. You can do this using the Beam CLI:
When a request is received to start the container, Beam looks up these secrets and uses them to mount the bucket. This means that you can use any names you like for the secrets.
The secrets’ names must match the values you enter in the CloudBucketConfig.
The endpoint is optional. If you’re using AWS S3, you can omit it, but if you’re using a non-AWS S3-compatible provider, you will need to provide it.
from beam import CloudBucket, CloudBucketConfig, functionmount_path = "./weights"weights = CloudBucket( name="weights", mount_path=mount_path, config=CloudBucketConfig( access_key="S3_KEY", secret_key="S3_SECRET", ),)@function(volumes=[weights])def sandbox(): import os import uuid # Write to the bucket. file_name = f"{uuid.uuid4()}.txt" file_path = os.path.join(weights.mount_path, file_name) try: with open(file_path, "w") as f: f.write("hello world") except Exception as e: print(e) # Read from the bucket. with open(file_path, "r") as f: print(f.read())if __name__ == "__main__": sandbox.remote()
The name field in the CloudBucket constructor must be the name of the
bucket you created in the cloud provider.
You can specify a region for your bucket by setting the region field in the CloudBucketConfig. This option can be important when mounting AWS buckets.From mountpoint’s documentation:
Amazon S3 buckets are associated with a single AWS Region. Mountpoint attempts to automatically detect the region for your S3 bucket at startup time and directs all S3 requests to that region. However, in some scenarios like cross-region mount with a directory bucket, this region detection may fail, preventing your bucket from being mounted and displaying Access Denied or No Such Bucket errors.
If your bucket is in a different region than your Beam container, you might get charged egress fees by your cloud provider. You can read more about AWS S3 egress fees here.Check your storage provider’s current transfer and request pricing before selecting a region.
Was this page helpful?
⌘I
{"docsConfig":{"theme":"linden","$schema":"https://mintlify.com/docs.json","name":"Beam","description":"Beam provides CPU and GPU machines for agents, billed by the millisecond: persistent VMs that pause with their memory intact, sandboxes that boot in seconds, and GPU endpoints for inference.","colors":{"primary":"#477ff7","light":"#93c5fd","dark":"#2563eb"},"logo":{"light":"https://mintcdn.com/slai-beam/StmwwthCMFzpzgft/logo/dark-logo.svg?fit=max\u0026auto=format\u0026n=StmwwthCMFzpzgft\u0026q=85\u0026s=23387d001289bc6dcbe6be3f49769690","dark":"https://mintcdn.com/slai-beam/StmwwthCMFzpzgft/logo/light-logo.svg?fit=max\u0026auto=format\u0026n=StmwwthCMFzpzgft\u0026q=85\u0026s=0e0baef0b1593f56b60113ffd67fd744"},"favicon":"https://mintcdn.com/slai-beam/ZujHWu-L9dNBQS2M/logo/favicon.png?fit=max\u0026auto=format\u0026n=ZujHWu-L9dNBQS2M\u0026q=85\u0026s=b6614f50c2766c80749cc429d96a3a05","navbar":{"links":[{"href":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA","label":"Community"},{"href":"https://status.beam.cloud","label":"Status"}],"primary":{"type":"button","label":"Dashboard","href":"https://platform.beam.cloud"}},"footer":{"socials":{"website":"https://beam.cloud","github":"https://github.com/beam-cloud/beta9","slack":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA"}},"seo":{"metatags":{"og:image":"https://www.beam.cloud/meta-hero.png"},"indexing":"navigable"},"fonts":{"family":"Inter"},"integrations":{"ga4":{"measurementId":"G-XN1SS41L9X"},"posthog":{"apiKey":"phc_VhYc3jzbsDBBGtZHU3fLefqRq6wE8FxZLy1zJk1cLeB","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"instructions":["Install the Beam CLI, sign in, and connect coding agents to the Beam MCP server with `curl -fsSL https://www.beam.cloud/install | sh`. To also create a VM, run `curl -fsSL https://www.beam.cloud/install | sh -s -- --vm`.","VMs are persistent Linux machines without GPUs. Defaults: 4 CPUs, 8 GiB of RAM, a 50 GiB disk, Ubuntu 24.04, and a browser desktop. A running VM accrues usage until you stop, pause, or remove it, or until an idle timeout puts it to sleep.","Stopping a VM keeps its disk and discards RAM and processes. Pausing keeps both, and resuming restores them. To pause after 5 idle minutes and wake on access, run `beam vm update NAME --ttl 300 --idle-action pause --auto-resume`.","Core VM commands: `beam vm new NAME`, `beam vm ssh NAME`, `beam vm sync NAME ./dir`, `beam vm exec NAME -- CMD`, `beam vm expose NAME PORT --protected`, `beam vm fork NAME NEW_NAME`, `beam vm pause NAME`, `beam vm stop NAME`, `beam vm rm NAME`.","For GPUs, use a sandbox or a deployed endpoint. Sandboxes are disposable environments that boot in seconds and fork from snapshots.","Current rates are at https://www.beam.cloud/pricing."]},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Slack Community","icon":"slack","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA"},{"anchor":"Github","icon":"github","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://github.com/beam-cloud/beta9"},{"anchor":"Twitter","icon":"twitter","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://twitter.com/beam_cloud"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"slai-beam","hasAudioNarration":false,"actualSubdomain":"slai-beam","customDomains":["docs.beam.cloud"],"gitSource":{"type":"github","owner":"slai-labs","repo":"beam-docs","deployBranch":"main","contentDirectory":"","mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aebc6eaa34c0c6c22ffe281","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Documentation","count":83},{"language":"default","tag":"Examples","count":16},{"language":"default","tag":"Building Blocks","count":12},{"language":"default","tag":"Inference","count":11},{"language":"default","tag":"Virtual Machines","count":11},{"language":"default","tag":"Advanced Topics","count":9},{"language":"default","tag":"Start Here","count":9},{"language":"default","tag":"API Reference","count":7},{"language":"default","tag":"Sandboxes","count":7},{"language":"default","tag":"Data and Storage","count":5}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@beam.cloud"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a{padding:0.375rem 0.75rem;border-radius:9999px;background-color:rgb(243 244 246);color:rgb(17 24 39);font-size:0.875rem;line-height:1.25rem;transition:background-color 150ms ease}#navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a:hover{background-color:rgb(229 231 235);color:rgb(17 24 39)}.dark #navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a{background-color:rgb(255 255 255 / 0.08);color:rgb(255 255 255)}.dark #navbar ul:has(>#topbar-cta-button)>li:not(#topbar-cta-button)>a:hover{background-color:rgb(255 255 255 / 0.14);color:rgb(255 255 255)}#topbar-cta-button>a{padding:0.375rem 0.875rem;border-radius:9999px;border-color:transparent;background-color:#477ff7;color:#ffffff;transition:background-color 150ms ease}#topbar-cta-button>a:hover{background-color:#2563eb;color:#ffffff}#topbar-cta-button>a svg{display:none}"}],"page":{"pagePath":"v2/data/external-storage","slug":"/v2/data/external-storage","pageMetadata":{"title":"Mounting S3 Buckets","description":"Attach S3 buckets to your apps","icon":"bucket","href":"/v2/data/external-storage"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Attach S3 buckets to your apps\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Beam allows you to mount your own S3 buckets to your apps. Buckets are mounted using AWS’s `,_jsx(_components.a,{href:`https://github.com/awslabs/mountpoint-s3`,children:`mountpoint-s3`}),`. For an S3-compatible provider, configure its endpoint, region, credentials, and path-style requirements. Compatibility depends on the provider and the operations your application uses.`]}),`\n`,_jsx(_components.p,{children:`Mountpoint is optimized for reading large files with high throughput and writing new files from a single client at a time. It does not provide full POSIX compliance. For instance, it does not support appending to files.`}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Cloud buckets allow you to expose your own S3-compatible storage as a file\nsystem.`})}),`\n`,_jsx(Heading,{level:`3`,id:`mounting-an-s3-bucket`,children:`Mounting an S3 Bucket`}),`\n`,_jsxs(_components.p,{children:[`External S3 buckets are special cases of the `,_jsx(_components.a,{href:`/v2/data/volume`,children:`volume abstraction`}),` with some extra configuration. To connect your bucket to your app, you need to provide the following:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`The bucket name`}),`\n`,_jsx(_components.li,{children:`An AWS access key`}),`\n`,_jsx(_components.li,{children:`An AWS secret key`}),`\n`,_jsx(_components.li,{children:`An S3 endpoint (if you’re using a non-AWS S3-compatible provider)`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`These will need to have permissions to read, write, and list objects in the bucket. Within AWS, you can use `,_jsx(_components.a,{href:`https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html`,children:`IAM policies`}),` to control these permissions. Other S3-compatible providers (like Cloudflare R2 and Tigris) often provide these keys when you sign up for their service.`]}),`\n`,_jsxs(_components.p,{children:[`You will need to store the access key and secret key in Beam’s `,_jsx(_components.a,{href:`/v2/environment/secrets`,children:`secret manager`}),`. You can do this using the Beam CLI:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`beam`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secret`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` S3_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-access-key\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`beam`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secret`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` S3_SECRET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-secret-key\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When a request is received to start the container, Beam looks up these secrets and uses them to mount the bucket. This means that you can use any names you like for the secrets.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The secrets’ names must match the values you enter in the `,_jsx(_components.code,{children:`CloudBucketConfig`}),`.`]})}),`\n`,_jsx(_components.p,{children:`The endpoint is optional. If you’re using AWS S3, you can omit it, but if you’re using a non-AWS S3-compatible provider, you will need to provide it.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`37`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`37`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` beam `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CloudBucket, CloudBucketConfig, function`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`mount_path `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./weights\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`weights `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CloudBucket(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mount_path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`mount_path,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`CloudBucketConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` access_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S3_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` secret_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S3_SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`volumes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[weights])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sandbox`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Write to the bucket.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` file_name `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`uuid.uuid4()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.txt\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` file_path `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.path.join(weights.mount_path, file_name)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(file_path, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"w\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` f:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` f.write(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hello world\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(e)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Read from the bucket.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(file_path, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"r\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` f:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(f.read())`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sandbox.remote()`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`name`}),` field in the `,_jsx(_components.code,{children:`CloudBucket`}),` constructor must be the name of the\nbucket you created in the cloud provider.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`read-only-buckets`,children:`Read Only Buckets`}),`\n`,_jsxs(_components.p,{children:[`You can mount your bucket as read only by setting the `,_jsx(_components.code,{children:`read_only`}),` flag to `,_jsx(_components.code,{children:`True`}),`. This will prevent any writes to the bucket.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`weights `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CloudBucket(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mount_path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`CloudBucketConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` access_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S3_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` secret_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S3_SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` read_only`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`specifying-a-region`,children:`Specifying a region`}),`\n`,_jsxs(_components.p,{children:[`You can specify a region for your bucket by setting the `,_jsx(_components.code,{children:`region`}),` field in the `,_jsx(_components.code,{children:`CloudBucketConfig`}),`. This option can be important when mounting AWS buckets.`]}),`\n`,_jsxs(_components.p,{children:[`From mountpoint’s `,_jsx(_components.a,{href:`https://github.com/awslabs/mountpoint-s3/blob/main/doc/CONFIGURATION.md#region-detection`,children:`documentation`}),`:`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`Amazon S3 buckets are associated with a single AWS Region. Mountpoint attempts to automatically detect the region for your S3 bucket at startup time and directs all S3 requests to that region. However, in some scenarios like cross-region mount with a directory bucket, this region detection may fail, preventing your bucket from being mounted and displaying Access Denied or No Such Bucket errors.`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`weights `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CloudBucket(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mount_path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./weights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`CloudBucketConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` access_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S3_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` secret_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"S3_SECRET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` region`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"us-east-1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`egress-fees`,children:`Egress Fees`}),`\n`,_jsxs(_components.p,{children:[`If your bucket is in a different region than your Beam container, you might get charged egress fees by your cloud provider. You can read more about AWS S3 egress fees `,_jsx(_components.a,{href:`https://aws.amazon.com/s3/pricing/`,children:`here`}),`.`]}),`\n`,_jsx(_components.p,{children:`Check your storage provider’s current transfer and request pricing before selecting a region.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Mounting S3 Buckets","description":"Attach S3 buckets to your apps","icon":"bucket","href":"/v2/data/external-storage"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Mounting an S3 Bucket","slug":"mounting-an-s3-bucket","depth":3,"children":[]},{"title":"Read Only Buckets","slug":"read-only-buckets","depth":3,"children":[]},{"title":"Specifying a region","slug":"specifying-a-region","depth":3,"children":[]},{"title":"Egress Fees","slug":"egress-fees","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"slai-beam","siteName":"Beam","title":"Mounting S3 Buckets - Beam","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-30T22:35:02.980Z","originalFileLocation":"v2/data/external-storage.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Attach S3 buckets to your apps\">\u003cmeta data-mint-head name=\"application-name\" content=\"Beam\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Mounting S3 Buckets - Beam\">\u003cmeta data-mint-head property=\"og:description\" content=\"Attach S3 buckets to your apps\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Beam\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.beam.cloud/v2/data/external-storage\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://www.beam.cloud/meta-hero.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Mounting S3 Buckets - Beam\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Attach S3 buckets to your apps\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://www.beam.cloud/meta-hero.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/slai-beam/vbRSBpVzlMVt02hX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Beam\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#477ff7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.beam.cloud/v2/data/external-storage\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/data/external-storage.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.beam.cloud/#organization\",\"name\":\"Beam\",\"url\":\"https://docs.beam.cloud\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/slai-beam/StmwwthCMFzpzgft/logo/dark-logo.svg?fit=max\u0026auto=format\u0026n=StmwwthCMFzpzgft\u0026q=85\u0026s=23387d001289bc6dcbe6be3f49769690\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.beam.cloud#website\",\"name\":\"Beam\",\"url\":\"https://docs.beam.cloud\",\"publisher\":{\"@id\":\"https://docs.beam.cloud/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.beam.cloud/v2/data/external-storage#webpage\",\"url\":\"https://docs.beam.cloud/v2/data/external-storage\",\"name\":\"Mounting S3 Buckets\",\"description\":\"Attach S3 buckets to your apps\",\"dateModified\":\"2026-09-30T22:35:02.980Z\",\"isPartOf\":{\"@id\":\"https://docs.beam.cloud#website\"},\"breadcrumb\":{\"@id\":\"https://docs.beam.cloud/v2/data/external-storage#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.beam.cloud/v2/data/external-storage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Data and Storage\",\"item\":\"https://docs.beam.cloud/v2/data/databases\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mounting S3 Buckets\",\"item\":\"https://docs.beam.cloud/v2/data/external-storage\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.beam.cloud/v2/data/external-storage#article\",\"headline\":\"Mounting S3 Buckets\",\"name\":\"Mounting S3 Buckets\",\"description\":\"Attach S3 buckets to your apps\",\"url\":\"https://docs.beam.cloud/v2/data/external-storage\",\"mainEntityOfPage\":{\"@id\":\"https://docs.beam.cloud/v2/data/external-storage#webpage\"},\"image\":\"https://www.beam.cloud/meta-hero.png\",\"dateModified\":\"2026-09-30T22:35:02.980Z\",\"publisher\":{\"@id\":\"https://docs.beam.cloud/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.beam.cloud#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Beam\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Beam\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v2/data/external-storage.md","siteName":"Beam","nav":{"global":{"anchors":[{"anchor":"Slack Community","icon":"slack","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://join.slack.com/t/beam-cloud/shared_invite/zt-4bf7jalhy-KI0ebGXk4vKpcDofwDjCLA"},{"anchor":"Github","icon":"github","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://github.com/beam-cloud/beta9"},{"anchor":"Twitter","icon":"twitter","color":{"light":"#6365f1","dark":"#6365f1"},"href":"https://twitter.com/beam_cloud"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Start Here","pages":[{"title":"Introduction","icon":"table-rows","href":"/v2/getting-started/introduction"},{"title":"Give an Agent a Dev Box","sidebarTitle":"Virtual Machines","icon":"server","href":"/v2/getting-started/quickstart-vm"},{"title":"Run Agent Code in a Sandbox","sidebarTitle":"Sandboxes","icon":"box","href":"/v2/getting-started/quickstart-sandbox"},{"title":"Quickstart: Deploy an Endpoint","sidebarTitle":"Endpoints","icon":"hand-wave","href":"/v2/getting-started/quickstart"},{"title":"Set Up Coding Agents","icon":"plug","href":"/v2/getting-started/add-to-cursor-claude"},{"title":"Installation","icon":"download","href":"/v2/getting-started/installation"},{"title":"Authentication and Workspaces","icon":"key","href":"/v2/getting-started/authentication"},{"title":"Core Concepts","icon":"notebook","href":"/v2/getting-started/core-concepts"},{"title":"Using the Dashboard","icon":"browser","href":"/v2/getting-started/dashboard"}]},{"group":"Virtual Machines","pages":[{"title":"Overview","icon":"server","href":"/v2/vm/overview"},{"title":"Configuration","icon":"sliders","href":"/v2/vm/configuration"},{"title":"Secrets","icon":"lock","href":"/v2/vm/secrets"},{"title":"Lifecycle","icon":"power-off","href":"/v2/vm/lifecycle"},{"title":"Storage and Snapshots","icon":"database","href":"/v2/vm/storage"},{"title":"Commands and SSH","icon":"terminal","href":"/v2/vm/processes"},{"title":"Networking","icon":"network-wired","href":"/v2/vm/networking"},{"title":"Desktop","icon":"desktop","href":"/v2/vm/desktop"},{"title":"Docker and Compose","icon":"docker","href":"/v2/vm/docker"},{"title":"CLI Reference","icon":"code","href":"/v2/vm/cli"},{"title":"SDK","icon":"code","href":"/v2/vm/sdk"}]},{"group":"Sandboxes","pages":[{"title":"Overview","icon":"box","href":"/v2/sandbox/overview"},{"title":"Sandbox Configuration","icon":"wrench","href":"/v2/sandbox/configuration"},{"title":"Snapshots","icon":"camera","href":"/v2/sandbox/snapshots"},{"title":"Process Management","icon":"terminal","href":"/v2/sandbox/processes"},{"title":"Networking","icon":"globe","href":"/v2/sandbox/networking"},{"title":"File System Operations","icon":"folder","href":"/v2/sandbox/filesystem"},{"title":"Docker in Sandboxes","icon":"docker","href":"/v2/sandbox/docker"}]},{"group":"Inference","pages":[{"title":"Hosted Model Inference","icon":"brain","href":"/v2/endpoint/hosted-models"},{"title":"Creating a Web Endpoint","icon":"laptop-code","href":"/v2/endpoint/overview"},{"title":"Hosting a Web Server","icon":"server","href":"/v2/endpoint/web-server"},{"title":"Realtime and Streaming","icon":"bolt","href":"/v2/endpoint/realtime"},{"title":"Pre-Loading Models","icon":"circle-down","href":"/v2/endpoint/loaders"},{"title":"Cold Start Performance","icon":"rocket","href":"/v2/topics/cold-start"},{"title":"Keeping Containers Warm","icon":"hotjar","href":"/v2/endpoint/keep-warm"},{"title":"Concurrent Inputs","icon":"cubes-stacked","href":"/v2/scaling/concurrent-inputs"},{"title":"GPU Acceleration","icon":"microchip","href":"/v2/environment/gpu"},{"title":"Versioning","icon":"code-compare","href":"/v2/endpoint/versioning"},{"title":"Sending File Payloads","icon":"file","href":"/v2/endpoint/sending-file-payloads"}]},{"group":"Building Blocks","pages":[{"title":"Running Async Tasks","icon":"layer-group","href":"/v2/task-queue/running-tasks"},{"title":"Querying Task Status","icon":"check-double","href":"/v2/task-queue/query-status"},{"title":"Running Functions Remotely","icon":"cloud","href":"/v2/function/running-functions"},{"title":"Scheduled Jobs","icon":"clock","href":"/v2/function/scheduled-job"},{"title":"Queues","icon":"grip-lines","href":"/v2/function/queues"},{"title":"Distributed Maps","icon":"book","href":"/v2/function/maps"},{"title":"Deploy Containers","icon":"docker","href":"/v2/hosting/containers"},{"title":"Deployment Lifecycle","icon":"code-branch","href":"/v2/hosting/deployments"},{"title":"Environment Variables and References","icon":"link","href":"/v2/hosting/references"},{"title":"Stacks","icon":"layer-group","href":"/v2/hosting/stacks"},{"title":"Host a Web Service","icon":"hammer","href":"/v2/pod/web-service"},{"title":"Networking","icon":"sitemap","href":"/v2/pod/networking"}]},{"group":"Container Images","pages":[{"title":"Container Images","icon":"gears","href":"/v2/environment/custom-images"},{"title":"Custom Registries","icon":"list","href":"/v2/environment/custom-registries"},{"title":"CPU and RAM","icon":"server","href":"/v2/environment/resources"},{"title":"Storing Secrets","icon":"lock","href":"/v2/environment/secrets"}]},{"group":"Data and Storage","pages":[{"title":"Managed Databases","icon":"database","href":"/v2/data/databases"},{"title":"Distributed Storage Volumes","icon":"hard-drive","href":"/v2/data/volume"},{"title":"Durable Disks","description":"Fast, node-local persistent storage for stateful workloads","icon":"database","href":"/v2/data/durable-disks"},{"title":"Mounting S3 Buckets","icon":"bucket","href":"/v2/data/external-storage"},{"title":"Ephemeral Files and Images","description":"Storing ephemeral files for images, audio files, and more.","icon":"upload","href":"/v2/data/output"}]},{"group":"Scaling","pages":[{"title":"Scaling Out","icon":"boxes-stacked","href":"/v2/scaling/concurrency"},{"title":"Parallelizing Functions","icon":"boxes-stacked","href":"/v2/scaling/parallelizing-functions"}]},{"group":"Operations","pages":[{"title":"Logs and Metrics","icon":"chart-line","href":"/v2/operations/observability"},{"title":"Workspace MCP","icon":"plug","href":"/v2/operations/mcp"},{"title":"Webhooks","icon":"webhook","href":"/v2/operations/webhooks"}]},{"group":"Run in Your Cloud","pages":[{"title":"Compute Pools","icon":"server","href":"/v2/scaling/pools"},{"title":"Overview","icon":"building","href":"/v2/self-hosting/overview"},{"title":"Local Development Cluster","icon":"computer","href":"/v2/self-hosting/local-machine"},{"title":"Deploying Beta9 on AWS","icon":"aws","href":"/v2/self-hosting/aws"}]},{"group":"Advanced Topics","pages":[{"title":"Integrate into CI/CD","icon":"link","href":"/v2/topics/ci"},{"title":"Input and Output Schemas","icon":"brackets-curly","href":"/v2/topics/schemas"},{"title":"Timeouts and Retries","icon":"clock","href":"/v2/topics/timeouts-and-retries"},{"title":"Public Endpoints","icon":"unlock","href":"/v2/topics/public-endpoints"},{"title":"Task Callbacks","icon":"bell","href":"/v2/topics/callbacks"},{"title":"Send Events Between Apps","icon":"circle","href":"/v2/topics/signal"},{"title":"Runtime Variables","icon":"code","href":"/v2/topics/context"},{"title":"Working in Jupyter Notebooks","icon":"book","href":"/v2/environment/jupyter-notebook"},{"title":"Remote vs. Local Environment","icon":"house","href":"/v2/environment/remote-versus-local"}]},{"group":"Resources","pages":[{"title":"Pricing and Billing","icon":"dollar-sign","href":"/v2/resources/pricing-and-billing"},{"title":"Using Beam Docs with AI Tools","icon":"robot","href":"/v2/resources/ai-tools"},{"title":"Troubleshooting","icon":"question","href":"/v2/resources/faq"}]},{"group":"Security","pages":[{"title":"Security overview","icon":"shield-halved","href":"/v2/security/security"},{"title":"Terms of Service","icon":"handshake","href":"/v2/security/terms-and-conditions"},{"title":"Privacy Policy","icon":"user-secret","href":"/v2/security/privacy-policy"},{"title":"Data Processing Addendum","icon":"file-shield","hidden":true,"href":"/v2/security/data-processing-addendum"},{"title":"Subprocessor List","icon":"list-check","hidden":true,"href":"/v2/security/subprocessor-list"}]}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/v2/examples/overview"}]},{"tab":"Python SDK","pages":[{"title":"Python SDK","href":"/v2/reference/py-sdk"}]},{"tab":"JavaScript / TypeScript","pages":[{"title":"JavaScript / TypeScript","href":"/v2/reference/ts-sdk"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/v2/reference/cli"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/v2/reference/api"}]}]},"basePath":"","title":"Mounting S3 Buckets - Beam","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}