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

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