Aws-cdk: Unable to test Lambda Destinations from console

Created on 28 Apr 2020  路  6Comments  路  Source: aws/aws-cdk

The console invocations of lambda functions do not test destinations. It looks like console invocations are synchronous and not of the Event type (Asynchronous).

Reproduction Steps

  1. crate a simple Lambda function
  2. add a destination of any type
  3. create a simple test event
  4. invoke the Lambda function from the console

Result: The Lambda function is invoked, but the event is not put on the destination. This happens without any notification.

This is :bug: Bug Report

@aws-cdaws-lambda bug needs-triage

Most helpful comment

Howdy! I work on the Lambda team. I will submit an issue, though we cannot use this as a tracking ticket -- cdk has nothing to do with Lambda Console :)

The real issue is that you can't test async function invokes on the console. Event Destinations only occur on async invoke. The console experience should have this functionality for people that need to test async invokes. Every time you hit "test", you are doing a request-response invoke.

In the meantime, if you have installed the aws cli, and know your function name, you can run:

aws lambda invoke --function-name FUNC_NAME_HERE --invocation-type Event /tmp/output.txt
cat /tmp/output.txt

All 6 comments

Hello -

This repo is tracking issues related to the CDK. We don't own the AWS console experience; you will need to open an issue with AWS support for this.

Hi,

Thanks for the update. I opened the ticket with AWS support. They said that this is beyond of the scope which they are able to handle and they are asking me to upgrade to paid support plan. I don't want to pay support plan, and I have workaround for this. This is a bug in AWS console. Is there any chance to forward this issue to developers who own the AWS console experience, so they can test and fix it.

Howdy! I work on the Lambda team. I will submit an issue, though we cannot use this as a tracking ticket -- cdk has nothing to do with Lambda Console :)

The real issue is that you can't test async function invokes on the console. Event Destinations only occur on async invoke. The console experience should have this functionality for people that need to test async invokes. Every time you hit "test", you are doing a request-response invoke.

In the meantime, if you have installed the aws cli, and know your function name, you can run:

aws lambda invoke --function-name FUNC_NAME_HERE --invocation-type Event /tmp/output.txt
cat /tmp/output.txt

Hi @iph ,
I appreciate the help. yes, I am invoking functions with CLI calls of the Event type. I thought it would be nice to have this functionality in the console.

I have noticed another bug with Destinations feature. Could you please check #7654 and submit an issue as well?

Also, could you please let me know issue numbers so I can follow them? I was unable to find to find the repo, that's why i opened an issue here. :)

Thank you in advance.

We filed a new issue for the one you just linked, and the other one was known about a few months back so added the data on that.

Also, could you please let me know issue numbers so I can follow them? I was unable to find to find the repo, that's why i opened an issue here. :)

There is no open source repo for Lambda and these issues, so I can't give you issue numbers :\
A lot of the times, these are part of much larger efforts that could tie in with other requests and so can't give dates. CDK issues isn't the right place, so let's not add more issues. Support tickets get funneled to us, so that is the best avenue (in fact, someone pinged me about 7654, so despite not having paid support, we still get the requests).

This is useful information. Good to know that support tickets get funneled to you without having paid support plans. I was hoping to get that information from the support team, but without luck. Thanks again. Appreciate your help and time.

Was this page helpful?
0 / 5 - 0 ratings