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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. ## Segments and temporary files storage settings
  14. segments {
  15. ## Directory where these files are stored
  16. root = "/var/lib/emqx/transfers/segments"
  17. ## Garbage collection settings
  18. gc {
  19. ## How often to run GC
  20. interval = 1h
  21. ## Maximum time to keep parts of incomplete transfers for
  22. maximum_segments_ttl = 24h
  23. }
  24. }
  25. ## S3-compatible object storage exporter
  26. ## Enable the backend
  27. ## Note: Can only configure one backend at a time
  28. ## One can set 'exporter.s3.enable=false' to disable it
  29. ## while keeping the configuration context
  30. exporter.s3 {
  31. ## Endpoint of S3 API of the object storage service of your choice
  32. host = "s3.us-east-1.amazonaws.com"
  33. port = 443
  34. ## Credentials to use to authorize with the S3 API
  35. access_key_id = "AKIA27EZDDM9XLINWXFE"
  36. secret_access_key = "******"
  37. ## Which bucket to store transferred files in?
  38. bucket = "my-bucket"
  39. ## TTL of file download URLs exposed through File Transfer API
  40. url_expire_time = 1h
  41. ## Enable the HTTPS
  42. transport_options {
  43. ssl.enable = true
  44. ## Timeout for connection attempts
  45. connect_timeout = 15s
  46. }
  47. }
  48. }
  49. }
  50. }