bluethundr12

Untitled

Oct 24th, 2019
139
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import boto3
  2. from pysecret import AWSSecret
  3.  
  4. def store_secret(aws_account, user_name, secrets_aws_account, secrets_client, access_key, secret_key, kms_key_id):
  5. key_info = str({
  6. user_name: {
  7. "access_key": access_key,
  8. "secret_key": secret_key
  9. }
  10. })
  11. aws_secret = aws.deploy_secret(name=secret_name, secret_data=key_info)
  12.  
  13. ###############
  14. RESULT
  15. ###############
  16.  
  17. "{'test_user8': {'access_key': 'AKIA6O2LIHUG3YVCE3DA', 'secret_key': 'blahblahblahblah'}}"
RAW Paste Data