Change CodeBuild Image for AWS Lambda Applications

0

I created an AWS Lambda Application using the Nodejs template.

https://us-east-2.console.aws.amazon.com/lambda/home?region=us-east-2#/applications

This uses the following image for CodeBuild.

Image: aws/lambda/nodejs:10-1.0

I see this inside the serverlessrepo-APP_NAME-toolchain stack under the template tab

https://us-east-2.console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/template

Is there a way to change this image for the stack? I'd like to have java jdk with gradle installed in addition to nodejs. I'm am currently trying to do a workaround where I install java, gradle and set the environment variables during the install phase in the buildspec.yml, but that is a hacky workaround that will slow down the build pipeline. Can I modify the stack image after it's been created? I only saw an option to make a new stack that is a modification of a previous stack, but the previous stack is left unchanged.

Here's the buildspec.yml with the workaround. It's still failing to install java correctly so the build is failing, but I think this is the wrong approach anyway. I should be updating the build image so it's ready to go.

https://github.com/bennebbenneb/sample-app/blob/master/buildspec.yml#L4

沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南