{"id":15659462,"url":"https://github.com/robmarkcole/hass-s3","last_synced_at":"2025-08-31T08:31:56.970Z","repository":{"id":43662312,"uuid":"244465389","full_name":"robmarkcole/HASS-S3","owner":"robmarkcole","description":"Home Assistant integration for S3","archived":false,"fork":false,"pushed_at":"2024-10-28T07:36:19.000Z","size":71,"stargazers_count":27,"open_issues_count":5,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-28T01:13:48.614Z","etag":null,"topics":["aws","home-assistant","s3-storage"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robmarkcole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"robmarkcole"}},"created_at":"2020-03-02T20:12:17.000Z","updated_at":"2025-08-21T14:41:46.000Z","dependencies_parsed_at":"2024-10-23T06:23:38.935Z","dependency_job_id":"7c49f8fb-f318-4f51-93e7-dbe1cd8c868d","html_url":"https://github.com/robmarkcole/HASS-S3","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/robmarkcole/HASS-S3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robmarkcole%2FHASS-S3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robmarkcole%2FHASS-S3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robmarkcole%2FHASS-S3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robmarkcole%2FHASS-S3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robmarkcole","download_url":"https://codeload.github.com/robmarkcole/HASS-S3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robmarkcole%2FHASS-S3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272958309,"owners_count":25022051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","home-assistant","s3-storage"],"created_at":"2024-10-03T13:17:03.389Z","updated_at":"2025-08-31T08:31:56.740Z","avatar_url":"https://github.com/robmarkcole.png","language":"Python","funding_links":["https://github.com/sponsors/robmarkcole"],"categories":[],"sub_categories":[],"readme":"# HASS-S3\nThis custom integration provides a service for interacting with S3 including uploading files to a bucket or copying them within and between buckets.\n\nCreate your S3 bucket via the AWS console, remember bucket names must be unique. I created a bucket with the default access settings (allpublic OFF) and created a bucket name with format `my-bucket-ransom_number` with `random_number` generated [on this website](https://onlinehashtools.com/generate-random-md5-hash).\n\n**Note** for a local and self-hosted alternative checkout the official [Minio integration](https://www.home-assistant.io/integrations/minio/).\n\n## Installation and configuration\nPlace the `custom_components` folder in your configuration directory (or add its contents to an existing custom_components folder). Add to your Home Assistant configuration UI or add to your `configuration.yaml`:\n```yaml\ns3:\n  aws_access_key_id: AWS_ACCESS_KEY\n  aws_secret_access_key: AWS_SECRET_KEY\n  region_name: eu-west-1 # optional region, default is us-east-1\n```\n\n## Services\n### Put Service\nThe s3 entity exposes a `put` service for uploading files to S3.\n\nExample data for service call:\n\n```\n{\n  \"bucket\": \"my_bucket\",\n  \"key\": \"my_key/file.jpg\",\n  \"file_path\": \"/some/path/file.jpg\",\n  \"storage_class\": \"STANDARD_IA\" # optional\n  \"content_type\" : \"image/jpeg\" # optional\n  \"tags\":  \"tag1=aTagValue\u0026tag2=anotherTagValue\" # optional\n}\n```\n\n### Copy Service\nThe s3 entity exposes a `copy` service for moving files around in S3.\n\nExample data for service call:\n```\n{\n  \"bucket\": \"my_bucket\",\n  \"key_source\": \"my_key/file_source.jpg\",\n  \"key_destination\": \"my_key/file_destination.jpg\"\n}\n```\n\nIf you need to move items between buckets use this syntax:\n```\n{\n  \"bucket_source\": \"my_source_bucket\",\n  \"key_source\": \"my_key/file_source.jpg\",\n  \"bucket_destintation\": \"my_destination_bucket\",\n  \"key_destination\": \"my_key/file_destination.jpg\"\n}\n```\n\n### Delete Service\nThe s3 entity exposes a `delete` service for deleting files (objects) from S3.\n\nExample data for service call:\n```\n{\n  \"bucket\": \"my_bucket\",\n  \"key\": \"my_key/file_source.jpg\",\n}\n```\n\n### Sign URL Service\nThe S3 entity exposes a `signurl` service for generating pre-signed URLs with a defined validity period for accessing content already stored in S3 with a URL.  Run this action after you call the S3 copy service.  This service generates an event of type s3_signed_url which you can use as a trigger in a subsequent automation.  The event data returns a key-value pair of URL and the pre-signed URL.\n\nExample data for service call:\n```\n{\n  \"bucket\": \"my_bucket\",\n  \"key\": \"my_key/file_source.jpg\",\n  \"duration\": 300\n}\n```\n\n\n## Example automation\nThe following automation uses the [folder_watcher](https://www.home-assistant.io/integrations/folder_watcher/) to automatically upload files created in the local filesystem to S3:\n\n```yaml\n- id: '1587784389530'\n  alias: upload-file-to-S3\n  description: 'When a new file is created, upload to S3'\n  trigger:\n    event_type: folder_watcher\n    platform: event\n    event_data:\n      event_type: created\n  action:\n    service: s3.put\n    data_template:\n      bucket: \"my_bucket\"\n      key: \"input/{{ now().year }}/{{ (now().month | string).zfill(2) }}/{{ (now().day | string).zfill(2) }}/{{ trigger.event.data.file }}\"\n      file_path: \"{{ trigger.event.data.path }}\"\n      storage_class: \"STANDARD_IA\"\n```\nNote you must configure `folder_watcher`.\n\n## Accessing S3\nI recommend [Filezilla](https://filezilla-project.org/) for connecting to your S3 bucket, free version is available.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobmarkcole%2Fhass-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobmarkcole%2Fhass-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobmarkcole%2Fhass-s3/lists"}