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

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