I can's see the files I uploaded on AWS EC2 instance

239 Views Asked by At

I am new to AWS. My company asked me to deploy a CRUD API via docker on EC2. I cloned our codecommit repo into the ec2 instance and built the image. I was also able to navigate through the repository. However, today when I logged in to the ec2 instance, I couldn't find the repo I had cloned the day before, though the image I built still shows up when I execute "docker images". The docker container also runs without any problems. The only files I can see after "ls" are the ones created by AWS. Can someone help with this? Is it supposed to be like this? If not, how can I ensure this doesn't happen again? Thanks!

1

There are 1 best solutions below

0
On

after reading your question , it seems that you have lost your added repository . it can happen if:

You have Launched your Instance from Amazon AMI backed by Instance store volume and you have stopped your instance after that and started again.

Instance store volume data doesnt persist if you stop your instance .. to persist data you need to use EBS Volume