- Newest
- Most votes
- Most comments
I apologize, but I'm afraid I have some bad news regarding your situation, Neil. Based on the information provided in the AWS Amplify documentation, there isn't a direct way to download the source code of a website hosted on Amplify if you didn't use a source control system like GitHub when you initially uploaded it.
AWS Amplify is designed to work with continuous deployment from source code repositories. When you set up an Amplify app, it's typically connected to a Git repository (such as GitHub, BitBucket, GitLab, or AWS CodeCommit) which contains your source code. The service then builds and deploys your app from this repository.
If you uploaded your code directly without using a Git repository, Amplify doesn't maintain a separate, downloadable copy of your source code. The service is focused on building and hosting your app, not storing the source code in a way that can be retrieved later.
For future projects, I strongly recommend using a Git repository when working with Amplify. This not only provides version control but also allows you to easily retrieve your code if needed.
In your current situation, unfortunately, if you've lost your local copy and didn't use a source control system, there may not be a way to recover the original source code. You might need to recreate the website from scratch or try to recreate it by inspecting the live site's HTML, CSS, and JavaScript (though this would be a tedious process and might not capture all the original code, especially server-side logic).
To avoid this situation in the future, always keep local backups of your code and consider using version control systems like Git, even for small projects. These practices can save you from potential data loss scenarios like this one.
Sources
AWS Amplify FAQs | Front-End Web & Mobile | Amazon Web Services
AWS Amplify Resources - Amazon Web Services
answered 2 years ago
