DynamoDB Provider

Traefik can be configured to use Amazon DynamoDB as a provider.

Configuration

  1. ################################################################
  2. # DynamoDB Provider
  3. ################################################################
  4. # Enable DynamoDB Provider.
  5. [dynamodb]
  6. # Region to use when connecting to AWS.
  7. #
  8. # Required
  9. #
  10. region = "us-west-1"
  11. # DyanmoDB Table Name.
  12. #
  13. # Optional
  14. # Default: "traefik"
  15. #
  16. tableName = "traefik"
  17. # Enable watch DynamoDB changes.
  18. #
  19. # Optional
  20. # Default: true
  21. #
  22. watch = true
  23. # Polling interval (in seconds).
  24. #
  25. # Optional
  26. # Default: 15
  27. #
  28. refreshSeconds = 15
  29. # Access Key ID to use when connecting to AWS.
  30. #
  31. # Optional
  32. #
  33. accessKeyID = "abc"
  34. # Secret Access Key to use when connecting to AWS.
  35. #
  36. # Optional
  37. #
  38. secretAccessKey = "123"
  39. # Endpoint of local dynamodb instance for testing?
  40. #
  41. # Optional
  42. #
  43. endpoint = "http://localhost:8080"

Table Items

Items in the dynamodb table must have three attributes:

  • id (string): The id is the primary key.
  • name(string): The name is used as the name of the frontend or backend.
  • frontend or backend (map): This attribute's structure matches exactly the structure of a Frontend or Backend type in Traefik.

    See types/types.go for details.

    The presence or absence of this attribute determines its type. So an item should never have both a frontend and a backend attribute.