S3 events notifications supports standard SNS topics and standard SQS queues as destinations but don’t support SNS FIFO and SQS FIFO.
S3 events notifications enables you to be notified whenever a specific event happens in your bucket. To receive the notification you must define the events you are interested in and the destination. The notifications are usually triggered in seconds but sometimes can take longer.
The events are –
New object creation
Object removal (versioned and non-versioned objects)
Object restore (e.g from Glacier)
Object lost on a reduced redundancy storage
The possible destinations include –
SQS – as mentioned above standard queues only and not FIFO queues
SNS- as mentioned above standard topics only and not FIFO topics
If when processing the events you write back to S3 be careful not to create an execution loop
While, SQS FIFO queues were introduced in 2016, SNS FIFO capabilities were introduced only on October 2020.
This capability is important for cases in which the order matters. E.g. bank transactions were you commit a transaction only if the balance remains non-negative.
Messages are grouped and ordered according to the message group ID. When sending a message you must specify a message group ID otherwise the action fails. If all the messages have the same message group ID then all the messages are sent and received in strict order. The message group id can be any value, e.g 12, “hello”, “user_id-123”, etc.
Note that as in the SQS case, the topic name must end with .fifo, a limitation that counts to the 80 characters restriction as well.