Access to the ArcGIS Server instance is controlled by the Amazon security group settings. By default, no outside ports are open, thereby securing your database instance.
Although the Amazon security group provides the control to block rogue connection requests, you can further secure access to the database instance. See the Amazon Web Services documentation for suggestions.