in buildstack.py [0:0]
def buildstack(region):
# builds the stack
try:
client = boto3.client('cloudformation',region_name=region)
create_stack_response = client.create_stack(
StackName=stackname,
TemplateBody=templateBody,
NotificationARNs=[],
Capabilities=[
'CAPABILITY_NAMED_IAM',
],
OnFailure='ROLLBACK'
)
stackuuid = create_stack_response['StackId']
return stackuuid
except ClientError as e:
print("[ERROR]",e)
raise
except Exception as e:
print("[ERROR]", e)