Created March 6, 2016 23:49
-
-
Save aws-scripting-guy/83d901527fa7adc271da to your computer and use it in GitHub Desktop.
Revisions
-
aws-scripting-guy created this gist
Mar 6, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ def lambda_handler(event, context): # Get Account Id from lambda function arn print "lambda arn: " + context.invoked_function_arn # Get Account ID from lambda function arn in the context ACCOUNT_ID = context.invoked_function_arn.split(":")[4] print "Account ID=" + ACCOUNT_ID