com.amazonaws.AmazonClientException: Unable to marshall request to JSON: Java heap space


Solutions on the web1

Solution icon of github
Unable to marshall request to JSON: Java heap space

Stack trace

com.amazonaws.AmazonClientException: Unable to marshall request to JSON: Java heap space
	at com.amazonaws.services.lambda.model.transform.CreateFunctionRequestMarshaller.marshall(CreateFunctionRequestMarshaller.java:191)
	at com.amazonaws.services.lambda.AWSLambdaClient.createFunction(AWSLambdaClient.java:703)
	at com.xti.jenkins.plugin.awslambda.service.LambdaDeployService.createLambdaFunction(LambdaDeployService.java:171)
	at com.xti.jenkins.plugin.awslambda.service.LambdaDeployService.deployLambda(LambdaDeployService.java:83)
	at com.xti.jenkins.plugin.awslambda.upload.LambdaUploader.upload(LambdaUploader.java:51)
	at com.xti.jenkins.plugin.awslambda.callable.DeployCallable.call(DeployCallable.java:46)
	at com.xti.jenkins.plugin.awslambda.callable.DeployCallable.call(DeployCallable.java:23)
	at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
	at com.xti.jenkins.plugin.awslambda.upload.LambdaUploadPublisher.perform(LambdaUploadPublisher.java:93)
	at com.xti.jenkins.plugin.awslambda.upload.LambdaUploadPublisher.perform(LambdaUploadPublisher.java:69)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
	at hudson.model.Run.execute(Run.java:1766)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at javax.xml.bind.DatatypeConverterImpl._printBase64Binary(Unknown Source)
	at javax.xml.bind.DatatypeConverterImpl._printBase64Binary(Unknown Source)
	at javax.xml.bind.DatatypeConverterImpl.printBase64Binary(Unknown Source)
	at javax.xml.bind.DatatypeConverter.printBase64Binary(Unknown Source)
	at com.amazonaws.util.Base64.encodeAsString(Base64.java:39)
	at com.amazonaws.util.BinaryUtils.toBase64(BinaryUtils.java:59)
	at com.amazonaws.util.json.JSONWriter.value(JSONWriter.java:347)
	at com.amazonaws.services.lambda.model.transform.CreateFunctionRequestMarshaller.marshall(CreateFunctionRequestMarshaller.java:122)
	... 18 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.