Skip to content

Instantly share code, notes, and snippets.

View pedrodparkes's full-sized avatar
💭
Mo:Dem

Vitalii Samotaiev pedrodparkes

💭
Mo:Dem
View GitHub Profile
@pedrodparkes
pedrodparkes / aws_replicator.py
Created September 16, 2020 15:48
aws secrets manager replicator - replicate existing secret under new name in same aws region
import boto3
from os import environ
from botocore.config import Config
AWS_PROFILE_NAME = 'ops-prod'
AWS_REGION = 'eu-central-1'
SourceSecretArn = 'arn:aws:secretsmanager:eu-central-1:<account_name>:secret:backend/secret_values-uAIAFz'
NewSecretName = 'newsecretname/secret_values'
boto3.setup_default_session(profile_name=AWS_PROFILE_NAME)