Run and debug Java AWS Lambda locally using SAM CLI commands and Docker in IntelliJ Idea

preview_player
Показать описание
Quick Note: When you send a request via postman in JSON format, the JSON format will be converted to a stringify format by API gateway(in case of lambda proxy integration) and that will be passed on to lambda.

Disclaimer: USE EARPHONES/HEADPHONES FOR HIGH VOLUME!

Other Videos:

Download Links:

Contact details:
(+91) - 8056232494

#aws #serverless #lambda #samlocal #docker #java #cloud
Рекомендации по теме
Комментарии
Автор

very informative. thanks brother ✅️✅️🙏

Userabj
Автор

Very well explained! Keep up the good work

hmahant
Автор

Do we need to manually create the SAM template or any tool which can help in generating based on the CDK stack we build using code ?

I came to know that we can download the particular Lambda function as SAM template in AWS console using the below option

Land into AWS Lambda console and "Actions" dropdown > "Export Function" > "Download AWS SAM file"

I could not find any option to export the whole stack . I will appreciate if you could help me on this

SURA
Автор

Hi, I am trying the exact same procedure but I am facing "FileNotFoundError: [Errno 2] No such file or directory: 'event.json'". Can anyone help?

monikavaid
Автор

Hi, Thanks for sharing, very well explained
I followed each and every step, but while running from postman I am getting 500 Internal Server Error :

END RequestId:
REPORT RequestId: Init Duration: 0.17 ms Duration: 4254.92 ms Billed Duration: 4300 ms Memory Size: 512 MB Max Memory Used: 512 MB
Lambda returned empty body!
No Content-Type given. Defaulting to 'application/json'.

Before calling Service().getResponse(input)
in LambdaHandler
I printed input.getBody(), its coming null

Any help, would be much appreciated.
thanks

smahuja
Автор

Hi Sarang,
Thanks for such an informative video, taht what exactly i was looking for as i am learning Serverless Lambda's .
Following the video, but having the below error when i run "sam local invoke LambdaFunction -t template.yaml -e event.json"

Error loading class lambda.Handler:

at Method)
at
Caused by:
at
at
at
... 2 more

Below are the dependencies i am using in my gradle project
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.2.1'
//compile group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.11.28'
compile group: 'com.google.code.gson', name: 'gson', version: '2.3.1'
implementation
implementation
compile group: 'com.amazonaws', name: 'aws-java-sdk-sqs', version: '1.11.891'
}
Could you help ?

abhisheksinghal