Problem: My lambda function only writes to CloudWatch Logs on the first S3 PUT trigger after deploy.
Context: -Lambda execution role has permissions for CreateLogGroup, PutLogEvents, CreateLogStream, etc. for all resources. -Event type: ObjectCreatedByPut on a specific file name in an S3 bucket
Once I deploy the lambda, the first PUT trigger will successfully execute the lambda, and will also write to CloudWatch Logs. All subsequent PUT actions (uploading a new version of the file) will also successfully execute the lambda, however, it will not write to CloudWatch Logs. The lambda will only write to CloudWatch logs if I redeploy the lambda code, and then upload a new version of the file.
My assumption is that I would only want to deploy the code once, and then every PUT trigger that occurs after deployment would both execute the lambda and write logs to CW Logs. I'm trying to understand if I am misunderstanding how the lambda triggers + deployment work together, or have I simply configured the lambda improperly?
Thanks!