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
2
votes
1 answer

Canary - AccessDeniedException: Access to KMS is not allowed

I have setup a simple synthetic transaction monitoring (canary) in aws, that running a POST HTTP request, against specific endpoint, using a secret keys defined in AWS Secretes Manager (ASM). const AWS = require('aws-sdk'); const secretsManager =…
edwio
  • 198
  • 3
  • 20
2
votes
1 answer

Local MWAA (AWS Airflow) using SecretsManager as backend "Can't locate credentials"

I'm running a local environment of a MWAA instance that is running on Docker. Everything is working fine and I try to set up SecretsManager as an alternative backend for connections only. I've added this to the airflow.cfg file: [secrets] backend =…
2
votes
1 answer

Rotating a Secret Using a Custom Lambda Function

How to write a lambda for a rotating secret (CDK in Typescript)where password changes every hour . const templatedSecret = new secretsmanager.Secret(this, 'TemplatedSecret', { generateSecretString: { secretStringTemplate:…
2
votes
1 answer

How to prevent terraform from asking for the value of a variable that is set on AWS Secrets Manager?

I have the following HCL code, that asks & reads the secret_api_key variable from the terminal on terraform plan and saves it in secret manager. variable "secret_api_key" { type = string sensitive = true } resource…
2
votes
1 answer

Copy AWS secrets to another account

I have 400 secrets ("Other Type of secrets") stored in account A and need to copy them into account B. bash script: for arn in $output_list; do aws secretsmanager get-secret-value --secret-id "$arn" >> out.json done Now I get an out.json file…
HelloWorld
  • 77
  • 1
  • 8
2
votes
2 answers

How to set environment variables from platform hooks in elastic beanstalk?

I am trying to deploy a django application using elastic beanstalk. The app connects to the database using the environment variables. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': os.environ['RDS_DB_NAME'], …
2
votes
1 answer

An error occurred: KeypairSecretRotationSchedule received when doing serverless deploy

While I was deploying my application using serverless npx serverless deploy Error received > Serverless Error ---------------------------------------- > > An error occurred: KeypairSecretRotationSchedule - Rotation is > blocked by pending…
Rohit Mittal
  • 395
  • 1
  • 5
  • 18
2
votes
1 answer

terraform aws_secretsmanager_secret_version set base64encode(file("./src/secret.json")) as the value

I am trying to setup a key value secret in AWS Secrets Manager with terraform. Now I would like to replace the string "AzureDiamond" with a base64 encoded json object. Can you help me how I could replace the mentioned string with the value returned…
2
votes
2 answers

AWS: Assign tag to secret using variable

I want to assign variable's value to the secret. I tried this. aws secretsmanager tag-resource --secret-id blah-blah --tags '[{"Key": "abc", "Value": "{$a}"}]' I'm getting this error: An error occurred (InvalidRequestException) when calling the…
2
votes
0 answers

AWS unable to connect with data in query editor using secret manager

I've been trying to access my AWS RDS database with my secrets manager, whenever I try to access the query editor it shows me connect to the database dialog, from there I select "Connect with Secret Manager ARN", after that I paste my secret manager…
2
votes
1 answer

aws_secretsmanager_secret key/value Pair Example (Based On Terraform Docs) Doesn't Work With Randomly Generated Passwords

What's The Goal? To take the following solution (that generates a secrets manager secret with a random password) and move from a Plaintext secret to a Key/Value secret. Plaintext Secretsmanager Secret Solution resource "random_password"…
AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103
2
votes
1 answer

Terraform AWS secret manager valueFrom syntax

Im trying to provision a service on ECS using Terraform. I have secrets in AWS Secrets Manager: { "test": "secret" } and provide them to my task definition as follows: .... "secrets": ${jsonencode( [ { name = "test_1", …
kot
  • 65
  • 1
  • 7
2
votes
0 answers

NestJs TypeORM configuration using AWS secret manager

please does anyone have an example/ tutorial on how / better way to get TypeORM configs from AWS secret manager (DB_PASSWORD, DB_PORT, ...) I found examples for SSM but not for AWS secret manager. Thank you.
2
votes
0 answers

Add certificate in plain text in requests.Session and Zeep

How can I add certificates (cert) to the requests.Session object in plain text? I am now storing my certificatkey in AWS with Secrets Manager. The problem is that now I do not want to have a file on the server (I am using lambdas), now I want to…
RodriKing
  • 822
  • 2
  • 10
  • 20
2
votes
1 answer

Securely upload secrets to Secret Manager/Parameter Store

I caught a misstake I have made in the way I have been uploading secrets to Secrets Manager. Through using cloudformation I have been sending in the secret as a plain text parameter into the template. The secret itself never gets exposed in the…