Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I'm trying to build a Lambda application using AWS SAM CLI command:

sam build --template C:/MyProject/template.yaml --build-dir C:/MyProject/.aws-sam/build

but I'm getting this error:

Build Failed

Error: 'java8' runtime is not supported

This is my template.yaml:

AWSTemplateFormatVersion: '2010-09-09'

Transform: AWS::Serverless-2016-10-31

Description: >

  AWS Serverless Application

  Sample SAM Template for AWS Serverless Application



      Timeout: 20



      Type: AWS::Serverless::Function


          CodeUri: target/HelloWorld-1.0.jar

          Handler: helloworld.App::handleRequest

          Runtime: java8



                  PARAM1: VALUE



                  Type: Api


                      Path: /hello

                      Method: get

It's an example project made in Intellij using AWS Toolkit plugin, I have installed SAM CLI version 0.9.0 and jdk1.8.0_191 (I've tried different versions but it didn't work), at the project's GitHub I can see that java 8 is supported:

[ ] Supported AWS Lambda Runtimes

    [x] java8

Why am I getting this error?

1 Answer

0 votes
by (44.4k points)

Check out this Github issue for more information -

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories