title: Spring Batch Reading AWS S3 -stepExecutionContext is null
body: <p>I am trying to read files from AWS s3 using spring batch but the file name becomes null in stepExecutionContext. Same code was working when i read the files from the windows mount but when we migrate the code and reading it from S3 it is becoming null.</p>
  <pre class="lang-java prettyprint-override"><code>    @Bean
      @JobScope
      public CustomMultiResourcePartitioner partitioner() {
          CustomMultiResourcePartitioner partitioner = new CustomMultiResourcePartitioner();
          Set&lt;String &gt; filesToProcess= fileRepository.findAllFilesByFileState(&quot;NEW&quot;);
          List&lt;Resource&gt; resourceList = new ArrayList&lt;&gt;();
  
          for(String file:filesToProcess) {
              Resource resource = getS3Resource(file);
              resourceList.add(resource);
              log.info(&quot;resourceList Size&quot;+resourceList.size());
          }
          if(resourceList.size()&gt;0 &amp;&amp; resourceList.toArray()!=null) {
              resources = resourceList.stream().toArray(Resource[]::new);
              ExecutionContext executionContext = new ExecutionContext();
              executionContext.put(&quot;FILE_NAME&quot;,filesToProcess);
          }
          else
          {
              resources = new Resource[0];
          }
          partitioner.setResources(resources);
          return partitioner;
      }
      @Bean
      @StepScope
      public FlatFileItemReader&lt;RosterInput&gt; itemReader(@Value(&quot;#{stepExecutionContext[fileName]}&quot;) String filename) throws UnexpectedInputException, ParseException {
          FlatFileItemReader&lt;RosterInput&gt; reader = new FlatFileItemReader&lt;RosterInput&gt;();
          DelimitedLineTokenizer tokenizer = new DelimitedLineTokenizer();
          tokenizer.setStrict(false);
          Resource resource =getS3Resource(filename);
  }
  </code></pre>