Is it possible to somehow invoke an AWS Lambda function from an EC2 hosted SQL Server 2019 instance? Could this be achieved using SQL Server CLR Functions perhaps? Before I attempt it I wondered if anyone had any experience of this which might help me to find a way to acheive this. Thanks.
3
-
I would not recommend using SQLCLR, (somewhat ironic since I have been a huge proponent for SQLCLR - but we are now seeing big SQLCLR issues in production systems), but instead do it some other way. Since you are on SQL 2019, External Languages, (Python or Java), my be a way to do it. I assume you can call AWS Lambda's from both Python and Java. However, if SQLCLR is the only way to do it, I believe it should be doable. Can you post some code how you would do it from plain C#, and we can take it from there... (see my other comment)Niels Berglund– Niels Berglund2021-05-19 12:20:03 +00:00Commented May 19, 2021 at 12:20
-
(Followed from my comment above). However, my first choice would be to do it from outside SQL altogether. Followed by External Languages. Last resort SQLCLR.Niels Berglund– Niels Berglund2021-05-19 12:21:01 +00:00Commented May 19, 2021 at 12:21
-
Thanks @NielsBerglund - considering 'outside SQL altogether' then I would guess I would need to queue my Lambda invoke details into a database table and execute the lambda from a service process which polls the 'queue' at regular intervals. Is there a better method than that? I'm wondering if I can get SQL Server to invoke an OS process to do the work, perhaps. I've not looked at your suggested External Languages before and so am doing some reading.Elliveny– Elliveny2021-05-19 12:52:31 +00:00Commented May 19, 2021 at 12:52
Add a comment
|