references/r2/configuration.md
R2 Configuration
Fetch the task's documentation before editing Wrangler configuration or bucket settings.
| Task | Current documentation | |------|-----------------------| | Create a bucket and bind it to a Worker | Workers API setup | | Choose local simulation or a remote bucket during development | Supported bindings per development mode and local development | | Create S3 credentials and scope permissions | R2 authentication | | Set the S3 endpoint and SDK region | AWS SDK for JavaScript v3 | | Choose placement hints or a jurisdiction | Data location | | Configure browser origins, methods, and headers | CORS | | Set expiration, storage transitions, or incomplete-upload cleanup | Object lifecycles | | Choose or change storage classes | Storage classes and pricing | | Send object events to a queue | Event notifications | | Configure public access or a custom domain | Public buckets | | Manage bucket settings with Wrangler | R2 commands |
Choose the development bucket deliberately: a remote binding accesses real data. Scope S3 credentials to the required buckets and operations; Workers bindings use their own access mechanism. Review lifecycle prefixes and retention needs before applying deletion rules, and evaluate retrieval and minimum-storage charges before choosing a storage class.