Coder Social home page Coder Social logo

fortinet-aws-solutions's People

Contributors

erabatan avatar jvhoof avatar ozanoguz avatar xxradar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fortinet-aws-solutions's Issues

GWLB 6.4 PAYG - runinit function failing

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





GWLB 6.4 PAYG - fails if 0.0.0.0/0 used as PublicDefaultRouteSPK*

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

Stack creation consistently fails with
VPCRouteSPK1 CREATE_FAILED The route identified by 0.0.0.0/0 already exists
VPCRouteSPK2 CREATE_FAILED The route identified by 0.0.0.0/0 already exists

I figured out eventually that the stack doesn't like you using 0.0.0.0/0 as your source IP because then it dupes 0.0.0.0/0 here

  PublicDefaultRouteSPK1:
    DependsOn: AttachGateway
    Properties:
      DestinationCidrBlock: !Ref MyIPForAccess
      GatewayId: !Ref IGWSPK
      RouteTableId: !Ref RouteTableSPK1PUB
    Type: 'AWS::EC2::Route'

and

   VPCRouteSPK1:
    Type: 'AWS::EC2::Route'
    DependsOn: TgwAttSPK1
    Properties:
      RouteTableId: !Ref RouteTableSPK1PUB
      DestinationCidrBlock: 0.0.0.0/0
      TransitGatewayId: !Ref TGW1

I tried deleting the VPCRouteSPK1 / 2 resources but the the init function starts failing so I put a /32 in there as per example.

Suggest putting warning in docs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.