Questions tagged [aws-secrets-manager]

AWS Secrets Manager helps encrypt, store, and retrieve credentials for your databases and other services. Instead of hardcoding credentials in apps, you can make calls to Secrets Manager to retrieve credentials whenever needed. Secrets Manager helps protect access to IT resources and data by rotating and managing access to secrets.

See also: What Is AWS Secrets Manager? - AWS Secrets Manager

864 questions
12
votes
2 answers

How to set up local AWS Secrets Manager Docker container for local testing purposes?

I'm looking to set up a local Docker instance of AWS Secrets Manager. I've been scouring the web for an image or anything of the sort that I can use. I can only find documentation for AWS ECS secrets management. Does anyone have any experience with…
Bbbbob
  • 415
  • 2
  • 6
  • 10
12
votes
5 answers

How to integrate AWS Secret Manager with Spring Boot Application

I have a requirement to retrieve credentials from AWS Secret Manager, and I found that I need to add the gradle dependency for the following starter spring-cloud-starter-aws-secrets-manager-config Also, i found that I need to add the following…
pubudut
  • 603
  • 2
  • 8
  • 18
12
votes
4 answers

AWS Lambda: Async Calls outside handler (initialization section, invoke lambda)

I would like to call an asynchronous function outside the lambda handler with by the following code: var client; (async () => { var result = await initSecrets("MyWebApi"); var secret = JSON.parse(result.Payload); client= new…
12
votes
4 answers

Secrets manager extremely slow in EC2s via awscli and boto3

I'm writing a flask API in pycharm. When I run my code locally, requests using boto3 to get secrets from secrets manager take less than a second. However, when I put my code on an EC2, it takes about 3 minutes (tried in both t2.micro and…
rodrigocf
  • 1,951
  • 13
  • 39
  • 62
11
votes
0 answers

Implementing AWS Secret Manager in Java Play Framework

I am trying to implement aws secret manager in java play framework. I followed the steps in this article https://www.geekyhacker.com/2020/05/09/getting-database-credentials-from-aws-secrets-manager-in-spring-boot/ to implement it in springboot first…
11
votes
3 answers

AWS ECS - How to retrieve specific key from secret manager?

I may be missing something obvious here, but I can't seem to find documentation about retrieving a specific key/value from a secrets manager secret for an ECS task definition. I have a secret with an ARN like…
user1751825
  • 4,029
  • 1
  • 28
  • 58
10
votes
2 answers

How to tell Terraform to skip the secret manager resource if it exists?

The idea is that I want to use Terraform resource aws_secretsmanager_secret to create only three secrets (not workspace-specified secret), one for the dev environment, one for preprod and the third one for production env. Something like: resource…
10
votes
2 answers

How to store JKS certificate in AWS Secret Manager?

I need to securely store and fetch keystore.jks and truststore.jks files from my Java application in order to make secure communications with external application. Can we store these files in AWS Secret Manager? I am not able to find proper…
dc9211
  • 227
  • 1
  • 2
  • 11
9
votes
1 answer

How can I reference a object value from secret manager in serverless.yml?

I am deploying apps to AWS via serverless. And need to read values from secretmanager during deployment. I have read this doc:…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
9
votes
3 answers

Mocking Secrets Manager module for JavaScript jest unit tests

I'm having trouble getting the AWS Secrets Manager module mocked for the jest unit tests... The part it errors on is the .promise(). When I remove that, the code doesn't work for the real Secrets Manager so I think it needs to stay there. How do…
9
votes
3 answers

AWS CodeBuild secrets-manager config with environment variable

Update: Not sure when this happened, but this works as is described now. As well as an option in the Pipeline build action to set the secret directly. Original Question: I have an environment variable set for the secret-id set inside the build…
hyperdrive
  • 1,786
  • 5
  • 19
  • 33
9
votes
3 answers

Can I force CloudFormation to resolve values from Secrets Manager?

In the following (abbreviated CloudFormation template), I am trying to configure an AWS Lambda function to get a value from AWS Secrets Manager injected into its environment: Resources: Function: Type: AWS::Serverless::Function …
9
votes
4 answers

How to retrieve Secret Manager data in buildspec.yaml

Im working on creating the CodeBuild which is integrated with SonarQube, So I pass values and sonar credentials directly in my Buildspec.yaml Instead of Hardcoding directly, I tried to retrieve using the below command from SecretManager as it is…
9
votes
0 answers

How to best use AWS Secrets Manager in ebextensions?

I'm looking to use AWS Secrets Manager to obtain secrets and set them as environment variables on my Elastic Beanstalk instances. I've written a script on an ebextensions file that calls the Secrets Manager CLI to obtain my secret and I use that…
9
votes
1 answer

How to use AWS Secrets Manager in Express Project for fetching Credentials?

I am trying to migrate from my credentials and secrets to AWS Secrets Manager in my Express Project. The current structure has a config.json file which loads in sync when the express app. But when I try to fetch credentials from AWS API, the flow…
1
2
3
57 58