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

Failed to invoke success callback - java.lang.IllegalArgumentException: No node at '/Properties/Code' (unmatched part: '/Code') #2449

Closed
RegisBouchard opened this issue Feb 19, 2021 · 4 comments
Labels
bug We can reproduce the issue and confirmed it is a bug.

Comments

@RegisBouchard
Copy link

Hi,

I am new to AWS functionalities. I followed the guide in order to be able to install the AWS toolkit.
My objective would be to use locally the lambda function to debug.

I am using

  • PyCharm 2020.3.3 (Community Edition)
  • Windows 10 10.0 Pro
  • AWS Toolkit 1.24-203

I tried to use the HelloWorldFunction template to test the functionalities and modified the function to import a layer from my amazon account.

When I execute the program locally using the terminal
sam build --template --template.yaml
then
sam local invoke -e events\event.json

Everything works fine :

  1. The .aws-sam is successfully build
  2. The layers imported in the AppData\Roaming\AWS SAM folder.
  3. The event.json used to run the function and print in the terminal the right return

However, when I try to run the Lambda with the AWS Lambda plugin configuration in PyCharm
image

  1. The SAM Build is successfully executed
  2. Then the following "IDE Fatal Errors" is raised
    Capture

Also, I can't stop or rerun the program, but I think this bug is already reported.

Thank you for the help,

Régis

@RegisBouchard RegisBouchard added the bug We can reproduce the issue and confirmed it is a bug. label Feb 19, 2021
@abrooksv
Copy link
Contributor

Can you share a sanitized version (just the Resource Type value and what properties you have defined) of the template you are trying to use?

@RegisBouchard
Copy link
Author

Thank you for the quick reply. yes sure :
In the Layer_for_testing:1 is the function3 used to run the code (importing numpy from the SciPy1x package)

image

image

@hunterwerlla
Copy link
Contributor

Thanks! based on the CFN docs, you should be using Code instead of CodeUri https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html . This should unblock you.

It seems like SAM build may be accepting both though, so we will investigate further and add support for both if SAM cli supports it.

@RegisBouchard
Copy link
Author

It works ! Thank you.

Now I have the following error but it is not related to this topic anymore :)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants