file_transfer-with-s3-exporter.conf.example 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ## File Transfer over MQTT
  2. ##
  3. ## Enables the File Transfer over MQTT feature
  4. ## Note: This configuration is only applicable for EMQX Enterprise edition 5.1 or later.
  5. file_transfer {
  6. ## Enable the File Transfer feature
  7. enable = true
  8. ## Storage backend settings
  9. storage {
  10. ## Local file system backend setting
  11. ## Currently, it's the only available storage backend.
  12. local {
  13. ## Enable the backend
  14. enable = true
  15. ## Segments and temporary files storage settings
  16. segments {
  17. ## Directory where these files are stored
  18. root = "/var/lib/emqx/transfers/segments"
  19. ## Garbage collection settings
  20. gc {
  21. ## How often to run GC
  22. interval = 1h
  23. ## Maximum time to keep parts of incomplete transfers for
  24. maximum_segments_ttl = 24h
  25. }
  26. }
  27. ## S3-compatible object storage exporter
  28. exporter.s3 {
  29. ## Disable the backend
  30. ## Note: Only one backend may be enabled at a time.
  31. enable = true
  32. ## Endpoint of S3 API of the object storage service of your choice
  33. host = "s3.us-east-1.amazonaws.com"
  34. port = 443
  35. ## Credentials to use to authorize with the S3 API
  36. access_key_id = "AKIA27EZDDM9XLINWXFE"
  37. secret_access_key = "******"
  38. ## Which bucket to store transferred files in?
  39. bucket = "my-bucket"
  40. ## TTL of file download URLs exposed through File Transfer API
  41. url_expire_time = 1h
  42. ## Enable the HTTPS
  43. transport_options {
  44. ssl.enable = true
  45. ## Timeout for connection attempts
  46. connect_timeout = 15s
  47. }
  48. }
  49. }
  50. }
  51. }