{"id":22432,"library":"synapse-s3-storage-provider","title":"Synapse S3 Storage Provider","description":"A storage provider for Synapse, the Matrix homeserver, which fetches and stores media in Amazon S3 (or compatible object stores). Version 1.6.0 requires Synapse 1.140.0+. Released irregularly.","status":"active","version":"1.6.0","language":"python","source_language":"en","source_url":"https://github.com/matrix-org/synapse-s3-storage-provider","tags":["matrix","synapse","s3","storage","media"],"install":[{"cmd":"pip install synapse-s3-storage-provider","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required at runtime; interacts directly with Synapse storage layer.","package":"matrix-synapse","optional":false},{"reason":"AWS SDK for Python; required for S3 operations.","package":"boto3","optional":false}],"imports":[{"wrong":"from s3_storage_provider import S3StorageProviderBackend","symbol":"S3StorageProviderBackend","correct":"from s3_storage_provider import S3StorageProviderBackend"}],"quickstart":{"code":"# In Synapse's homeserver.yaml under the `media_store` section:\n# media_store:\n#   storage_providers:\n#     - module: s3_storage_provider.S3StorageProviderBackend\n#       store_local: True\n#       store_remote: True\n#       store_synchronous: False\n#       config:\n#         bucket: my-matrix-media-bucket\n#         region_name: us-east-1\n#         # Optional: access_key_id: YOUR_ACCESS_KEY\n#         # Optional: secret_access_key: YOUR_SECRET_KEY\n#         # Optional: session_token: YOUR_SESSION_TOKEN\n#         # Optional: prefix: myprefix/\n#         # Optional: endpoint_url: https://s3.custom-endpoint.com\nimport os\nfrom s3_storage_provider import S3StorageProviderBackend\n\n# Example: creating an instance manually (not typical, usually via Synapse config)\nbackend = S3StorageProviderBackend(\n    config={\n        \"bucket\": \"my-bucket\",\n        \"region_name\": \"us-east-1\",\n        \"access_key_id\": os.environ.get('AWS_ACCESS_KEY_ID', ''),\n        \"secret_access_key\": os.environ.get('AWS_SECRET_ACCESS_KEY', ''),\n    }\n)","lang":"python","description":"Basic configuration example for Synapse's homeserver.yaml. The module is loaded automatically by Synapse; manual instantiation is for testing."},"warnings":[{"fix":"Upgrade Synapse to >=1.140.0 or pin synapse-s3-storage-provider to 1.5.0.","message":"Version 1.6.0 requires Synapse 1.140.0+. Using an older Synapse will cause import errors or runtime breakage.","severity":"breaking","affected_versions":">=1.6.0"},{"fix":"Use the `--synapse-config` flag or set the `SYNAPSE_CONFIG_PATH` environment variable to point to your homeserver.yaml.","message":"The database configuration must be read from Synapse's homeserver.yaml by default. Ensure the YAML file is accessible to the script (e.g., s3_media_upload).","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Upgrade to Python 3.10 or later.","message":"Support for Python 3.9 and earlier was dropped in favor of 3.10+. Check Python version before upgrading.","severity":"deprecated","affected_versions":">=1.6.0"},{"fix":"Include `session_token: YOUR_SESSION_TOKEN` in the config if using temporary AWS credentials.","message":"The `session_token` parameter (added in v1.6.0) is optional but critical for STS-based credentials. Omitting it when using temporary credentials will cause authentication failures.","severity":"gotcha","affected_versions":">=1.6.0"}],"env_vars":null,"search_vec":"'1.140.0':29 '1.6.0':26 'amazon':19 'compat':22 'fetch':14 'homeserv':12 'irregular':31 'matrix':11,32 'media':17,36 'object':23 'provid':4,7 'releas':30 'requir':27 's3':2,20,34 'storag':3,6,35 'store':16,24 'synaps':1,9,28,33 'version':25","created_at":"2026-04-27T17:05:09.188064+00:00","updated_at":"2026-04-27T17:05:09.188064+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp9mdq8bfn/venv/lib/python3.12/site-packages/s3_storage_provider.py\", line 31, in <module>\n    from synapse.logging.context import make_deferred_yieldable\nModuleNotFoundError: No module named 'synapse'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.6.1","cli_name":"s3-storage-provider","cli_version":"","type":"library","homepage":null,"github":"https://github.com/matrix-org/synapse-s3-storage-provider","docs":null,"changelog":null,"pypi":"https://pypi.org/project/synapse-s3-storage-provider/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","data","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}