I have a SQL Server instance on AWS that I have opened to external access by altering my security group to allow access from “Everywhere".
+-------------+----------+------------+--------------------------+
| Type | Protocol | Port Range | Source |
+-------------+----------+------------+--------------------------+
| MSSQL | TCP | 1433 | Custom 0.0.0.0/0 |
| MSSQL | TCP | 1433 | Custom ::/0 | †
+-------------+----------+------------+--------------------------+
I would like to restrict this access to this database, though not via IP addresses since the service I will use to access it has no static IP.
How can I tighten inbound access to this database for use with an external service (eg Firebase function or NodeJS application)?
† AWS security group rule that is generated when "Everywhere" and "MSSQL" are selected in the Security Group inbound rules section