You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running beats with AWS features, using credential_profile_name setting is pretty helpful to avoid repeating credentials in beats configuration files. These credentials are obtained from the home directory (from ~/.aws/credentials).
When executing from systemd (as done when installed by deb or rpm packages), home directory is not set by default, so this feature cannot be used (at least in an easy way).
To configure the home directory in systemd, the $HOME environment variable has to be explicitly set. Setting a user with User= also sets the $HOME environment variable to the home directory of this user.
This would probably affect any other feature that gets information from this directory.
Some things we could do to improve this:
Document that $HOME has to be configured for Beats for this feature to work as expected.
Explicitly set a user in included systemd unit files.
The text was updated successfully, but these errors were encountered:
Thanks @jsoriano for bringing this up. What do you think about adding a new config option for credential_profile_directory and default credential_profile_directory to be ~/.aws/credentials?
Thanks @jsoriano for bringing this up. What do you think about adding a new config option for credential_profile_directory and default credential_profile_directory to be ~/.aws/credentials?
If it is possible to define the path where credentials can be found, then I like this solution, yes.
Yes, I looked into the AWS API and found by overwriting AWS_SHARED_CREDENTIALS_FILE environment variable, you can define you own path for the config file. I tried it out and it works: #14178
When running beats with AWS features, using
credential_profile_name
setting is pretty helpful to avoid repeating credentials in beats configuration files. These credentials are obtained from the home directory (from~/.aws/credentials
).When executing from systemd (as done when installed by deb or rpm packages), home directory is not set by default, so this feature cannot be used (at least in an easy way).
To configure the home directory in systemd, the
$HOME
environment variable has to be explicitly set. Setting a user withUser=
also sets the$HOME
environment variable to the home directory of this user.This would probably affect any other feature that gets information from this directory.
Some things we could do to improve this:
$HOME
has to be configured for Beats for this feature to work as expected.The text was updated successfully, but these errors were encountered: