Amazon S3 Watch Publisher
The Amazon S3 (Simple Storage Service) Watch publisher polls activity on an Amazon S3 bucket, and publishes messages about that activity to topics. Activity can include adding, changing, and deleting files.
Configuring the Publisher
- In the FME Server Web User Interface, select Notifications > Publications, and click New.
- Provide a Name for the Publication
- Protocol: Select Amazon S3 Watch.
-
Specify the Topics you want to publish to using the drop-down selector. To create a topic and use it right away, click +.
- Bucket to Watch: The bucket name in the Amazon S3 account, case sensitive.
- AWS Access Key ID and AWS Secret Access Key: Provide your security credentials. For more information, see AWS Security Credentials.
- Region: The region of the specified bucket. This field is optional; however, in some cases the Amazon S3 Watch publisher may be unable to validate the bucket without it.
- Path to Watch (Optional): Provide a folder location in the specified bucket to watch, using forward slashes.
- myfolders/testfolder
- /myfolders/testfolder
- //myfolders/testfolder
- myfolders/testfolder/
- /myfolders/testfolder/
-
Watch Subdirectories: To watch activity in the selected directory and all subdirectories, specify Yes. To watch activity only in the selected directory and not in its subdirectories, specify No.
- Poll Interval: Specify how often to poll from the S3 bucket, in minutes.
- Events to Watch for: By default, all actions on the specified directory are monitored, including adding (CREATE), changing (MODIFY), and deleting (DELETE) files (and folders, if applicable). To monitor only one or two of these actions, click the "x" beside the action you do not want to monitor to remove it. To add an action after removing it, click inside the dropbox and select it.
- Click OK.
For example, any of the following is acceptable:
If left blank, the publisher watches everything in the bucket. If the path does not exist, the publisher will not start.
Sample Notification Schemas
When a file is deleted
{
"s3watch_publisher_content": "ENTRY_DELETE test/sample_file.txt",
"s3watch_publisher_bucket": "test-bucket",
"fns_type": "s3watch_publisher"
}
When a file is changed (for example, added content)
{
"s3watch_publisher_content": "ENTRY_MODIFY test/sample_file.txt",
"s3watch_publisher_bucket": "test-bucket",
"fns_type": "s3watch_publisher"
}
When a file is added
{
"s3watch_publisher_content": "ENTRY_CREATE test/sample_file.txt",
"s3watch_publisher_bucket": "test-bucket",
"fns_type": "s3watch_publisher"
}