Skip to content

Instantly share code, notes, and snippets.

@toshke
Last active December 22, 2020 09:15
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 toshke/1d42f69106e11daf1f52f561c8baa716 to your computer and use it in GitHub Desktop.
Save toshke/1d42f69106e11daf1f52f561c8baa716 to your computer and use it in GitHub Desktop.
physical id
def get_physical_id(r_properties):
""" Generated resource id """
bucket = r_properties['Bucket']
key = r_properties['Key']
return f's3://{bucket}/{key}'
def cr_handler(event, context):
"""
Create, Update or Remove S3 object
as Custom Resource for AWS CloudFormation
"""
physical_id = get_physical_id(event['ResourceProperties'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment