Skip to content

Commit

Permalink
Merge pull request #46 from MITLibraries/fix-secrets
Browse files Browse the repository at this point in the history
Fix secret string parsing
  • Loading branch information
Mike Graves committed Sep 4, 2018
2 parents 20528c3 + 6771a6e commit 73637ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

def handler(event, context):
client = boto3.client('secretsmanager')
secret_env = client.get_secret_value(SecretId=os.environ['SECRET_ID'])
secret = client.get_secret_value(SecretId=os.environ['SECRET_ID'])
secret_env = json.loads(secret['SecretString'])
cfg = Config.from_env()
cfg.update(json.loads(secret_env))
cfg.update(secret_env)
engine.configure(cfg['CARBON_DB'])
FTPFeeder(event, context, cfg).run()

0 comments on commit 73637ad

Please sign in to comment.