Migrate CLR code to AWS Lambda when upgrading Amazon RDS for SQL Server to 2025 | Amazon Web Services

Migrate CLR code to AWS Lambda when upgrading Amazon RDS for SQL Server to 2025 | Amazon Web Services

In Addressing CLR assembly deprecation in Amazon RDS for SQL Server, we explained that Microsoft SQL Server 2016 reached end of extended support on July 14, 2026, and that Amazon Relational Database Service (Amazon RDS) for SQL Server 2017 and later doesn’t support user-defined SQL Common Language Runtime (CLR) assemblies. This is because CLR strict security treats every assembly as UNSAFE, and AWS doesn’t provide the sysadmin permissions needed to work around it on RDS for SQL Server.

That post presents four replacement strategies for your CLR code:

  • Option A – Upgrade to RDS for SQL Server 2025 and invoke AWS services (such as AWS Lambda) through the native sp_invoke_external_rest_endpoint stored procedure.
  • Option B – Convert to native Transact-SQL (T-SQL).
  • Option C – Move the logic to the application layer.
  • Option D – Migrate to SQL Server on Amazon Elastic Compute Cloud (Amazon EC2) (retains CLR).

…

https://aws.amazon.com/blogs/database/migrate-clr-code-to-aws-lambda-when-upgrading-amazon-rds-for-sql-server-to-2025/