Search code examples
amazon-web-servicesamazon-s3aws-code-deployaws-codebuild

Unable to specify buildsec.yml path in codebuild


S3 is my source for codebuild, i am passing zip file. buildspec.yml is inside zip file, how do i pass the path for codebuild in buildspec configuration.


Solution

  • As per AWS docs, your buildspec.yml must be in the root of your project. The docs do not mention it explicitly, but this means that the buildspec.yml must be in the root of your project inside the S3 artifact. When CodeBuild gets your artifact from S3 it will use the buildspec.yml in the root of the files inside the zip artifact.

    You can read more about creating your buildspec.yml here: https://docs.aws.amazon.com/codebuild/latest/userguide/getting-started.html#getting-started-create-build-spec