---
title: Create project
url: /docs/iac/get-started/aws/create-project/
---
## Create a new project

A [**project**](/docs/iac/concepts/projects) is a program in your chosen language that defines a collection of related
cloud resources. In this step, you will create a new project.

### Initializing your project

Each project lives in its own directory. Create a new one:

<!-- chooser: os -->
<!-- option: linux -->

```bash
$ mkdir pulumi-start-aws
```

<!-- /option -->

<!-- option: windows -->

```powershell
> mkdir pulumi-start-aws
```

<!-- /option -->
<!-- /chooser -->

Change into the new directory:

<!-- chooser: os -->
<!-- option: linux -->

```bash
$ cd pulumi-start-aws
```

<!-- /option -->

<!-- option: windows -->

```powershell
> cd pulumi-start-aws
```

<!-- /option -->
<!-- /chooser -->

Now initialize a new Pulumi project for AWS using the `pulumi new` command:

<!-- chooser: language -->
<!-- option: typescript -->

<!-- chooser: os -->
<!-- option: linux -->
```bash
$ pulumi new aws-typescript

```

<!-- /option -->

<!-- option: windows -->
```powershell
> pulumi new aws-typescript

```

<!-- /option -->
<!-- /chooser -->

<!-- /option -->

<!-- option: python -->

<!-- chooser: os -->
<!-- option: linux -->
```bash
$ pulumi new aws-python

```

<!-- /option -->

<!-- option: windows -->
```powershell
> pulumi new aws-python

```

<!-- /option -->
<!-- /chooser -->

<!-- /option -->

<!-- option: go -->

<!-- chooser: os -->
<!-- option: linux -->
```bash
$ pulumi new aws-go

```

<!-- /option -->

<!-- option: windows -->
```powershell
> pulumi new aws-go

```

<!-- /option -->
<!-- /chooser -->

<!-- /option -->

<!-- option: csharp -->

<!-- chooser: os -->
<!-- option: linux -->
```bash
$ pulumi new aws-csharp

```

<!-- /option -->

<!-- option: windows -->
```powershell
> pulumi new aws-csharp

```

<!-- /option -->
<!-- /chooser -->

<!-- /option -->

<!-- option: java -->

<!-- chooser: os -->
<!-- option: linux -->
```bash
$ pulumi new aws-java

```

<!-- /option -->

<!-- option: windows -->
```powershell
> pulumi new aws-java

```

<!-- /option -->
<!-- /chooser -->

<!-- /option -->

<!-- option: yaml -->

<!-- chooser: os -->
<!-- option: linux -->
```bash
$ pulumi new aws-yaml

```

<!-- /option -->

<!-- option: windows -->
```powershell
> pulumi new aws-yaml

```

<!-- /option -->
<!-- /chooser -->

<!-- /option -->
<!-- /chooser -->

The `pulumi new` command interactively walks through initializing a new project, as well as creating a
[**stack**](/docs/iac/concepts/stacks) and [**configuring**](/docs/iac/concepts/config) it. A stack is an instance of your
project and you may have many of them -- like `dev`, `staging`, and `prod` -- each with different configuration settings.

You will be prompted for configuration values such as an AWS region. You can hit ENTER to accept the default of `us-east-1`,
or can type in another value such as `us-west-2`:

```
The AWS region to deploy into (aws:region) (us-east-1): us-west-2
```

> **Note:** If this is your first time running Pulumi, you will be prompted to log into Pulumi Cloud. This is a free but optional service that makes IaC easy by safely and securely managing state for you. [This guide](/docs/iac/guides/basics/pulumi-cloud-vs-oss/) explains what Pulumi Cloud is and [this topic](/docs/iac/concepts/state-and-backends) describes alternative Pulumi backend options.

<!-- chooser: language -->
<!-- option: typescript -->

After some dependency installations from `npm`, the project and stack will be ready.

<!-- /option -->

<!-- option: python -->

After the command completes, the project and stack will be ready.

<!-- /option -->

<!-- option: go -->

After the command completes, the project and stack will be ready.

<!-- /option -->

<!-- option: csharp -->

After the command completes, the project and stack will be ready.

<!-- /option -->
<!-- /chooser -->

### Review your new project's contents

If you list the contents of your directory, you'll see some key files:

<!-- chooser: language -->
<!-- option: java -->

- `src/main/java/myproject` is the project's Java package root

<!-- /option -->

<!-- option: typescript -->

- <!-- chooser: language -->
<!-- option: javascript -->
`index.js`
<!-- /option -->
<!-- option: typescript -->
`index.ts`
<!-- /option -->
<!-- option: python -->
`__main__.py`
<!-- /option -->
<!-- option: go -->
`main.go`
<!-- /option -->
<!-- option: csharp -->
`Program.cs`
<!-- /option -->
<!-- option: fsharp -->
`Program.fs`
<!-- /option -->
<!-- option: visualbasic -->
`Program.vb`
<!-- /option -->
<!-- option: java -->
`App.java`
<!-- /option -->
<!-- option: yaml -->
`Pulumi.yaml`
<!-- /option -->
<!-- /chooser -->
 contains your project's main code that declares a new S3 bucket

- `Pulumi.yaml` is a [project file](/docs/iac/concepts/projects/project-file) containing metadata about your project like its name

<!-- /option -->

<!-- option: yaml -->

- `Pulumi.yaml` is a [project file](/docs/iac/concepts/projects/project-file) containing metadata about your project, like its name, as well as declaring your project's resources

<!-- /option -->
<!-- /chooser -->

- `Pulumi.dev.yaml` contains configuration values for the stack you just initialized

Now examine the code in <!-- chooser: language -->
<!-- option: javascript -->
`index.js`
<!-- /option -->
<!-- option: typescript -->
`index.ts`
<!-- /option -->
<!-- option: python -->
`__main__.py`
<!-- /option -->
<!-- option: go -->
`main.go`
<!-- /option -->
<!-- option: csharp -->
`Program.cs`
<!-- /option -->
<!-- option: fsharp -->
`Program.fs`
<!-- /option -->
<!-- option: visualbasic -->
`Program.vb`
<!-- /option -->
<!-- option: java -->
`App.java`
<!-- /option -->
<!-- option: yaml -->
`Pulumi.yaml`
<!-- /option -->
<!-- /chooser -->
:

<!-- chooser: language -->
<!-- option: typescript -->

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket("my-bucket");

// Export the name of the bucket
export const bucketName = bucket.id;
```

<!-- /option -->

<!-- option: python -->

```python
import pulumi
from pulumi_aws import s3

# Create an AWS resource (S3 Bucket)
bucket = s3.Bucket('my-bucket')

# Export the name of the bucket
pulumi.export('bucket_name', bucket.id)
```

<!-- /option -->

<!-- option: go -->

```go
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        // Create an AWS resource (S3 Bucket)
        bucket, err := s3.NewBucket(ctx, "my-bucket", nil)
        if err != nil {
            return err
        }

        // Export the name of the bucket
        ctx.Export("bucketName", bucket.ID())
        return nil
	  })
}
```

<!-- /option -->

<!-- option: csharp -->

```csharp
using Pulumi;
using Pulumi.Aws.S3;
using System.Collections.Generic;

return await Pulumi.Deployment.RunAsync(() =>
{
   // Create an AWS resource (S3 Bucket)
   var bucket = new Bucket("my-bucket");

   // Export the name of the bucket
   return new Dictionary<string, object?>
   {
      ["bucketName"] = bucket.Id
   };
});
```

<!-- /option -->

<!-- option: java -->

```java
package myproject;

import com.pulumi.Pulumi;
import com.pulumi.aws.s3.Bucket;

public class App {
    public static void main(String[] args) {
        Pulumi.run(ctx -> {
            // Create an AWS resource (S3 Bucket)
            var bucket = new Bucket("my-bucket");

            // Export the name of the bucket
            ctx.export("bucketName", bucket.bucket());
        });
    }
}
```

<!-- /option -->

<!-- option: yaml -->

```yaml
name: quickstart
runtime: yaml
description: A minimal AWS Pulumi YAML program

resources:
  # Create an AWS resource (S3 Bucket)
  my-bucket:
    type: aws:s3:Bucket

outputs:
  # Export the name of the bucket
  bucketName: ${my-bucket.id}
```

<!-- /option -->
<!-- /chooser -->

The program declares an AWS S3 [Bucket](/registry/packages/aws/api-docs/s3/bucket/)
[resource](/docs/iac/concepts/resources) and exports its ID as a [stack output](/docs/iac/concepts/stacks/#outputs).
Resources are just objects in our language of choice with [properties](/docs/iac/concepts/inputs-outputs) capturing
their inputs and outputs. Exporting the bucket's ID makes it convenient to use afterwards.

Now you're ready for your first deployment!

---
[← Previous step](/docs/iac/get-started/aws/configure/)
[Next: Deploy to AWS →](/docs/iac/get-started/aws/deploy-stack/)


