How to check in s3-outbound-gateway if the bucket is available in S3 storage before processing using bucket expression. If the bucket is not available, it should be redirected to errorchannel.
<int-aws:s3-outbound-gateway id="FileGenerationChannelS3"
request-channel="filesOutS3ChainChannel"
reply-channel="filesArchiveChannel"
transfer-manager="transferManager"
bucket-expression="headers.TARGET_BUCKET"
command="UPLOAD">