I configured the credentials with environment vari...
# help
j
I configured the credentials with environment variables and it insists on trying to fetch this file, how can I remove this configuration please?
Copy code
error="SharedCredsLoad: failed to load shared credentials file\ncaused by: FailedRead: unable to open file\ncaused by: open /tmp/.aws/credentials: no such file or directory" reason=unknown service=api_gateway
đź‘€ 1
s
Hi @Jennifer Cristina Evangelista Da Silva, Did this suddenly stop working or this is the first time you are trying to run with this config?
Did you as well config the S3 bucket with the proper permissions so lakefs can access it?
@Jennifer Cristina Evangelista Da Silva one more question, when you say you configured the credentials with env vars, do you maybe mean AWS credentials? I am asking because the error does look like an AWS error and not on the Lakefs side.
j
yes I configured it with environment variables according to documentation https://docs.lakefs.io/reference/configuration.html#using-environment-variables •
blockstore.s3.region
(string : "us-east-1")
- Default region for lakeFS to use when interacting with S3. •
blockstore.s3.profile
(string : )
- If specified, will be used as a named credentials profile •
blockstore.s3.credentials_file
(string : )
- If specified, will be used as a credentials file •
blockstore.s3.credentials.access_key_id
(string : )
- If specified, will be used as a static set of credential •
blockstore.s3.credentials.secret_access_key
(string : )
- If specified, will be used as a static set of credential •
blockstore.s3.credentials.session_token
(string : )
- If specified, will be used as a static session token
Exemple : LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID
đź‘€ 1
s
Just verifying, to
LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID
you passed your AWS Access key, correct?
Also, Are you running Lakefs in a docker? (Just wondering why at all it is looking for credentials under “/tmp/.aws/credentials”, as per AWS docs it should be under “~/.aws/credentials”)
I would like to try and reproduce the error, can you elaborate on exactly which env vars you set (I don’t think you set both the credentials file and secret access key) and your config file?
Be careful not to send any sensitive info (can provide an email address or other non-public means if prefer not to send this over a public channel)
a
Hi Jennifer, This is strange. AFAICT your lakeFS is using the AWS "shared credentials provider"; this occurs when it does not find a configuration for access key ID and secret access key. I am not sure why that happens. I can think of two ways we could advance from here: 1. Debug your configuration. Send us a few more log lines, consider setting config option
logging.level
(or
LAKEFS_LOGGING_LEVEL
env variable) to
trace
), etc. Then run
env
inside the container, verify that the environment variables have their expected values, etc. 2. Switch to configuring directly. As mentioned, when lakeFS does not find a specific configuration in its configuration file or environment variables, it tries to use the default AWS credentials. So it will through env variables
AWS_PROFILE
,
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
, through the credentials in
$HOME/.aws/credentials
, and then try to go and get instance metadata if running with an appropriate role inside EC2. You could use one of these "regular" configuration options. One advantage is that it is easy to test that your environment is correctly configured -- you only have to run the boto CLI command
aws sts get-caller-identity
and see that it works. Hope one of these routes can help us advance!
j
@Ariel Shaqed (Scolnicov) tks, it worked =]
a
Cool! Hope you have a great lakeFS journey. sunglasses lakefs
138 Views