I am using python, and want to configure the database connection based on whether the function is running offline or deployed to AWS.
Some examples use the environment variable 'IS_OFFLINE', but it doesn't seem to be set.
Was that feature replaced with something else, or only available in the js runtime? What's the right way to detect whether a function is being run offline?
Try:
console.log(process.env.IS_OFFLINE)
https://www.serverless.com/plugins/serverless-offline#the-processenvis_offline-variable
For Python: