Step-By-Step Guide: How to use AWS Secrets Manager

Architecture Diagram

Step-By-Step Guide

Step 1. Create Aurora Serverless Database with Creds

a. Go to Amazon Console and Search for RDS

b. Click on the “Create database” button

c. Select the following configurations

  • Standard create
  • Engine Options – Aurora (MySQL Compatible)
  • Templates – Dev/Test
  • Select “Aurora Standard” as Configuration options
  • Uncheck “Enable deletion protection”
  • Click on the “Create database” button

Step 2. Verify Secrets in Secrets Manager

  • Go to AWS Console and Search for Secrets Manager
  • Click on the “Secrets” link on the left-hand side panel.
  • Click on the Secret Name to view details, tags, rotation configurations, retrieve secret value etc.

Step 3. Application queries Data secret from Secrets Manager

  • Copy the Python3 Sample code into an IDE of your choice

Step 4. Secrets Manager retrieves the secret, decrypts it, and returns the password to the application

Step 5. The application parses the credentials and uses them to access the database

  • You can augment the sample code to connect to the database to retrieve and update the data
Rate this post

Leave a Reply