0

The reason I'm asking that is that I have a lambda that doesn't do much except calling an API using python's requests library.
It runs fine every 15 minutes, but after some time(~1 day) it starts to get errors on every run. Every change to the code of lambda resets this cycle.

That made me curious. Do AWS Lambdas share some state between runs?

Todd Price
  • 2,650
  • 1
  • 18
  • 26
dmigo
  • 2,849
  • 4
  • 41
  • 62
  • What errors exactly? Lamdbas are nos supposed to share nothing beteween states, could it be a cold start issue? – yorodm Dec 05 '18 at 17:22
  • @yorodm The error I see is exactly like one described here: https://stackoverflow.com/questions/383738/104-connection-reset-by-peer-socket-error-or-when-does-closing-a-socket-resu – dmigo Dec 05 '18 at 17:27
  • 2
    Yes, they can if reused. See container reuse: https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/ – jarmod Dec 05 '18 at 17:28
  • 1
    @dmigo It would be more helpful if you show us your code so we can see what's happening inside and outside your handler. – Noel Llevares Dec 06 '18 at 06:18

1 Answers1

0

As jarmod answered in the comments. Lambdas do share some state between runs.
Here there is an article on the topic.

dmigo
  • 2,849
  • 4
  • 41
  • 62