Server mode

Moto has a stand-alone server mode. This allows you to utilize the backend structure of Moto even if you don’t use Python.

It uses flask, which isn’t a default dependency. You can install the server ‘extra’ package with:

pip install moto[server]

You can then start it running a service:

$ moto_server ec2

You can also pass the port:

$ moto_server ec2 -p3000
 * Running on

If you want to be able to use the server externally you can pass an IP address to bind to as a hostname or allow any of your external interfaces with

$ moto_server ec2 -H
 * Running on

Please be aware this might allow other network users to access your server.

Then go to localhost to see a list of running instances (it will be empty since you haven’t added any yet).

If you want to use boto3 with this, you can pass an endpoint_url to the resource


Other languages

You don’t need to use Python to use Moto; it can be used with any language. Here are some examples to run it with other languages: