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
69
votes
13 answers

Parsing secrets from AWS secrets manager using AWS cli

I am retrieving secrets I have stored in AWS secrets manager with the AWS cli like this: aws secretsmanager get-secret-value --secret-id secrets Which returns arn:aws:secretsmanager:secret:my_secrets my_secrets {"API_KEY":"ABCDEFGHI"} …
Moddaman
  • 2,538
  • 3
  • 23
  • 41
43
votes
6 answers

How to normalize a private key stored on AWS secrets manager

EDIT: AS OF Feb 2020, AWS SEEMS TO have FIXED THIS BUG. THE BASE64ing and other wise is no longer needed. I have my secret stored as a string but of course when aws stores the secret it removes white space and line breaks. On top of it it wraps the…
Josh Beauregard
  • 2,498
  • 2
  • 20
  • 37
32
votes
6 answers

how do I use aws secret manager with nodejs lambda

I tried to wrap the example code snippet to get secrets in a function and then call it but it does not appear to be working. I suspect I am calling it asynchronously and I need to call it synchronously? I just want a function I can call to get a…
red888
  • 27,709
  • 55
  • 204
  • 392
31
votes
6 answers

AWS Elastic Beanstalk and Secret Manager

Does anyone know is it possible to pass a secret value as an environment variable in elastic beanstalk? The alternative obviously is to use the sdk in our codebase but I want to explore the environment variable approach first Cheers Damien
Damien
  • 4,081
  • 12
  • 75
  • 126
29
votes
6 answers

AWS Secrets Manager can’t find the specified secret

I'm using AWS Fargate and storing sensitive data with Secrets Manager. Task definition should get environment variables from secrets store - name: "app" image: "ecr-image:tag" essential: true secrets: - name: "VAR1" valueFrom:…
28
votes
5 answers

How to retrieve a secret in terraform from aws secret manager

I have a secret stored in secrets manager to which I have access to the arn. I want to retrieve the value from this arn and use it in terraform how can I achieve this? I found this from terraform website data "aws_secretsmanager_secret" "by-arn" { …
user_mda
  • 18,148
  • 27
  • 82
  • 145
28
votes
2 answers

Using AWS Secrets Manager with Python (Lambda Console)

I am attempting to use Secrets Manager a Lambda function in AWS. Secrets a manager is used to store database credentials to Snowflake (username, password). I managed to set up a secret in Secrets Manager which contains several key/value pairs (e.g.…
jeff
  • 361
  • 1
  • 5
  • 7
26
votes
5 answers

GetSecretValue operation is not authorized error with AWS Secrets Manager

I am looking to use AWS secret manager to store my RDS password. I have created my database entry in secret manager without any Rotation option, for now I just want to save a password and retrieve it from my local so I can test applications with it.…
Sidhu177
  • 457
  • 1
  • 6
  • 13
25
votes
1 answer

Terraform | Secrets Manager | Reuse of existing secrets without deleting

I am creating Secrets in AWS using Terraform code. My Jenkins pipeline will create the infrastructure every 2 hours and destroys it. Once Infrastructure re-creates after 2 hours, it happened that, AWS Secrets is not allowing me to re-create again…
asur
  • 1,759
  • 7
  • 38
  • 81
22
votes
5 answers

AWS secrets manager, 'A previous rotation isn’t complete' when rotating secrets

I've created a secret and updated it to have a lambda rotation function My secret looks like aws secretsmanager list-secret-version-ids --secret-id envir/username { "Versions": [ { "VersionId":…
user2599522
  • 3,005
  • 2
  • 23
  • 40
17
votes
4 answers

How do I grant a rotation Lambda access to AWS Secrets Manager

Using the serverless framework, I am trying to build a Lambda function that periodically rotates a secret stored in AWS Secrets Manager. I am having trouble configuring the roles needed for the Secret Manager to execute the Lambda. In my…
16
votes
1 answer

AWS Lambda access Secrets Manager from within VPC

I have a lambda that needs to communicate 'locally' with an EC2 instance in a private VPC. The API key is being stored in Secrets Manager. Using the default code provided by Secrets Manager and the necessary IAM roles I am able to read the API key…
14
votes
7 answers

Dynamic References to Specify Secret Manager Values in AWS Cloudformation

Is there anyway we can pass dynamic references to Secret Manager to AWS Launch Config User Data? Here is the code snippet I tried: "SampleLaunchConfig": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Properties": { …
12
votes
2 answers

AWS secret manager access deny issue

I have a secret key (USRFTP) stored in ACCOUNT A, I want to access this key from EC2 box with role ASHISHROLE in ACCOUNT B. I am running python code to get secret key as given below, Using resource policy in secret key as given below, KMS policy is…
Jaishree Mishra
  • 545
  • 2
  • 5
  • 24
12
votes
1 answer

Secrets Manager can't find the specified secret value for staging label

I've been trying to create secret on the command line as follows : ~/$ aws secretsmanager create-secret --name first-secret { "ARN": "arn:aws:secretsmanager:us-east-2:123456789012:secret:first-secret-9ez7W2", "Name": "first-secret" } ~/$ aws…
Philippe
  • 20,025
  • 2
  • 23
  • 32
1
2 3
57 58