Search code examples
amazon-web-servicesparse-platformamazon-elastic-beanstalkparse-cloud-codeparse-server

How could i deploy my Cloud Code to AWS Elastic Beanstalk? (Parse Server)


I am struggling about how to upload my Cloud Code files that i had on Parse.com to my Parse Server hosted on AWS EB.

So far i have:

  • Parse Server hosted on AWS EB. To host it on AWS i used the Orange Deploy Button which basically makes all stuff easier for people without having to install the Parse Server locally and upload it later to AWS.
  • iOS App written in objective C connected to the Parse server and working perfectly
  • Parse Dashboard locally on my mac connected to the Parse Server on AWS

The only thing that i would need is to upload all my cloud code files to the Parse Server. How could i do this? I have researched a lot over Google, stackoverflow, etc without success. There is some information but its unclear. Thanks in advance.


Solution

  • Finally and thanks to Ran Hassid i now have a Fully functional Parse Server on AWS with Cloud Code. For those who are in the same situation where i was, here is the answer to my question:

    1. Go to this link here and follow all the steps (By the time i asked the question, the information provided by this link of AWS wasn't that clear as it is now. They improved the explanations and the info.)

    2. After you finish all the previous steps from the link. You would have a Parse Server on AWS working.

    3. Now the part of CLOUD CODE. Just create a folder in your MAC or PC wherever you like. Let's say on the desktop and called it Parse Server AWS (You can call it whatever you want)

    4. Install the EB CLI which is the Command line interface to user Terminal (On Mac) or the equivalent on windows to work with the parse server you just set up on AWS (Similar to CloudCode with Parse CLI). The easy way to install it is running this command:

      brew install awsebcli
      
    5. Now open terminal on mac (or the equivalent on windows) and go to the folder that you just created on the step 3.

    6. Run the next command. It will ask you to select the location of your parse server, and then the name.

      eb init
      
    7. Now this command. It will download all the files from AWS of your parse server to this folder you are in.

      eb labs download
      
    8. Finally, you will have a folder called Cloud where you can put all your cloud code files in.

    9. When you finish just run the command:

      eb deploy
      

    Now you have your parse server with all your cloud code files working on AWS. Now any change you need to make to your cloudCode files, just change the local files inside this folder just created on step 3 and run again the command from the step 9. Just exactly as you used to do with Parse Deploy command

    Hopefully this information will help many people as it helped to me.

    Have a happy coding!