There are two accounts:
Account-A (our team does not own this service) -> s3 Bucket (exampleBucket) is located.
Account-B (our team owns) -> Lambda function (myLambda)
We need to execute a Lambda function (myLambda) whenever a new object is created in the s3 bucket (exampleBucket).
I have found at-least 2 ways to do this:
S3 (Event Notification) -> Lambda
S3 (Event Notification) -> SNS Topic -> Lambda reads the notification from SNS
S3 (Event Notification) -> SQS Topic -> Lambda reads the notification from SQS
Additional Info:
Both Lambda and S3 are in the same region (different AWS accounts)
Assume we have all the necessary permissions
We get a new object in the bucket once every (~5 seconds)
There are enough Lambdas (concurrent executions) to handle all the invocations.
I need how to determine which would be better, in terms of:
Latency (Time of creation of object in S3 - Executing Lambda function)
Maintenance
Monitoring
Scaling (I am assuming since all the services are managed by AWS, this shouldn't be an issue)