<@U04S8PLJWMT> My airbyte connections (source and ...
# ask-ai
e
@kapa.ai My airbyte connections (source and destinations ) are creating multiple secrets in aws secrets manager, which is costing us a lot. How can I address this? I deployed airbyte with helm
k
When using Airbyte with AWS Secrets Manager, it is expected that multiple secrets may be created for each connection (source/destination), as each secret field (e.g., password, token) is stored separately. Additionally, Airbyte may create temporary or ephemeral secrets during operations like connection checks. This can lead to increased costs, as AWS charges per secret stored. Key points and recommendations: 1. Multiple Secrets per Connection: Each connector may create several secrets in AWS Secrets Manager, especially if the connector configuration contains multiple secret fields. This is by design and not a bug. Temporary secrets (with names like
airbyte_workspace_..._secret_*
) are also created and should be cleaned up automatically, but this may not always happen promptly in older versions of Airbyte. 2. Version and Bug Fixes: There was a known issue in Airbyte versions prior to 1.5.0 where secrets were not always cleaned up correctly, leading to accumulation of unused secrets. This was addressed in version 1.5.0 and later. If you are running an older version, upgrading to at least 1.5.0 is recommended, as it includes fixes for secret management and cleanup. For new connections, the fix should prevent excessive secret creation. For existing connections, you may need to update the secrets after upgrading to ensure proper handling going forward. [See discussion and fix details](https://github.com/airbytehq/airbyte/issues/46097) 3. Manual Cleanup: - Ephemeral/Temporary Secrets: You can safely delete secrets with names like
airbyte_workspace_..._secret_*
that are no longer in use. These are typically ephemeral and should not be needed after their initial use. - Unused Secrets: If you are certain that all your ingestions are scheduled at least once per day, you can filter and delete secrets that have not been accessed in the last 2–3 days. However, it is safer to rely on the naming scheme to identify ephemeral secrets for deletion. - Automated Cleanup: Airbyte’s SecretPersistence interface supports secret expiry for some secret managers, but full support for AWS is still being improved. Until then, manual cleanup may be necessary. 4. Cost Consideration: AWS charges $0.40 per secret per month. Keeping the number of secrets to a minimum by cleaning up unused or temporary secrets can help control costs. Summary of actions: - Upgrade Airbyte to at least version 1.5.0 if you haven’t already. - Regularly clean up ephemeral secrets (those with names like
airbyte_workspace_..._secret_*
) that are no longer needed. - Monitor your AWS Secrets Manager usage and consider scripting cleanup based on last accessed date and naming conventions. If you continue to see excessive secret creation after upgrading, or if you need more automated cleanup, you may want to follow Airbyte’s GitHub for updates on improved AWS secret expiry support. For more details, see the relevant discussions and recommendations: [Github Issue: When using AWS Secrets Manager for persisting secrets, updating a connector deletes its secret](https://github.com/airbytehq/airbyte/issues/46097)
e
@kapa.ai I am using 1.8.2 and i still have that issue. If i have 20 active sources and 20 active destinations. How many secrets am i expexcted to have in secrets manager, approximately
k
A message from kapa.ai
With Airbyte 1.8.2, the number of secrets you should expect in AWS Secrets Manager is not strictly one per source or destination. Instead, each secret field (such as passwords, API tokens, client secrets, etc.) in each source or destination configuration is stored as a separate secret in AWS Secrets Manager. Additionally, Airbyte may create temporary (ephemeral) secrets during operations like "Check" or "Discover"—these are intended to be cleaned up, but there are reports that this does not always happen automatically in all cases or versions, including 1.8.2 [source](https://github.com/airbytehq/airbyte/issues/68176). For your scenario: - If each of your 20 sources and 20 destinations has, for example, 3 secret fields, you would expect at least 60 secrets for sources and 60 for destinations, totaling ~120 secrets. - If connectors have more or fewer secret fields, this number will change accordingly. - Temporary secrets (with names like
airbyte_workspace_00000000-0000-0000-0000-000000000000_secret_*
) may also accumulate, especially if cleanup is not working as expected [source](https://github.com/airbytehq/airbyte/issues/46097). Summary: The expected number of secrets is:
(number of sources × secret fields per source) + (number of destinations × secret fields per destination) + (temporary/ephemeral secrets, if not cleaned up)
If you are seeing significantly more secrets than this, it is likely due to the accumulation of temporary or old secrets that have not been deleted. This is a known issue, and manual cleanup may be required until further improvements are made in Airbyte's secret management logic [source](https://github.com/airbytehq/airbyte/issues/68176).
e
@kapa.ai Can you verify info from this thread? Using the info in the thread with tombstone as false, I see only 2 secrets as active. https://airbytehq.slack.com/archives/C021JANJ6TY/p1722012169898149?thread_ts=1721897396.536939&cid=C021JANJ6TY
k
A message from kapa.ai
I'm sorry, but I cannot access or verify information from the Slack thread you referenced, as it is not included in the provided knowledge sources. My answers are based solely on the documentation and issues you have shared above. If you have specific details or content from that Slack thread, please provide them here, and I can help interpret or cross-reference them with the official Airbyte documentation and known issues. Otherwise, I cannot confirm or deny the information from that external thread.
e
k
A message from kapa.ai
Based on the knowledge sources provided, I cannot directly verify or reference the content of the Slack or Discuss thread you mentioned, as their content is not included in the sources above. My responses are limited to the official Airbyte documentation and GitHub issues you have shared. From the official documentation and GitHub issues, here is what is clear: - Number of Secrets: Airbyte creates a separate secret in AWS Secrets Manager for each secret field (e.g., password, API key) in each source and destination configuration. For 20 sources and 20 destinations, if each has, for example, 3 secret fields, you would expect around 120 secrets (3 × 20 sources + 3 × 20 destinations), not counting ephemeral or temporary secrets that may be created during operations like "Check" or "Discover" and may not always be cleaned up automatically in all versions, including 1.8.2 [see: [Github Issue 68176](https://github.com/airbytehq/airbyte/issues/68176)]. - Tombstone Field: The documentation does not mention a "tombstone" field in relation to secrets management. The "tombstone" concept appears in the context of source deletion in the metadata database, not in AWS Secrets Manager secret lifecycle management. There is no explicit mapping in the documentation between the "tombstone" field and the number of active secrets in AWS Secrets Manager. - Active Secrets: If you are seeing only 2 active secrets in AWS Secrets Manager for a source or destination, this is lower than what would be expected if each secret field is stored separately. This could indicate that: - The connector only has 2 secret fields. - Old or unused secrets have been cleaned up. - There may be a configuration or operational difference in your deployment. Summary: I cannot confirm or refute the specific claims from the external thread, as the knowledge sources do not contain enough information about the "tombstone" field's effect on AWS Secrets Manager or the exact expected number of secrets per connection. The official documentation and issues indicate that the number of secrets should correspond to the number of secret fields across all sources and destinations, plus any temporary secrets that may not have been cleaned up. If you need a precise mapping or explanation for your observed behavior, please provide more details from the thread or your configuration, or consult Airbyte's official support channels for clarification.