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

Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas