IoT Device Simulator
IoT Device Simulator

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Automated Deployment

Before you launch the automated deployment, please review the architecture, configuration, and other considerations discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy the IoT Device Simulator into your account.

Time to deploy: Approximately 10 minutes


Before you use this solution, you must have an existing service-linked role for Amazon ECS. If you have not already created one, see Creating a Service-Linked Role for Amazon ECS in the Amazon ECS Developer Guide.

What We'll Cover

The procedure for deploying this architecture on AWS consists of the following steps. For detailed instructions, follow the links for each step.

Step 1. Launch the Stack

  • Launch the AWS CloudFormation template into your AWS account

  • Enter values for required parameters: Stack Name, Administrator Name and Administrator Email

Step 2. Define Your Device Types

  • Define the data your simulated IoT devices will send

Step 3. Create a Pool of Widgets

  • Create a pool of simulated IoT devices

Step 4. Test Your IoT Backend Service

  • Subscribe to the applicable IoT topic and view data

Step 1. Launch the Stack

This automated AWS CloudFormation template deploys the device simulator.


You are responsible for the cost of the AWS services used while running this solution. See the Cost section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.

  1. Sign in to the AWS Management Console and click the button below to launch the iot-device-simulator AWS CloudFormation template.

                                Iot Device Simulator launch button

    You can also download the template as a starting point for your own implementation.

  2. The template is launched in the US East (N. Virginia) Region by default. To launch this solution in a different AWS Region, use the region selector in the console navigation bar.


    This solution uses the AWS Fargate service, which is currently available in specific AWS Regions only. Therefore, you must launch this solution a region where AWS Fargate is available. For the most current service availability by region, see AWS service offerings by region.

  3. On the Select Template page, verify that you selected the correct template and choose Next.

  4. On the Specify Details page, assign a name to your solution stack.

  5. Under Parameters, review the parameters for the template, and modify them as necessary.This solution uses the following default values.

    Parameter Default Description
    Administrator Name <Requires input>

    The user name for the initial solution administrator. After the solution is deployed, this administrator can create and manage other users, including additional administrators.

    Administrator Email <Requires input>

    Email address of the administrator user. After launch, an email will be sent to this address with console login instructions.

  6. Choose Next.

  7. On the Options page, choose Next.

  8. On the Review page, review and confirm the settings. Be sure to check the box acknowledging that the template will create AWS Identity and Access Management (IAM) resources.

  9. Choose Create to deploy the stack.

    You can view the status of the stack in the AWS CloudFormation console in the Status column. You should see a status of CREATE_COMPLETE in approximately 10 minutes.

    The solution sends an email invitation to join the Iot Device Simulator console.

  10. In the email, follow the instructions to sign in to the console.


In addition to the AWS Lambda functions that make up the device simulator microservices, this solution includes the iot-device-sim-helper Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When running this solution, the iot-device-sim-helper function is inactive. However, do not delete the iot-device-sim-helper function as it is necessary to manage associated resources.

Step 2. Define Your Device Types

Use this procedure to define the data each of your simulated IoT devices will send. Create the structure of the data and the specific properties and type for each item in the payload.

  1. Sign in to the IoT Device Simulator console and in the navigation pane, choose Device Types.

  2. Select + Add Device Types.

  3. On the Device Type Definition page, enter the appropriate information. For more information, see Device Types. Note the value you entered for the Data topic attribute.

  4. To format the payload, select Add Attribute.

  5. In the Message Attribute window, enter the appropriate information. For more information, see Attributes.

  6. Select Submit.

  7. Repeat steps 4-6 for each attribute for your device payload.

  8. Select Save.

Step 3. Create a Pool of Widgets

Use this procedure to define the number of simulated IoT devices (widgets) you will launch.

  1. On the IoT Device Simulator console page, in the navigation menu, select Widgets.

  2. Select + Add Widgets.

  3. In the Create a widget window, specify a device type and the number of widgets you want to launch. You can create up to 100 widgets at a time.

  4. Select Submit.

  5. To view a specific device, select View for the specific widget. This shows metadata about the widget and the messages being received by AWS IoT during the simulation.

Step 4. Test Your IoT Backend Service

Use this procedure to test your IoT backend service.

  1. Sign in to the AWS IoT console and in the left navigation pane, choose Test.

  2. Subscribe to the applicable topic. You can find the topic in the Data topic attribute in your device type definition.

  3. View the simulated data flowing into the AWS IoT Core service in your account.