How to test a Mule project in AWS

By | September 2, 2015

So you finally have Mule ESB installed in AWS EC2. How do you test and verify it? What you can do is upload a project and try it out.


  • Upload a sample project via scp to AWS.
  • Modify the security rules in AWS
  • Test helloworld application

First, you should know how to deploy apps to Mule. Basically from Anypoint Studio, do a File > Export


Step 1: Upload Mule project

You can upload your own project or download this sample project helloworld.

Run this command:
sudo scp -i /path/to/cert path/to/file

eg sudo scp -i muledemo.pem

This does a secure copy transfer of the project file to the Ubuntu server in AWS.

This will upload the project to the apps folder. You should then see:


Now, if you were to run this within Anypoint Studio, the URL would be http://localhost:8081/hi?name=superman

There are 2 options from here. You can send a GET request to Mule internally using this command:

Step 2a: Test the application via the Internal AWS IP.

>> curl -X GET (replace IP with your internal IP)

Step 2b: Test the application in your browser

Grab a public Elastic IP (
Click ElasticIP > Allocate New Address (there maybe costs associated here).

Then Actions > Associate IP and select your instance.

Next, you want to open up the security rules (just for testing purposes and NOT for production) to ALL.


Once you have done this, you can then use your own browser and enter:


Leave a Reply

Your email address will not be published. Required fields are marked *