Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWLB 6.4 PAYG - runinit function failing #7

Open
wintermute000 opened this issue May 3, 2021 · 0 comments
Open

GWLB 6.4 PAYG - runinit function failing #7

wintermute000 opened this issue May 3, 2021 · 0 comments

Comments

@wintermute000
Copy link

wintermute000 commented May 3, 2021

For the template https://github.com/40net-cloud/fortinet-aws-solutions/tree/master/FortiGate/GWLB/6.4/PAYG

Stack creation consistently fails on runinit function

2021-05-03 22:25:37 UTC+1000 RunInitFunction CREATE_FAILED Received response status [FAILED] from custom resource. Message returned: See the details in CloudWatch Log Stream: 2021/05/03/[$LATEST]aae33bd416434b84ace2cff2e14c0ed1 (RequestId: c2df55e8-e26d-42b9-953f-dee44fcc2f3d)

There is an issue with the python code on the "resp" variable - perhaps this is a lambda specific issue because normally you don't have to define a variable in python before assignment?


START RequestId: c698584e-6bce-4f4c-ac07-4a0dd0a3a346 Version: $LATEST
--
https://cloudformation-custom-resource-response-apsoutheast2.s3-ap-southeast-2.amazonaws.com/arn%3Aaws%3Acloudformation%3Aap-southeast-2%3A281955572373%3Astack/FGT-GWLB/626d9010-ac0a-11eb-851b-0a66e0256550%7CRunInitFunction%7Cc2df55e8-e26d-42b9-953f-dee44fcc2f3d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210503T122534Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7199&X-Amz-Credential=AKIA6MM33IIZ2NGGIM7K%2F20210503%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Signature=136c6b0fc8f137726293facfb7598f30bf6afb675b9b475755433c72845039f5
Response body:
{     "Status": "FAILED",     "Reason": "See the details in CloudWatch Log Stream: 2021/05/03/[$LATEST]aae33bd416434b84ace2cff2e14c0ed1",     "PhysicalResourceId": "2021/05/03/[$LATEST]aae33bd416434b84ace2cff2e14c0ed1",     "StackId": "arn:aws:cloudformation:ap-southeast-2:281955572373:stack/FGT-GWLB/626d9010-ac0a-11eb-851b-0a66e0256550",     "RequestId": "c2df55e8-e26d-42b9-953f-dee44fcc2f3d",     "LogicalResourceId": "RunInitFunction",     "NoEcho": false,     "Data": {         "msg": "error"     } }
Status code: 200
local variable 'resp' referenced before assignment: UnboundLocalErrorTraceback (most recent call last):  File "/var/task/index.py", line 116, in handler    if resp['ResponseMetadata']['HTTPStatusCode'] == 200:UnboundLocalError: local variable 'resp' referenced before assignment
END RequestId: c698584e-6bce-4f4c-ac07-4a0dd0a3a346
REPORT RequestId: c698584e-6bce-4f4c-ac07-4a0dd0a3a346	Duration: 1189.01 ms	Billed Duration: 1190 ms	Memory Size: 128 MB	Max Memory Used: 90 MB	Init Duration: 395.31 ms
START RequestId: 89d9eb98-36a7-40fc-b3b5-7ee68396fb07 Version: $LATEST
https://cloudformation-custom-resource-response-apsoutheast2.s3-ap-southeast-2.amazonaws.com/arn%3Aaws%3Acloudformation%3Aap-southeast-2%3A281955572373%3Astack/FGT-GWLB/626d9010-ac0a-11eb-851b-0a66e0256550%7CRunInitFunction%7Ce144fd8d-1ec2-4754-ae95-70dcd45b8da4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210503T122547Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=AKIA6MM33IIZ2NGGIM7K%2F20210503%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Signature=6b496b9d06e95a5da254e1e73de8633cc1c285856dd30f4f54713dfa478fa3fc
Response body:
{     "Status": "FAILED",     "Reason": "See the details in CloudWatch Log Stream: 2021/05/03/[$LATEST]aae33bd416434b84ace2cff2e14c0ed1",     "PhysicalResourceId": "2021/05/03/[$LATEST]aae33bd416434b84ace2cff2e14c0ed1",     "StackId": "arn:aws:cloudformation:ap-southeast-2:281955572373:stack/FGT-GWLB/626d9010-ac0a-11eb-851b-0a66e0256550",     "RequestId": "e144fd8d-1ec2-4754-ae95-70dcd45b8da4",     "LogicalResourceId": "RunInitFunction",     "NoEcho": false,     "Data": {         "msg": "error"     } }
Status code: 200
local variable 'resp' referenced before assignment: UnboundLocalErrorTraceback (most recent call last):  File "/var/task/index.py", line 116, in handler    if resp['ResponseMetadata']['HTTPStatusCode'] == 200:UnboundLocalError: local variable 'resp' referenced before assignment
END RequestId: 89d9eb98-36a7-40fc-b3b5-7ee68396fb07
REPORT RequestId: 89d9eb98-36a7-40fc-b3b5-7ee68396fb07	Duration: 905.91 ms	Billed Duration: 906 ms	Memory Size: 128 MB	Max Memory Used: 91 MB





@wintermute000 wintermute000 changed the title runinit function failing on GWLB 6.4 PAYG GWLB 6.4 PAYG - runinit function failing May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant