Details
Description
When running in mini-cluster mode Flink apparently doesn't pass S3 configuration to underlying Hadoop FS. With a code like this
Configuration conf = new Configuration(); conf.setString("s3.endpoint", "http://localhost:4566"); conf.setString("s3.aws.credentials.provider","org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider"); conf.setString("s3.access.key", "harvester"); conf.setString("s3.secret.key", "harvester"); StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironment(conf);
Application fails with an exception with most relevant error being Caused by: org.apache.hadoop.fs.s3a.auth.NoAuthWithAWSException: No AWS Credentials provided by SimpleAWSCredentialsProvider EnvironmentVariableCredentialsProvider InstanceProfileCredentialsProvider : com.amazonaws.SdkClientException: Failed to connect to service endpoint:
So Hadoop lists all the providers but it should use only the one set in configuration. Full project that reproduces this behaviour is available at https://github.com/PavelPenkov/flink-s3-conf and relevant files are attached to this issue.