How to migrate resources created with the old copilot version
I am running an application and pipeline that I created with copilot-1.0.0. I need to upgrade the Node.js version of lambda from v10 to v12, how do I do that? I couldn't find any documentation on migration and found this issue #2235 , but I'm not using copilot deploy because I don't do manual operations.
copilot is a great tool and I want to use it in the future. It would be nice to have some documentation for migration.
Hi @rhoboro !
Sorry this is not well documented 🙇 We need to update your buildspec.yml so that you can migrate your Lambda runtimes to nodejsv12.
- Can you download the latest version of copilot
- Back up the old buildspec just in case
mv copilot/buildspec.yml copilot/buildspec.bkup.yml - Run
copilot pipeline initagain, this will only create a newbuildspec.ymlfile and skip updating thepipeline.ymlfile. - Delete the backup
rm copilot/buildspec.bkup.yml - Commit and push the changes:
git add copilot/buildspec.yml && git commit -m "update buildspec to v1.7.0" && git push
The pipeline should be able to now update your Lambda functions to Nodejsv12
@efekarakus Thank you for the quick reply. The steps you wrote worked well for me!! Thanks to you, I can continue to use copilot in the future 😄
I would appreciate it if you could document this procedure, or you can close this issue.
@efekarakus it seems these steps don't necessarily work on all the resources generated. In my case, the CertificateValidationFunction, CustomDomainFunction, and DNSDelegationFunction were not upgraded to the latest node version. All other functions were successfully upgraded.
Hello @h5aaimtron. Those custom resources are in the environment stack. Are you using pipeline for environment deployment? If not you can update Copilot CLI to the latest version and then do env deploy to deploy the environment again.
This issue is stale because it has been open 60 days with no response activity. Remove the stale label, add a comment, or this will be closed in 14 days.
This issue is closed due to inactivity. Feel free to reopen the issue if you have any further questions!