AWS Certified Developer Associate DVA-C02 Practice Question
An engineer needs to securely manage the storage and retrieval of database login information for an application hosted on cloud-based virtual servers. These credentials are required by the application's code to establish database connections during run time. What method should the engineer employ to ensure that the login information is handled safely?
Apply an access policy granting the virtual server the necessary permissions to interact with the database without explicit credentials.
Embed the database credentials directly in the source code of the application, encrypting the information using a basic encryption algorithm.
Leverage a secret management service for the secure handling of database authentication information, allowing the application to access these details at runtime as required.
Configure server environmental variables to hold the login details, reading them directly within the application whenever database connections are needed.