-
Notifications
You must be signed in to change notification settings - Fork 222
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
Lambda function in Gradle Project failed to Running locally #857
Comments
Can you please attach the contents of the temp file |
@K1-Style It seems the root cause is because you checked Create separate module per source set option when import the Gradle project. Try again without checking that option should fix the problem. |
@zhangzhx @abrooksv
Resources:
Function:
Type: AWS::Serverless::Function
Properties:
Handler: helloworld.App
CodeUri: /Users/nomura.keichi/project/serverless/test/HelloWorldFunction/src/main
Runtime: java8
Timeout: 900 |
Okay, I understand what is wrong. You can also invoke a Lambda function through the existing template.yaml (That SAM generated in your project root). That should not suffer from the same incorrect CodeUri issue |
@abrooksv Thank you for your answer.
Build Output details is below.
|
Thanks, it also works. |
This fix has been released in stable version 1.3. Feel free to reopen if you still see any issues. |
Thanks! I'm grateful to your support. |
Describe the bug
Running Lambda function in Gradle Project fails with "SAM build command failed"
To reproduce
build.gradle
and right clickImport Gradle Project
App.java
and click Lambda icon on the left of the class definition.Run '[Local] App'
Run
, but it fails with "SAM build command failed"Build Output details is below.
Expected behavior
The expected behavior is same as "Running a function locally" on AWS Toolkit for IntelliJ – Now generally available | AWS Developer Blog
Screenshots
Your Environment
Build #IU-183.5429.30, built on January 29, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Additional context
The text was updated successfully, but these errors were encountered: