---
title: "Instance using Alicloud ECS"
description: "Basic example of an ecs instance"
url: "https://www.pulumi.com/dev/examples/alicloud-ts-ecs/"
image: "https://www.pulumi.com/assets/og/dev/examples/alicloud-ts-ecs.png"
---

# Instance using Alicloud ECS

Basic example of an ecs instance

- Source on GitHub: https://github.com/pulumi/examples/tree/master/alicloud-ts-ecs
- Deploy with Pulumi: https://app.pulumi.com/new?template=https%3A%2F%2Fgithub.com%2Fpulumi%2Fexamples%2Ftree%2Fmaster%2Falicloud-ts-ecs

## Get started with this example

This example lives in the [pulumi/examples](https://github.com/pulumi/examples/tree/master/alicloud-ts-ecs) repo. Pull down just this directory to follow along:

```bash
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set alicloud-ts-ecs
cd pulumi-examples/alicloud-ts-ecs
```

This example deploys a simple Alicloud ECS instance.

## Prerequisites

1. [Install Pulumi](https://www.pulumi.com/docs/get-started/install/)
2. [Configure Alicloud credentials](https://www.pulumi.com/registry/packages/alicloud/installation-configuration/#configuring-credentials)
3. [Install Node.js](https://www.pulumi.com/docs/intro/languages/javascript/)

## Deploying the example

1.  Create a new stack:

    ```bash
    pulumi stack init
    ```

1.  Set the Alicloud region to deploy into:

    ```bash
    pulumi config set alicloud:region us-east-1
    ```

1.  Install dependencies:

    ```bash
    npm install
    ```

1.  Deploy the stack, which will also boot up your Python web server on port 80:

    ```bash
    pulumi up
    ```

1.  After a couple of minutes, your VM will be ready, and one stack output is printed:

    ```bash
    pulumi stack output
    ```

    ```
    Current stack outputs (1):
    OUTPUT    VALUE
    publicIp  47.90.136.113
    ```

From there, feel free to experiment. Simply making edits and running `pulumi up` will incrementally update your VM.

## Cleaning up

Once you're finished experimenting, you can destroy your stack and remove it to avoid incurring any additional cost:

```bash
pulumi destroy
pulumi stack rm
```
