I am looking for AWS s3 Spring Integration File Modification Monitor sample.
Requirement: whenever a file gets modified from the AWS S3 bucket, the latest changes has to be transferred from s3 to EC2 instance.
We have the watch-event for file inbound adapter, but I am looking for the similar adapter or logic for s3 operation.
What we have right now:
<int-file:inbound-channel-adapter id="modifiedFiles" directory="${input.directory}" use-watch-service="true" filter="acceptAllFilter" watch-events="MODIFY"/>
XML Config:
<bean id="acceptOnceFilter"
class="org.springframework.integration.file.filters.AcceptOnceFileListFilter" />
<integration:channel id="s3FilesChannel" />
<int-aws:s3-inbound-channel-adapter id="s3FilesChannelId" channel="s3FilesChannel"
session-factory="s3SessionFactory"
auto-create-local-directory="false"
delete-remote-files="false"
preserve-timestamp="true"
local-directory="file:${localFilePath}"
local-filter="acceptOnceFilter"
remote-directory-expression="${bucket_name}"
auto-startup="false"
filename-regex="${regx_expresion}"
remote-file-separator="/" >
<integration:poller fixed-delay="1000"/>
</int-aws:s3-inbound-channel-adapter>
<integration:channel id="s3FilesChannel">
<integration:queue/>
</integration:channel>