i've created trigger in aws codecommit repositories runs lambda function whenever triggered. lambda function calls script @ development server perform git pull. far good.
the problem need pass name or id of repository sets off trigger dev machine can git pull correct repository. question then, is how call name or id of repository triggered lambda function within lambda function?
my lambda function written in python
i've taken @ lambda documentation @ http://docs.aws.amazon.com/lambda/latest/dg/welcome.html there no mention of codecommit. because codecommit triggers quite new - few months old. there documentation of event sources @ http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html . followed tutorial @ - http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-lambda.html create lambda function.
any appreciated!
the code pull out repository in python example. code snippet is:
#get repository event , show git clone url repository = event['records'][0]['eventsourcearn'].split(':')[5]
the repository name embedded in arn lambda function receives.