Search code examples
amazon-web-servicesaws-copilotaws-copilot-cli

aws copilot-cli deploy using previously created manifest.yml


I initialized aws copilot application, so it created a copilot folder and inside that it created service details with manifest.yml file. And created my AWS infrastructure for me. After that I delete that infra using copilot app delete.

Now I want to deploy this without going to initialization process of copilot. How is that possible?


Solution

  • The solution which worked for me is:

    You run copilot app init to initialize an application as you did previously. Then, run copilot svc init. When asked for the service's name, put the same name as you have before - this information can be found in manifest's name field.

    Copilot will check if the copilot/<service>/manifest.yml already exists, and won't overwrite it if it has. As a result, your previous configurations in the manifest will stay.

    Next time when you run copilot svc deploy, Copilot will deploy the service using configurations in the manifest. Since it's the same manifest as before, the configuration will be the the same.