This project is going to make an endpoint to provide the data of COVID-19
The COVID-19 data is from WHO. However, WHO restricts its data by using CORS, then I tried to use the CORS Anywhere to bypass CORS. Unfortunately, I found that the CORS Anywhere is not very stable, and sometimes it could not be reached with latency issue. Therefore, I fetch the data periodically and then save it into S3, there is an endpoint hosted by me to bridge the data request to the saved data in S3.
As creat cert takes very long time, so, we should create the cert before everything
Besides, we have to create the cert in us-east-1
-
run
aws --region us-east-1 cloudformation create-stack --stack-name create-covid-19-data-cert --template-body file://deployment/create-cert.yml --tags Key=project,Value=covid-19
-
Go to AWS cert manager page and validate the cert (add CNAME record in Route53)
-
wait for the validation to be completed
-
capture the ARN in the cloudformation stack output
we could run the serverless deployment to deploy the infrastructure
-
run
serverless deploy --stage prod --param="certArn={cert arn captured from above}"