0

I deploy two lambda functions on a Greengrass device. For better deployment, we decide to work with ALIAS so my Function A in Version 36 has an alias: production and my function B in Version 37 too.

When I deploy these Lambda-Functions to Greengrass - i can find them in the ggc-deployment directory (but with the Version number) so this is a huge Problem because when Function A invokes Function B I have to set a qualifier ... at the moment on every deployment from Function B I have to check the Version number and set it manually in Function A and deploy it also ... is there a better Workaround?

1 Answers1

0

I worked now with ENV-Vars. I set the Version of the Function via Greengrass Management Console in the Env-Section (calcDataVersion=51): Env Vars for Greengrass In Function A i get the Var:

calcDataQualifier = str(os.environ['calcDataVersion'])

And use it to invoke my function:

responselocal = clientlocal.invoke(
        ClientContext=base64.b64encode(bytes(client_context)),
        FunctionName='hereGoesMyARNNumber',
        InvocationType='RequestResponse',
        Payload=client_context,
        Qualifier=calcDataQualifier
    )