Skip to content

Instantly share code, notes, and snippets.

@babakc
Created February 23, 2018 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save babakc/7fd513fb29f2b14d98fc82e29d76f53d to your computer and use it in GitHub Desktop.
Save babakc/7fd513fb29f2b14d98fc82e29d76f53d to your computer and use it in GitHub Desktop.
import boto3
import time
def lambda_handler(event, context):
time.sleep(60)
ssmclient = boto3.client('ssm')
ssmclient.delete_parameter(Name="pwd-" + event['resources'][0].split('/')[1])
print "Password for pwd-" + event['resources'][0].split('/')[1] + " deleted."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment