Running rasa core on aws ec2 instance forever

I run my file with the command line

" python -m rasa_core_sdk.endpoint --actions actions", my action server gets running

and i run my chatbot with the command line

" python -m
-d /home/ubuntu/chatbot/models/dial_emb
-u /home/ubuntu/chatbot/models/nlu/default/chatbot_nlu
–endpoints endpoints.yml -o out.log "

With both of these command lines i start running my chatbot. in ec2 instance. but when i close the instance from my terminal, also the rasa gets shutdown, but i want it to run forever, so i tried using

" forever start -c " and the remaining commands but it didn’t worked out ?

Can anyone help me out how to run both of these permenantly,

my rasa_nlu version is 0.13.8 rasa_core version is 0.12.3

and iam trying to deploy it in aws ec2 instance

Thanks in advance