in Custom/custom-lookup-exports.py [0:0]
def get_exports():
print('getting stack exports')
stackexports=[]
response = cfn.list_exports()
stackexports.extend(response['Exports'])
while 'NextToken' in response and response['NextToken'] is not None:
token = response['NextToken']
response = cfn.list_exports(NextToken=token)
stackexports.extend(response['Exports'])
print('list of stack exports: ' + str(stackexports))
#create dict of stack exports
stackexportvalues = {}
for stackexport in stackexports:
stackexportvalues[stackexport['Name']] = stackexport['Value']
print('list of stack exports in dict: ' + str(stackexportvalues))
return stackexportvalues