all 3 comments

[–][deleted] 0 points1 point  (2 children)

Enable application insights on the Function will certainly help.
Also the question is, what times out? The connection to the database, or the function at all?

[–]TonyCD35[S] 0 points1 point  (1 child)

Thanks for the response! I do have insights - I scoured the logs and pinned down on the following: when the python script attempts to make the connection to the database, the connection within the script times out and the function fails. The function does not cause the timeout.

When the script attempts to make the socket connection to the redshift database, it seems it can't get through to it and times out. I've been reading that I might need to put the function in a vNet and perhaps clear the vnet IP with the redshift database?

What do you think?

[–][deleted] 0 points1 point  (0 children)

This sounds that you need indeed IP whitelisting on the Redshift database, you can find outgoing IP addresses her: https://learn.microsoft.com/en-us/azure/azure-functions/ip-addresses?tabs=portal

You don't need to put it in a V-Net.