Skip to content

How do I download source-code of website hosted on Amplify?

0

I hosted a website on a free hosting plan with the Amplify service. The website is currently live and I can go to it in my web browser, but for the life of me, I cannot find it on my AWS account.

I would like to download the source code so I can edit it and upload it again as I have lost the backups. I did upload the source code without github (something which I now regret)

Any help would be appreciated.

-Neil

asked 2 years ago816 views

1 Answer
1

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

EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.