amazon web services - Lambda processing same SNS event multiple times? -
i have aws lambda function configured process sns events single topic. when function runs potentially send out other notifications , call context.succeed, or context.fail if error occurs. problem same sns event seems invoking lambda multiple times. looking @ cloudwatch logs see
start requestid: cd7afdf8-2816-11e6-bca2-6f2e3027c5e1 version: $latest
which ends
end requestid: cd7afdf8-2816-11e6-bca2-6f2e3027c5e1 report requestid: cd7afdf8-2816-11e6-bca2-6f2e3027c5e1 ...
immediately followed in same log start exact same requestid
start requestid: cd7afdf8-2816-11e6-bca2-6f2e3027c5e1 version: $latest
looking cloudwatch @ topic sending sns event seems publishing , delivering 1 had expected, seems lambda-side problem. know of reason event might triggering lambda multiple times this?
edit: i've noticed seems happening when lambda receives failure. don't see sort of retry configuration on lambda , wouldn't expect behaving way default.
from amazon lambda faqs page https://aws.amazon.com/lambda/faqs/
q: happens if lambda function fails during processing event?
on failure, lambda functions being invoked synchronously respond exception. lambda functions being invoked asynchronously retried @ least 3 times, after event may rejected. events amazon kinesis streams , amazon dynamodb streams retried until lambda function succeeds or data expires. kinesis , dynamodb streams retain data 24 hours.