I am trying to read files from AWS S3 and process it with Spring Batch:
Can a Spring Itemreader process this Task? If so, How do I pass the credentials to S3 client and config my spring xml to read a file or multiple files
<bean id="itemReader" class=""org.springframework.batch.item.file.FlatFileItemReader"">
<property name="resource" value=""${aws.file.name}"" />
</bean>
More simple steps are:
Firstly, you need to create AWSS3 client and ResourceLoader bean in your aws configuration file, like this.
Then use resourceloader bean in ItemReader to set S3 resources.