---
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

## Deploying the App

To deploy your infrastructure, follow the below steps.

### 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)

### Steps

After cloning this repo, from this working directory, run these commands:

1. Create a new stack, which is an isolated deployment target for this example:

    ```bash
    pulumi stack init
    ```

2. Set the required configuration variables for this program:

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

3. Stand up the VM, which will also boot up your Python web server on port 80:

    ```bash
    pulumi up
    ```

4. 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
    ```

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

6. Afterward, destroy your stack and remove it:

    ```bash
    pulumi destroy --yes
    pulumi stack rm --yes
    ```
