aws elastic beanstalk cli and buildspec.yml (codebuild): error with eb_codebuild_settings

Viewed 12

Im trying to reuse this repo https://github.com/noahgift/Flask-Elastic-Beanstalk

It works fine when i dont use the buildspec.yml.

But if I try to do so, (to add extra commands to the build process with beanstalk) i get the follwing error when i run eb init:

WARNING: Beanstalk configuration header 'eb_codebuild_settings' is missing from Buildspec file; will not use Beanstalk Code Build integration
Cannot setup CodeCommit because there is no Source Control setup, continuing with initialization

So tried to follow https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli-codebuild.html instructions.

I added the following lines to my buildspec.yml :

eb_codebuild_settings:
  CodeBuildServiceRole: arn_of_my_role
  ComputeType:  BUILD_GENERAL1_MEDIUM
  #Image: image #optionnal
  #Timeout: minutes #optionnal

I struggle with the image part: the cli is asking for an image but beanstalk is supposed to build the image so i cant define it prior to the the eb init and eb create

Does someone managed to use buildspec with eb cli ?

Thanks

0 Answers
Related