1

Using spring-integration-aws, is it possible to download a existing file from AWS S3 using file ETag rather key. The objective to add a ETag as constrain beside the file name as headers key.

Sam
  • 63
  • 1
  • 8

1 Answers1

0

You can include the ETag in the "If-Match" and "If-None-Match" header condition but you cannot use the ETag to replace the key name in the HTTP GET command.

S3 Get Object

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • Thanks for response. I'm using Spring-integration-aws. my messageHandler looks like below. Could you please advice, how can I set the headers `` – Sam Oct 29 '17 at 17:08
  • Thanks for response. I'm using spring-integration-aws my messageHandler looks like below. Could you please advice, how can I set the header ` @ServiceActivator(inputChannel = "s3sender") public MessageHandler s3handler() { S3MessageHandler s3MessageHandler = new S3MessageHandler(.. true); .. Expression exp = PARSER.parseExpression("payload instanceof T(java.io.File) ? payload.name : headers.key"); handler.setKeyExpression(exp); .. s3MessageHandler.setUploadMetadataProvider((metadata, message) - ... return s3MessageHandler; }` – Sam Oct 29 '17 at 17:14
  • Sam, open a new question as the topic is now different. – John Hanley Oct 29 '17 at 22:53
  • Thanks John, Meantime I addressed the problem, by extending S3MessageHandler to a customer handler. As the S3MessageHandle does not provide any access to GetObjectRequest. – Sam Oct 30 '17 at 18:50