Note that only students coming from red-zone countries can register to French Social Security prior to their arrival in France. See Campus France tutorial in attachment.
Upon arrival in France registration is mandatory and will entitle you to reimbursement of part of your health care expenses.
To be affiliated to the French Social Security Health scheme, you will need to sign up via the dedicated website etudiant-etranger.ameli.fr.
You will have to complete the 3-step registration process:
1/ Enter your personal information,
2/ Upload the required documents,
3/ Create your "Personal area".
Once the documents you submitted upon registration online have been checked (within 2 to 3 weeks), you will receive an email stating that your attestation of affiliation (with your temporary social security number) can be downloaded from your "Personal area".
If some of your documents are missing or have been rejected, you will receive an email stating which documents to upload on your "Personal area".
Once your registration has been completed and approved (it may take months), you will be informed that your attestation of rights to the Health Insurance (with your permanent French Social Security number) can be downloaded from your "Personal area" and that your file has been transferred to your local CPAM.
After this step you will be able to create your ameli account.