devopspipelinecirclecicircleci-workflows

circleci config.yml: 'Invalid template path template.yml'


I am working on a CI/CD project(Using circleci pipeline) and currently, I am stuck on getting my "create_infrastructure" job to work. Below is the job

    # AWS infrastructure
    create_infrastructure:
          docker:
              - image: amazon/aws-cli
          steps:
            - checkout
            - run:
                name: Ensure backend infrastructure exist
                command: |
                  aws cloudformation deploy \
                    --template-file template.yml \
                    --stack-name my-stack

When I run the job above, it returns Invalid template path template.yml


Solution

  • I actually misspelled the name of the template found in my GitHub repository. Everything worked well after I correct it. But I think this error was not explicit at all, I was expecting something like 'template not found in the path specified', instead of 'Invalid template path template.yml'