AWS Lambda Functions have been, are and will be a major part of most AWS implementations. They are super handy, quick to develop, can be really cheap and generally just does what it needs to do.
In general it is considered good practice to not hard code any values into code, functions / methods (depending on your language of choice) but pass values like connection strings, environment names, credentials into the code at runtime, typically via environment variables.
Instead of doing this manually, why not use a service like ARGOS that does this automatically for you?
Identification of this issue is already covered by ARGOS and if set up, ARGOS can send you a message like this into your Slack channel.
If you have not signed up to ARGOS yet then why not spend a few minutes (seriously, minutes!) and sign up to our free trial and see if you have any secrets in your AWS Lambda environment variables.