How to Fetch Secrets from AWS Secrets Manager in a Spring Boot Application

Опубликовано: 07 Май 2026
на канале: Refactor First
9,703
106

In this video we will look into working with AWS Secrets Manager in a Spring Boot application.

You will get to learn the following:
How to pull database credentials from AWS Secrets Manager in a Spring Boot Application.
How to use LocalStack with Spring Boot Application.
How to write integration test using Testcontainers for LocalStack and MySQL.

You can also read about this along with the GitHub link to the code: https://refactorfirst.com/spring-boot...

Spring Boot Application Testing Masterclass course : https://www.copecart.com/products/521...

You can support me by buying me a coffee : https://www.buymeacoffee.com/amrutprabhu


-----------------
Gear I use :
-----------------
Sony Alpha a6000 : Amazon India : https://amzn.to/3RM7QMJ
Germany : https://amzn.to/3G1Iw24
US : https://amzn.to/3cpKZ9E
UK : https://amzn.to/3J0g5Ry

Razer Microphone : Amazon India : https://amzn.to/3aQxI9C
Germany : https://amzn.to/3DRRrAh
US : https://amzn.to/3ITKu3Q
UK : https://amzn.to/3v3RHbU
--- Chapters --------

00:00 - Introduction
00:37 - Creating A Spring Boot Application
01:36 - Pom Dependencies
03:07 - Code Walkthrough
03:43 - Properties Configuration
04:35 - Understanding AWS Secrets Manager Configuration
05:43 - Secrets On AWS Secrets Manager
06:38 - Actuator Environment Endpoint Configuration
07:03 - Docker Compose with MySQL
07:30 - Starting the Application
08:04 - Viewing Loaded Secrets with Actuator Endpoint
08:43 - Fetching and Storing Data
09:24 - Understanding What is LocalStack
09:48 - Configuring LocalStack in Docker Compose File
10:56 - Starting LocalStack with Docker Compose.
11:15 - Configuring LocalStack Endpoint in Properties File
12:00 - Starting Application with LocalStack
13:00 - Writing Integration Test
13:48 - Testcontainer Configuration
14:11 - LocalStack Testcontainer Setup
14:39 - Setting Test Properties using Testcontainers
15:30 - Learn to Write Good and Reliable Tests
16:10 - Conclusion



Music Credits:-

Sappheiros - Awake
----------------------------
Social Media
YouTube    / sappheiros  
Spotify goo.gl/hE9MDJ
Twitter twitter.com/SappheirosMusic
Instagram instagram.com/sappheirosmusic
Facebook facebook.com/SappheirosMusic
Discord discord.gg/Pk87yN9
  / awake-1  
--------------------------------------------------