I am having a similar issue to one mentioned here. I am using spring xml configurations. I have my global AWS context credentials specified. I am using S3 outbound channel adapter to download a file from S3. I have my keys specified in my config.properties file. I still get don't see the credentials used to talk to S3.
s3-read.xml
<int-aws:s3-outbound-channel-adapter
transfer-manager="transferManager"
bucket-expression="'${s3.bucket}'"
command-expression="'DOWNLOAD'"
key-expression="headers.S3Key"
progress-listener="progressListener" />
aws-credentials.xml
<aws-context:context-credentials>
<aws-context:simple-credentials access-key="${aws.accesskey}"
secret-key="${aws.secretkey}"/>
</aws-context:context-credentials>
<!-- Define global region -->
<aws-context:context-region region="${aws.region}"/>
config.properties
aws.accesskey=accesskey
aws.secretkey=secretkey
aws.region=us-west-2
Exception is:
com.amazonaws.SdkClientException: Unable to load AWS credentials from any
provider in the chain
I have spent a lot of time with this. When I tried to debug, it seems to look for default credentials provider chain, which is looking for environment variables or ~/.aws/credentials files. I dont have anything specified.
How do I link S3 to use these credentials? Thanks for help.