1. Docs
  2. Clouds
  3. AWS
  4. Get started
  5. Deploy stack

Pulumi & AWS: Deploy stack

    Let’s go ahead and deploy your stack:

    $ pulumi up
    

    This command evaluates your program and determines the resource updates to make. First, a preview is shown that outlines the changes that will be made when you run the update:

    Previewing update (dev):
    
         Type                 Name            Plan
     +   pulumi:pulumi:Stack  quickstart-dev  create
     +   └─ aws:s3:Bucket     my-bucket       create
    
    Resources:
        + 2 to create
    
    Do you want to perform this update?
    > yes
      no
      details
    

    Once the preview has finished, you are given three options to choose from. Choosing details will show you a rich diff of the changes to be made. Choosing yes will create your new S3 bucket in AWS. Choosing no will return you to the user prompt without performing the update operation.

    Do you want to perform this update? yes
    Updating (dev):
    
         Type                 Name            Status
     +   pulumi:pulumi:Stack  quickstart-dev  created (4s)
     +   └─ aws:s3:Bucket     my-bucket       created (2s)
    
    Outputs:
        bucketName: "my-bucket-58ce361"
    
    Resources:
        + 2 created
    
    Duration: 5s
    

    Remember the output you defined in the previous step? That stack output can be seen in the Outputs: section of your update. You can access your outputs from the CLI by running the pulumi stack output [property-name] command. For example you can print the name of your bucket with the following command:

    $ pulumi stack output bucketName
    
    $ pulumi stack output bucketName
    
    $ pulumi stack output bucket_name
    
    $ pulumi stack output bucketName
    
    $ pulumi stack output bucketName
    
    $ pulumi stack output bucketName
    
    $ pulumi stack output bucketName
    

    Running that command will print out the name of your bucket.

    The extra characters you see tacked onto the bucket name (-58ce361) are the result of auto-naming, a feature that lets you use the same resource names across multiple stacks without naming collisions. You can learn more about auto-naming in the Concepts docs.

    If you are using the Pulumi Cloud backend, you can follow the "View in Browser" link displayed in the CLI output. This will open the update in Pulumi Cloud, where you can view the output and explore detailed information about your stack such as its activity, resources, and configuration.

    A stack update with console output, as shown in the Pulumi Service

    Now that the bucket has been provisioned, let’s modify the program to host a static website.

      Pulumi AI - What cloud infrastructure would you like to build? Generate Program