Greengrass V2: LegacySubscriptionRouter component target LambdaNotFoundException

0

I have a Greengrass Lambda component subscribed to the aws.greengrass.SNS output topic sns/message/status using the aws.greengrass.LegacySubscriptionRouter component with the following configuration:

        {
            "subscriptions": {
                "GreengrassSnsOutput": {
                    "id": "GreengrassSnsOutput",
                    "source": "component:aws.greengrass.SNS",
                    "subject": "sns/message/status",
                    "target": f"component:MyComponentName",
                }
            }
        }

That works as expected, but if I update the Lambda corresponding to MyComponentName, I get the following error message in the main Greengrass log file:

com.aws.greengrass.lambdamanager.LambdaNotFoundException: Lambda arn:aws:lambda:region:account:function:my-function-name:# does not exist

The developer guide suggests that v2.1.0...

Adds support to specify component names instead of ARNs for source and target. If you specify a component name for a subscription, you don't need to reconfigure the subscription each time the version of the Lambda function changes.

I took that to mean nothing needs to happen with respect to the subscription after a new component version with the same name but a new Lambda ARN is deployed. Is that right or is there something else that needs to be done?

I'm using the following component versions:

  "aws.greengrass.LegacySubscriptionRouter": {
    "componentVersion": "2.1.4"
  },
  "aws.greengrass.Nucleus": {
    "componentVersion": "2.5.5"
  },
  "aws.greengrass.SNS": {
    "componentVersion": "2.1.0"
  },
preguntada hace 2 años337 visualizaciones
1 Respuesta
1

Hi,

Please use a RESET configuration update to ensure that the configuration used is what you expect it to be for the subscription router component. Use RESET: [""] to reset all of the configuration of that component to the default; then use MERGE to merge in your desired configuration. https://docs.aws.amazon.com/greengrass/v2/developerguide/update-component-configurations.html#reset-configuration-update

The error message does not match the configuration, so I think you still have configuration deployed from a previous attempt, using RESET will remove it.

AWS
EXPERTO
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas