This error is present when you receive the following terminal output when working with the CLI:Failed establishing a session to AWS:NoCredentialProviders: no valid providers in chain. Deprecated.
If you are using the GUI then this will be visible when you attempt a transfer and the file stays in the queued state.
Below are the causes of this behavior:
-
Expired credentials
-
Credentials setup incorrectly
-
Profile not being referenced correctly in the configuration.yaml file
Follow the steps below to ensure this is set up correctly:
-
Setup your AWS CLI profile:
You can configure additional profiles (we’ll use ‘filetransfer’ in this example) by using AWS CLI withaws configure --profile filetransfer
(this requires you to download AWS CLI), or by manually adding entries to the config and credentials files:
Credentials profile
The following example shows a credentials file with one profile.
The credentials file uses a different naming format than the AWS CLI config file for named profiles. Do not use the word profile when creating an entry in the credentials file.
~/.aws/credentials (Linux & Mac) or %USERPROFILE%.aws\credentials (Windows)[filetransfer] aws_access_key_id=<access_key> aws_secret_access_key=<secret_key>
-
Note the name of the profile from the above steps (i.e., the name from example 1 is user1)
-
Enter this name under the profile section of the yaml file within the vendor name like below
protocols: s3: transfer_profiles: profile1: profile: filetransfer bucket: prefix: region:
Here is a valid IAM Policy for bucket access: https://docs.aws.amazon.com/nimble-studio/latest/filetransfer-guide/setting-up.html#setting-up-iam-access-policy
Note: If you are using a bucket that does not have a KMS key tied to it, then omit the lines 25-35 in the above screenshot from your IAM Policy. Check if your bucket has a KMS key active by going into the s3 bucket’s view in the AWS Console then clicking properties. Scroll down until you see default encryption and this will tell you if you are using a KMS key for encryption.
Comments
0 comments
Article is closed for comments.