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
3
votes
2 answers

How to use a username and password stored in AWS Secrets Manager in my Jenkins job?

I have a Jenkins Pipeline that runs Cypress Tests on a Docker Container. The tests need a username and password to login to the web application. I have saved the username and password in AWS Secrets Manager. I can do that when I execute a shell…
3
votes
1 answer

AWS: How to get PHP on an EC2 instance to read a Secrets Manager secret?

I've set up an EC2 instance running PHP. For testing only, the instance is in a public subnet with a Security Group that allows All Traffic to 0.0.0.0/0. The Route Table has the default local route to 10.0.0.0/16 (the VPC's CIDR block) and a route…
3
votes
3 answers

Django + AWS Secret Manager Password Rotation

I have a Django app that fetches DB secret from AWS Secret Manager. It contains all the DB parameters like username, password, host, port, etc. When I start the Django application on EC2, it successfully retrieves the secret from the Secret Manager…
3
votes
3 answers

Setting up AWS Secrets Manager .Net Core

I have a .Net Core application that is running on an EC2 Instance. I want to use the Secrets Manager to contain my secrets for the web application such as "connection string" etc. The AWS Secrets Manager documentation isn't very useful, I can't…
user11928577
3
votes
1 answer

Permission error when accessing AWS secrets manager from an EC2 instance

I have a Python program running on a linux EC2 instance, I am trying to get a value from secrets manager but I keep getting a permissions error An error occurred (AccessDeniedException) when calling the GetSecretValue operation: User:…
imlearningcode
  • 381
  • 1
  • 7
  • 24
3
votes
2 answers

When to use boto3 sessions explicitly

By default boto3 creates sessions whenever required, according to the documentation it is possible and recommended to maintain your own session(s) in some scenarios My understanding is if I use a session created by me I can reuse the same…
user3778137
3
votes
3 answers

GPG Public/private key cannot be accessed correctly from AWS Secrets manager via python3

I am using python-gnupg package to create GPG public and private key. The generated private key I am storing in AWS secrets manager as follows. Key: private_key value: -----BEGIN PGP PRIVATE KEY BLOCK----- Version: GnuPG v2.0.22…
Mehul
  • 101
  • 1
  • 5
3
votes
3 answers

Is it possible to generate two secret strings in one CloudFormation SecretsManager secret?

I want to create a SecretsManager secret with two values both generated on the fly. Is that possible and how do I do it? For example, if I wanted the final secret to look like this in JSON, what would the CloudFormation yaml look like? { …
3
votes
4 answers

AWS Secrets Manager call from Lambda returning null/none

I am using an AWS Lambda function to call AWS Secrets Manager for retrieving secret values but it just returns the value None/Null. Here is my code: # Secrets Manager import boto3 import base64 from botocore.exceptions import ClientError def…
3
votes
1 answer

Attaching new Permissions to role in AWS

I'm trying to work with secretsmanager with aws and terraform. I have a file where I have everything about roles and this about the role which I want to manage data "aws_iam_policy_document" "ecs_task_execution_role" { version =…
zoit
  • 617
  • 2
  • 20
  • 41
3
votes
2 answers

Error when trying to pass aws_secretsmanager_secret_version value

Under PASSWORD section of RDS AWS creation, I am trying to pass aws_secretsmanager_secret_version value. I am getting below error. resource "aws_db_instance" "airflow" { allocated_storage = "${var.rds_allocated_storage}" …
asur
  • 1,759
  • 7
  • 38
  • 81
3
votes
1 answer

How to get and use the Secret Manager values before the modules load in the NodeJS?

I have a Node JS Project which is having handler, service and model. As part of the application we used to read the env variables from the config js file which varies each environment. Recently we try to move those config js information into AWS…
3
votes
2 answers

Socket exception on AWS Secrets Manager GetSecretValueAsync on .NET Core 2.1

I have been struggling to implement secrets manager on .NET Core. It always returning me with Socket Exception and HTTPRequestException on GetSecretValueAsync method call, while it is working on my colleagues PC. SocketException: A socket operation…
3
votes
1 answer

NodeJs unable to callback AWS Secrets Manager response

I'm trying to use AWS Secrets Manager to fetch my RDS credentials, The Secrets Manager SDK is able to get the Secret properly, But I am unable to export it back to my calling file. I have 2 files - 1. index.js - var mysql = require('mysql'); var…
Dev1ce
  • 5,390
  • 17
  • 90
  • 150
3
votes
1 answer

How to execute shell commands from within a Kubernetes ConfigMap?

I am using Helm charts to create and deploy applications into my K8s cluster. One of my pods requires a config file with a SDK key to start and function properly. This SDK key is considered a secret and is stored in AWS Secret Manager. I don't…