Implementações de serviços AWS utilizando a AWS SDK for Java V2
Necessário baixar e iniciar o localstack localmente
Docker e Localstack são pré-requisitos para que o exemplo funcione
No arquivo docker-compose.yml, alterar conforme abaixo:
DE
- "${PORT_WEB_UI-8080}
PARA
- "${PORT_WEB_UI-8081}
Também incluir quais serviços irá utilizar:
- SERVICES=secretsmanager
Criação de Secret via console
aws --endpoint http://localhost:4566 secretsmanager create-secret --name token-key --description "Chave do token" --secret-string "s3cr3t" --region sa-east-1
Atualização de Secret via console
aws --endpoint http://localhost:4566 secretsmanager update-secret --secret-id token-key --secret-string "n3w s3cr3t" --region sa-east-1
Clone the project
git clone https://github.com/felipejsm/demosaws.git
Go to the project directory
cd demosaws
Install dependencies
mvn clean install
Start the server
mvn spring-boot:run
Access through browser
http://localhost:8080/v1/secrets