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

Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen