

# Where you can use Infrastructure Composer
<a name="using-composer"></a>

You can use Infrastructure Composer from its console, from AWS Toolkit for Visual Studio Code, and in Infrastructure Composer in CloudFormation console mode. While each varies for slightly different use cases, overall they are similar experiences. This section provides details of each experience.

The topic [Using the AWS Infrastructure Composer console](using-composer-console.md) is a comprehensive overview of the default console experience. The topic [CloudFormation console mode](using-composer-console-cfn-mode.md) provides details on a version of Infrastructure Composer that is integrated with the CloudFormation stack workflow. [AWS Toolkit for Visual Studio Code](using-composer-ide.md) provides information on accessing and using Infrastructure Composer in VS Code.

**Topics**
+ [

# Using the AWS Infrastructure Composer console
](using-composer-console.md)
+ [

# Using Infrastructure Composer in CloudFormation console mode
](using-composer-console-cfn-mode.md)
+ [

# Using Infrastructure Composer from the AWS Toolkit for Visual Studio Code
](using-composer-ide.md)

# Using the AWS Infrastructure Composer console
<a name="using-composer-console"></a>

This section provides details on accessing and using AWS Infrastructure Composer from the Infrastructure Composer console. This is the default experience for Infrastructure Composer and is a good way to become familiar with Infrastructure Composer. You can also integrate the Infrastructure Composer console with your local IDE. For details, see [Connect the Infrastructure Composer console with your local IDE](other-services-ide.md).

You can also [access Infrastructure Composer from the AWS Toolkit in VS Code](using-composer-ide.md), and you can use a [mode of Infrastructure Composer that is specifically designed to be used in CloudFormation](using-composer-console-cfn-mode.md).

For general documentation on using Infrastructure Composer, see [How to compose](using-composer-basics.md).

**Topics**
+ [

# AWS Infrastructure Composer console visual overview
](reference-visual.md)
+ [

# Manage your project from the Infrastructure Composer console
](using-composer-project.md)
+ [

# Connect the Infrastructure Composer console with your local IDE
](other-services-ide.md)
+ [

# Allow web page access to local files in Infrastructure Composer
](reference-fsa.md)
+ [

# Locally sync and save your project in the Infrastructure Composer console
](using-composer-project-local-sync.md)
+ [

# Import functions into Infrastructure Composer from the Lambda console
](other-services-lambda.md)
+ [

# Export an image of Infrastructure Composer's visual canvas
](reference-features-export.md)

# AWS Infrastructure Composer console visual overview
<a name="reference-visual"></a>

This section provides a visual overview of the AWS Infrastructure Composer console.

**Topics**
+ [

## Home page
](#reference-visual-home)
+ [

## Visual designer and visual canvas
](#reference-visual-designer)

## Home page
<a name="reference-visual-home"></a>

The following image is of the home page in the Infrastructure Composer console:

![\[The Infrastructure Composer home page.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_ref_01.png)


1. **Documentation** – Go to Infrastructure Composer documentation.

1. **Canvas** – Go to the canvas and create or load a project.

1. **Demo** – Open the Infrastructure Composer demo application.

1. **Create project** – Create or load a project.

1. **Start building** – Quick links to start building an application.

1. **Feedback** – Go here to submit feedback.

## Visual designer and visual canvas
<a name="reference-visual-designer"></a>

The following image is of Infrastructure Composer's visual designer and visual canvas:

![\[Infrastructure Composer's visual designer and visual canvas.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_ref_02.png)


1. **Resource palette** – Displays cards that you can design with.

1. **Resource search bar** – Search for cards that you can add to the canvas.

1. **List** – Displays a tree view of your application resources.

1. **Home** – Select here to go to the Infrastructure Composer homepage.

1. **Save status** – Indicates whether Infrastructure Composer changes are saved to your local machine. States include:
   + **Autosave** – **Local sync** is activated and your project is being automatically synced and saved.
   + **Changes saved** – Your application template is saved to your local machine.
   + **Unsaved changes** – Your application template has changes that are not saved to your local machine.

1. **Resources** – Displays the resource palette.

1. **Canvas** – Displays the canvas view of your application in the main view area.

1. **Template** – Displays the template view of your application in the main view area.

1. **Arrange** – Arranges your application architecture in the canvas.

1. **Undo and redo** – Perform **undo** and **redo** actions when supported.

1. **Template name** – Indicates the name of the template you are designing.

1. **Main view area** – Displays either the canvas or template based on your selection.

1. **Resource properties panel** – Displays relevant properties for the card that’s been selected in the canvas. This panel is dynamic. Properties displayed will change as you configure your card.

1. **Menu** – Provides general options such as the following:
   + **Create a project**
   + **Open a template file or project**
   + **Save a template file**
   + **[Activate local sync](using-composer-project-local-sync.md)**
   + **[Export canvas](reference-features-export.md)**
   + **Get support**
   + **Keyboard shortcuts**

1. **Card** – Displays a view of your card on the canvas.

1. **Line** – Represents a connection between cards.

1. **Group** – Groups selected cards together for visual organization.

1. **Card actions** – Provides actions you can take on your card.

   1. **Details** – Brings up the resource property panel.

   1. **Group** – Group selected cards together.

   1. **Delete** – Deletes the card from your canvas.

1. **Port** – Connection points to other cards.

1. **Resource property fields** – A curated set of property fields to configure for your cards.

1. **Re-center** – Re-center your application diagram on the visual canvas.

1. **Zoom** – Zoom in and out on your canvas.

1. **Feedback** – Go here to submit feedback.

# Manage your project from the Infrastructure Composer console
<a name="using-composer-project"></a>

This topic provides guidance on the basic tasks you perform to manage your project from the Infrastructure Composer console. This includes common tasks like creating a new project, saving a project, and importing a project or template. You can also load an existing project if you activate [local sync mode](using-composer-project-local-sync.md). After activating local sync mode, you can do the following:
+ Create a new project that consists of a starting template and folder structure.
+ Load an existing project by choosing a parent folder that contains your project template and files.
+ Use Infrastructure Composer to manage your templates and folders

With local sync mode, Infrastructure Composer automatically saves your project’s template and folder changes to your local machine. If your browser doesn’t support local sync mode, or if you prefer to use Infrastructure Composer without local sync mode activated, you can create a new template or load an existing template. To save changes, you must export the template to your local machine.

**Note**  
Infrastructure Composer supports applications that consist of the following:  
An CloudFormation or AWS Serverless Application Model template that defines your infrastructure code.
A folder structure that organizes your project files, such as Lambda function code, configuration files, and build folders.

**Topics**
+ [

# Create a new project in the Infrastructure Composer console
](using-composer-project-new.md)
+ [

# Import an existing project folder in the Infrastructure Composer console
](using-composer-project-import-folder.md)
+ [

# Import an existing project template in the Infrastructure Composer console
](using-composer-project-import-template.md)
+ [

# Save an existing project template in the Infrastructure Composer console
](using-composer-project-save-template.md)

# Create a new project in the Infrastructure Composer console
<a name="using-composer-project-new"></a>

When you create a new project, Infrastructure Composer generates a starting template. As you design your application on the canvas, your template is modified. To save your work, you must export your template or activate local sync mode.

**To create a new project**

1. Sign in to the [Infrastructure Composer console](https://console.aws.amazon.com/composer/home).

1. On the **Home** page, choose **Create project**.

**Note**  
You can also load an existing in Infrastructure Composer, but you must first [activate local sync mode](using-composer-project-local-sync.md). Once activated, see [Load an existing Infrastructure Composer project with local sync activated](using-composer-how-to-load-with-local-sync.md) to load an existing project.

# Import an existing project folder in the Infrastructure Composer console
<a name="using-composer-project-import-folder"></a>

Using local sync mode, you can import the parent folder of an existing project. If your project contains multiple templates, you can choose the template to load.

**To import an existing project from the Home page**

1. Sign in to the [Infrastructure Composer console](https://console.aws.amazon.com/composer/home).

1. On the **Home** page, choose **Load a CloudFormation template**.

1. For **Project location**, choose **Select folder**. Select your project’s parent folder and choose **Select**.
**Note**  
If you do not receive this prompt, your browser may not support the File System Access API, which is required for local sync mode. For more information, see [Allow web page access to local files in Infrastructure Composer](reference-fsa.md). 

1. When prompted by your browser, select **View files**.

1. For **Template file**, choose your template from the dropdown list. If your project contains a single template, Infrastructure Composer automatically selects it for you.

1. Choose **Create**.

**To import an existing project from the canvas**

1. From the canvas, choose **Menu** to open the menu.

1. In the **Open** section, choose **Project folder**.
**Note**  
If the **Project folder** option is unavailable, your browser may not support the File System Access API, which is required for local sync mode. For more information, see [Allow web page access to local files in Infrastructure Composer](reference-fsa.md). 

1. For **Project location**, choose **Select folder**. Select your project’s parent folder and choose **Select**.

1. When prompted by your browser, select **View files**.

1. For **Template file**, choose your template from the dropdown list. If your project contains a single template, Infrastructure Composer automatically selects it for you.

1. Choose **Create**.

When you import an existing project folder, Infrastructure Composer activates **local sync mode**. Changes made to your project’s template or files are automatically saved to your local machine.

# Import an existing project template in the Infrastructure Composer console
<a name="using-composer-project-import-template"></a>

When you import an existing CloudFormation or AWS SAM template, Infrastructure Composer automatically generates a visualization of your application architecture on the canvas.

You can import a project template from your local machine.

**To import an existing project template**

1. Sign in to the [Infrastructure Composer console](https://console.aws.amazon.com/composer/home).

1. Choose **Create project** to open a blank canvas.

1. Choose **Menu** to open the menu.

1. In the **Open** section, choose **Template file**.

1. Select your template and choose **Open**.

To save changes to your template, you must export your template or activate local sync mode. 

# Save an existing project template in the Infrastructure Composer console
<a name="using-composer-project-save-template"></a>

If you don't use local sync mode, you must export your template to save your changes. If you have local sync mode activated, manually saving your template is not required. Changes are automatically saved to your local machine.

**To save an existing project template**

1. From the Infrastructure Composer canvas, choose **Menu** to open the menu.

1. In the **Save** section, choose **Save template file**.

1. Provide a name for your template.

1. Select a location to save your template.

1. Choose **Save**.

# Connect the Infrastructure Composer console with your local IDE
<a name="other-services-ide"></a>

To connect the Infrastructure Composer console with your local integrated development environment (IDE), use local sync mode. This mode automatically syncs and saves data to your local machine. For more information about local sync mode, see [Locally sync and save your project in the Infrastructure Composer console](using-composer-project-local-sync.md). For instructions on using local sync mode, see [Locally sync and save your project in the Infrastructure Composer console](using-composer-project-local-sync.md).

**Note**  
The **Activate local sync** option is not available in every browser. It is available in Google Chrome and Microsoft Edge.

## Benefits of using Infrastructure Composer with your local IDE
<a name="other-services-ide-benefits"></a>

As you design in Infrastructure Composer, your local template and project directory are automatically synced and saved.

You can use your local IDE to view changes and modify your templates. Changes that you make locally are automatically synced to Infrastructure Composer.

You can use local tools such as the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) to build, test, deploy your application, and more. The following example shows how you can drag and drop resources onto Infrastructure Composer's visual canvas which, in turn, creates markup in your AWS SAM template in your local IDE.

![\[Using Infrastructure Composer with a local IDE to sync changes.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_other_ide_01.gif)


## Integrate Infrastructure Composer with your local IDE
<a name="other-services-ide-steps"></a>

**To integrate Infrastructure Composer with your local IDE**

1. In Infrastructure Composer, create or load a project, and activate local sync by selecting the **Menu** button at the top-right side of the screen and choosing **Activate local sync**.
**Note**  
The **Activate local sync** option is not available in every browser. It is available in Google Chrome and Microsoft Edge.

1. In your local IDE, open the same project folder as Infrastructure Composer.

1. Use Infrastructure Composer with your local IDE. Updates made in Infrastructure Composer will automatically sync with your local machine. Here are some examples of what you can do:

   1. Use your version control system of choice to track updates being performed by Infrastructure Composer.  
![\[Making a change in Infrastructure Composer and viewing the git diff in your local IDE.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_other_ide_02.gif)

   1. Use the AWS SAM CLI locally to build, test, deploy your application, and more. To learn more, see [Deploy your Infrastructure Composer serverless application to the AWS Cloud](other-services-cfn.md).  
![\[Using sam build and sam deploy in your local IDE.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_other_ide_03.gif)

# Allow web page access to local files in Infrastructure Composer
<a name="reference-fsa"></a>

The Infrastructure Composer console supports [local sync mode](using-composer-project-local-sync.md) and [Importing functions from the Lambda console](other-services-lambda.md). To use these features, a web browser that supports the File System Access API is required. Any recent version of Google Chrome and Microsoft Edge support all capabilities of the File System Access API and can be used with **local sync** mode in Infrastructure Composer.

The File System Access API lets web pages gain access to your local file system in order to read, write, or save files. This feature is off by default and requires your permission through a visual prompt to allow it. Once granted, this access remains for the duration of your web page’s browser session.

To learn more about the File System Access API, see:
+ [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) in the *mdn web docs*.
+ [The File System Access API: simplifying access to local files](https://web.dev/file-system-access/) in the *web.dev* website.

## local sync mode
<a name="reference-fsa-local"></a>

**Local sync** mode lets you automatically sync and save your template files and project folders locally as you design in Infrastructure Composer. To use this feature, a web browser that supports the File System Access API is required.

## Data Infrastructure Composer gains access to
<a name="reference-fsa-access"></a>

Infrastructure Composer gains read and write access to the project folder you allow, along with any child folders of that project folder. This access is used to create, update, and save any template files, project folders, and backup directories that are generated as you design. Data accessed by Infrastructure Composer is not used for any other purpose and is not stored anywhere beyond your local file system.

### Access to sensitive data
<a name="reference-fsa-access-data"></a>

The File System Access API excludes or limits access to specific directories that may contain sensitive data. An error will occur if you select one of these directories to use with Infrastructure Composer *local sync* mode. You can choose another local directory to connect with or use Infrastructure Composer in its default mode with *local sync* deactivated.

For more information, including examples of sensitive directories, see [Users giving access to more, or more sensitive files than they intended](https://wicg.github.io/file-system-access/#privacy-wide-access) in the *File System Access W3C Draft Community Group Report*.

If you use Windows Subsystem for Linux (WSL), the File System Access API excludes access to the entire Linux directory because of its location within your Windows system. You can use Infrastructure Composer with *local sync* deactivated or configure a solution to sync project files from your WSL directory to a working directory in Windows. Then, use Infrastructure Composer *local sync* mode with your Windows directory.

# Locally sync and save your project in the Infrastructure Composer console
<a name="using-composer-project-local-sync"></a>

This section provides information on using Infrastructure Composer's **local sync** mode to automatically sync and save your project to your local machine.

We recommend that you use **local sync** for the following reasons:

You can activate **local sync** for a new project, or load an existing project with **local sync** activated.
+ By default, you need to manually save your application template as you design. Use **local sync** to automatically save your application template to your local machine as you make changes.
+ **Local sync** manages and automatically syncs your project folders, backup folder, and [supported external files](using-composer-external-files.md) to your local machine.
+ When using **local sync**, you can connect Infrastructure Composer with your local IDE to speed up development. To learn more, see [Connect the Infrastructure Composer console with your local IDE](other-services-ide.md).

## What local sync mode saves
<a name="reference-features-local-sync-about"></a>

**Local sync** mode automatically syncs and saves the following to your local machine:
+ **Application template file** – The AWS CloudFormation or AWS Serverless Application Model (AWS SAM) template that contains your infrastructure as code (IaC).
+ **Project folders** – A general directory structure that organizes your AWS Lambda functions.
+ **Backup directory** – A backup directory named `.aws-composer`, created at the root of your project location. This directory contains a backup copy of your application template file and project folders.
+ **External files ** – Supported external files that you can use within Infrastructure Composer. To learn more, see [Reference external files in Infrastructure Composer](using-composer-external-files.md).

## Browser requirements
<a name="reference-features-local-sync-about-browser"></a>

**Local sync** mode requires a browser that supports the File System Access API. For more information, see [Allow web page access to local files in Infrastructure Composer](reference-fsa.md).

## Activating local sync mode
<a name="reference-features-local-sync-activate"></a>

**Local sync** mode is deactivated by default. You can activate **Local sync** mode through the Infrastructure Composer **menu**.

![\[Infrastructure Composer's Menu with Activate local sync selected.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_ref_16.png)


For instructions on activating **local sync** and existing loading projects, see the following topics:.
+ [Activate local sync in Infrastructure Composer](using-composer-how-to-locally-sync.md)
+ [Load an existing Infrastructure Composer project with local sync activated](using-composer-how-to-load-with-local-sync.md)

# Activate local sync in Infrastructure Composer
<a name="using-composer-how-to-locally-sync"></a>

To activate local sync, complete the following steps:

1. From the Infrastructure Composer **[home](reference-visual.md#reference-visual-home)** page, select **Create project**.

1. From the Infrastructure Composer **menu**, select **Activate local sync**.

1. For **Project location**, press **Select folder** and choose a directory. This is where Infrastructure Composer will save and sync your template files and folders as you design.
**Note**  
The project location must not contain an existing application template.

1. When prompted to allow access, select **View files**.

1. Press **Activate**. When prompted to save changes, select **Save changes**.

   When activated, the **Autosave** indicator will be displayed in the upper-left area of your canvas.

# Load an existing Infrastructure Composer project with local sync activated
<a name="using-composer-how-to-load-with-local-sync"></a>

To load an existing project with local sync activated, complete the following steps:

1. From the Infrastructure Composer **[home](reference-visual.md#reference-visual-home)** page, select **Load a CloudFormation template**.

1. From the Infrastructure Composer **menu**, select **Open** > **Project folder**.

1. For **Project location**, press **Select folder** and choose the root folder of your project.

1. When prompted to allow access, select **View files**.

1. For **Template file**, select your application template and press **Create**.

1. When prompted to save changes, select **Save changes**.

   When activated, the **Autosave** indicator will be displayed in the upper-left area of your canvas.

# Import functions into Infrastructure Composer from the Lambda console
<a name="other-services-lambda"></a>

Infrastructure Composer provides an integration with the AWS Lambda console. You can import a Lambda function from the Lambda console into the Infrastructure Composer console. Then, use the Infrastructure Composer canvas to design your application architecture further.
+ This integration requires a browser that supports the File System Access API. For more information, see [Allow web page access to local files in Infrastructure Composer](reference-fsa.md).
+ When you import your Lambda function into Infrastructure Composer, you must activate local sync mode to save any changes. For more information, see [Locally sync and save your project in the Infrastructure Composer console](using-composer-project-local-sync.md).

To get started with using this integration, see [Using AWS Lambda with AWS Infrastructure Composer](https://docs.aws.amazon.com/lambda/latest/dg/services-appcomposer.html) in the *AWS Lambda Developer Guide*.

# Export an image of Infrastructure Composer's visual canvas
<a name="reference-features-export"></a>

This topic describes the AWS Infrastructure Composer console **export canvas** feature.

For a visual overview of all Infrastructure Composer features, see [AWS Infrastructure Composer console visual overview](reference-visual.md).

## About export canvas
<a name="reference-features-export-about"></a>

The **export canvas** feature exports your application’s canvas as an image to your local machine.
+ Infrastructure Composer removes the visual designer UI elements and exports only your application’s diagram.
+ The default image file format is `png`.
+ The file is exported to your local machine’s default download location.

You can access the **export canvas** feature from the **Menu**.

![\[Infrastructure Composer's Menu with Export canvas selected.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_ref_13.png)


## Exporting canvas
<a name="reference-features-export-canvas"></a>

When you export your canvas, Infrastructure Composer displays a status message.

If the export is successful, you will see the following message:

![\[Infrastructure Composer's Menu with Export canvas selected.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_ref_14.png)


If the export was unsuccessful, you will see an error message. If you receive an error, try exporting again.

![\[Infrastructure Composer's Menu with Export canvas selected.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_ref_15.png)


# Using Infrastructure Composer in CloudFormation console mode
<a name="using-composer-console-cfn-mode"></a>

Infrastructure Composer in CloudFormation console mode is the recommended tool to visualize your CloudFormation templates. You can also use this tool to create and edit CloudFormation templates.

## How is this mode different than the Infrastructure Composer console?
<a name="composer-cfn-mode-diff"></a>

Infrastructure Composer in CloudFormation console mode generally has the same functionality as the [default Infrastructure Composer console](using-composer-console.md), but there are a few differences to note.
+ This mode is integrated with the stack workflow in the CloudFormation console. This allows you to use Infrastructure Composer directly in CloudFormation.
+ [Locally sync and save your project in the Infrastructure Composer console](using-composer-project-local-sync.md), a feature that automatically syncs and saves data to your local machine, is not supported.
+ Lambda-related cards (**Lambda Function** and **Lambda Layer**) require code builds and packaging solutions that are not available in this mode.

**Note**  
These cards and local sync can be used in the [Infrastructure Composer Console](https://aws.amazon.com/application-composer/) or the AWS Toolkit for Visual Studio Code.

When you open Infrastructure Composer from the CloudFormation console, Infrastructure Composer opens in CloudFormation console mode. In this mode, you can use Infrastructure Composer to visualize, create, and update your templates. 

# How to access Infrastructure Composer in CloudFormation console mode
<a name="setting-up-composer-cfn-mode"></a>

Infrastructure Composer in CloudFormation console mode is an upgrade from CloudFormation Designer. We recommend using Infrastructure Composer to visualize your CloudFormation templates. You can also use this tool to create and edit CloudFormation templates.

1. Go to the [Cloudformation console](https://console.aws.amazon.com/cloudformation/home) and log in.

1. Select **Infrastructure Composer** from the left-side navigation menu. This will take you to Infrastructure Composer in CloudFormation console mode.

**Note**  
For information on using Infrastructure Composer in CloudFormation console mode, see [Using Infrastructure Composer in CloudFormation console mode](using-composer-console-cfn-mode.md).

# Visualize a deployment in Infrastructure Composer in CloudFormation console mode
<a name="composer-cfn-mode-visualize"></a>

Follow the instructions in this topic to visualize a deployed CloudFormation stack/ Infrastructure Composer template.

1. Go to the [CloudFormation console](https://console.aws.amazon.com/cloudformation) and log in.

1. Select the stack you want to edit.

1. Select the **Template** tab.

1. Select **Infrastructure Composer**.

Infrastructure Composer will visualize your stack/template. Changes can be made here as well.

# Create a new template in Infrastructure Composer in CloudFormation console mode
<a name="composer-cfn-mode-create"></a>

Follow the instructions in this topic to create a new template.

1. Go to the [CloudFormation console](https://console.aws.amazon.com/cloudformation) and log in.

1. Select **Infrastructure Composer** from the left-side navigation menu. This will open Infrastructure Composer in CloudFormation console mode.

1. Drag, drop, configure, and connect the resources ([cards](using-composer-cards-intro.md)) you need from the **Resources** pallete.
**Note**  
See [How to compose](using-composer-basics.md) for details on using Infrastructure Composer, and note that Lambda-related cards (**Lambda Function** and **Lambda Layer**) require code builds and packaging solutions that are not available in Infrastructure Composer in CloudFormation console mode. These cards can be used in the [Infrastructure Composer console](https://aws.amazon.com/application-composer/) or the AWS Toolkit for Visual Studio Code. For information on using these tools, refer to [Where you can use Infrastructure Composer](using-composer.md).

1. Double click cards to use the **Resource properties** panel to specify how cards are configured.

1. [Connect your cards](using-composer-connecting.md) to specify your application’s event-driven workflow.

1. Select **Template** to view and edit your infrastructure code. Changes are automatically synced with your canvas view.

1. Once your template is ready to be exported into a stack, select **Create template**.

1. Select the **Confirm and export to CloudFormation** button. This will take you back to the create stack workflow with a message confirming your template was successfully imported.
**Note**  
Only templates with resources in them can be exported.

1. In the **Create stack** workflow, select **Next**.

1. Provide a stack name, review any listed parameters, and select **Next**.
**Note**  
The stack name must start with a letter and contain only letters, numbers, dashes.

1. Select **Next** after providing the following information:
   + Tags associated with the stack
   + Stack permissions
   + The stack's failure options
**Note**  
For guidance on managing stacks, see [CloudFormation best practices](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html) in the *CloudFormation User Guide*.

1. Confirm your stack details are correct, check acknowledgements at the bottom of the page, and select the **Submit** button.

CloudFormation will begin creating the stack based on the data in your template.

# Update an existing stack in Infrastructure Composer in CloudFormation console mode
<a name="composer-cfn-mode-update"></a>

Follow the instructions in this topic to update an existing CloudFormation stack.
**Note**  
If your file is saved locally, we recommend using [AWS Toolkit for Visual Studio Code](using-composer-ide.md).

1. Go to the [CloudFormation console](https://console.aws.amazon.com/cloudformation) and log in.

1. Select the stack you want to edit.

1. Select the **Update** button. Doing this will take you to the update stack wizard.

1. On the right, select **Edit in Infrastructure Composer**.

1. Select the button below that's labeled **Edit in Infrastructure Composer**. This will take you to Infrastructure Composer in CloudFormation console mode.

1. Here, you can drag, drop, configure, and connect resources ([cards](using-composer-cards-intro.md)) from the **Resources** pallete.
**Note**  
See [How to compose](using-composer-basics.md) for details on using Infrastructure Composer, and note that Lambda-related cards (**Lambda Function** and **Lambda Layer**) require code builds and packaging solutions that are not available in Infrastructure Composer in CloudFormation console mode. These cards can be used in the [Infrastructure Composer console](https://aws.amazon.com/application-composer/) or the AWS Toolkit for Visual Studio Code. For information on using these tools, refer to [Where you can use Infrastructure Composer](using-composer.md).

1. When you are ready to export changes to CloudFormation, select **Update template**.

1. Select **Confirm and continue to CloudFormation**. This will take you back to the **Update stack** workflow with a message confirming your template was successfully imported.
**Note**  
Only templates with resources in them can be exported.

1. In the **Update stack** workflow, select **Next**.

1. Review any listed parameters and select **Next**.

1. Select **Next** after providing the following information:
   + Tags associated with the stack
   + Stack permissions
   + The stack's failure options
**Note**  
For guidance on managing stacks, see [CloudFormation best practices](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html) in the *CloudFormation User Guide*.

1. Confirm your stack details are correct, check acknowledgements at the bottom of the page, and select the **Submit** button.

CloudFormation will begin updating the stack based on the updates you made in your template.

# Using Infrastructure Composer from the AWS Toolkit for Visual Studio Code
<a name="using-composer-ide"></a>

This section describes how you can use AWS Infrastructure Composer from the [AWS Toolkit for Visual Studio Code](https://aws.amazon.com//visualstudiocode/). This includes a visual overview of Infrastructure Composer from the AWS Toolkit for Visual Studio Code. It also includes instructions showing how you can access this experience and sync your project from VS Code to the AWS cloud. To sync, you use the **sam sync** command from the AWS SAM CLI. This section also provides guidance on using Amazon Q while in Infrastructure Composer from the AWS Toolkit for Visual Studio Code.

For additional guidance on using Infrastructure Composer from the AWS Toolkit for Visual Studio Code, refer to [How to compose](using-composer-basics.md). The content in this section applies to this experience, as well as the Infrastructure Composer console experience.

**Topics**
+ [

# Visual overview of Infrastructure Composer from the AWS Toolkit for Visual Studio Code
](using-composer-ide-visual.md)
+ [

# Access Infrastructure Composer from the AWS Toolkit for Visual Studio Code
](setting-up-composer-access-ide.md)
+ [

# Sync Infrastructure Composer to deploy to the AWS Cloud
](using-composer-ide-sync.md)
+ [

# Using AWS Infrastructure Composer with Amazon Q Developer
](using-composer-ide-cw.md)

# Visual overview of Infrastructure Composer from the AWS Toolkit for Visual Studio Code
<a name="using-composer-ide-visual"></a>

Infrastructure Composer's visual designer in the AWS Toolkit for Visual Studio Code includes a visual canvas, which includes components that are numbered in the following image and listed below. 

![\[Infrastructure Composer's visual designer, including components of its visual canvas which are numerically itemized.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_use_ide_visual_02.png)


1. **Resource palette** – Displays cards that you can design with.

1. **Card categories** – Cards are organized by categories unique to Infrastructure Composer.

1. **Resource search bar** – Search for cards that you can add to the canvas.

1. **List** – Displays a tree view of your application resources.

1. **Resources** – Displays the resource palette.

1. **Left pane toggle** – Hide or show the left pane.

1. **Arrange** – Arranges your application architecture in the canvas.

1. **Sync** – Initiates the AWS Serverless Application Model (AWS SAM) CLI `sam sync` command to deploy your application.

1. **Menu** – Provides general options such as the following:
   + **Export canvas**
   + **Tour the canvas**
   + Links to **Documentation**
   + Keyboard shortcuts

1. **Resource properties panel** – Displays relevant properties for the card that’s been selected in the canvas. This panel is dynamic. Properties displayed will change as you configure your card.

1. **Card** – Displays a view of your card on the canvas.

1. **Line** – Represents a connection between cards.

1. **Group** – A group of cards. You can group cards for visual organization.

1. **Port** – Connection points to other cards.

1. **Card actions** – Provides actions you can take on your card.
   + **Details** – Brings up the **Resource properties** panel.
   + **Group** – Group selected cards together.
   + **Delete** – Deletes the card from your canvas and template.

1. **Re-center** – Re-center your application diagram on the visual canvas.

1. **Zoom** – Zoom in and out on your canvas.

# Access Infrastructure Composer from the AWS Toolkit for Visual Studio Code
<a name="setting-up-composer-access-ide"></a>

Follow the instructions in this topic to access Infrastructure Composer from the AWS Toolkit for Visual Studio Code.

**Note**  
Before you can access Infrastructure Composer from the AWS Toolkit for Visual Studio Code, you must first download and install the Toolkit for VS Code. For instructions, see [ Downloading the Toolkit for VS Code](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/downloads.html).

**To access Infrastructure Composer from the Toolkit for VS Code**

You can access Infrastructure Composer in any of the following ways:

1. By selecting the Infrastructure Composer button from any CloudFormation or AWS SAM template.

1. Through the context menu by right-clicking on your CloudFormation or AWS SAM template.

1. From the VS Code Command Palette.

The following is an example of accessing Infrastructure Composer from the Infrastructure Composer button:

![\[Infrastructure Composer being accessed through the AWS Toolkit for Visual Studio Code.\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_intro_07.gif)


For more information on accessing Infrastructure Composer, see [ Accessing AWS Infrastructure Composer from the Toolkit](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/appcomposer-overview.html#appcomposer-overview-access).

# Sync Infrastructure Composer to deploy to the AWS Cloud
<a name="using-composer-ide-sync"></a>

Use the **sync** button in AWS Infrastructure Composer from the AWS Toolkit for Visual Studio Code to deploy your application to the AWS Cloud.

The **sync** button initiates the `sam sync` command from the AWS SAM Command Line Interface (CLI).

The `sam sync` command can deploy new applications or quickly sync changes that you make locally to the AWS Cloud. Running `sam sync` may include the following:
+ Building your application with `sam build` to prepare your local application files for deployment by creating or updating a local `.aws-sam` directory.
+ For resources that support AWS service APIs, the AWS SAM CLI will use the APIs to deploy your changes. The AWS SAM CLI does this to quickly update your resources in the cloud.
+ If necessary, the AWS SAM CLI performs an AWS CloudFormation deployment to update your entire stack through a change set.

The `sam sync` command is best suited for rapid development environments when quickly updating your cloud resources can benefit your development and testing workflows.

To learn more about `sam sync`, see [Using sam sync](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli-sync.html) in the *AWS Serverless Application Model Developer Guide*.

## Set up
<a name="using-composer-ide-sync-setup"></a>

To use the **sync** feature in Infrastructure Composer, you must have the AWS SAM CLI installed on your local machine. For instructions, see [Installing the AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) in the *AWS Serverless Application Model Developer Guide*.

When you use the **sync** feature in Infrastructure Composer, the AWS SAM CLI references your configuration file for the information it needs to sync your application to the AWS Cloud. For instructions on creating, modifying, and using configuration files, see [ Configure project settings](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli-configure.html#using-sam-cli-configure-project) in the *AWS Serverless Application Model Developer Guide*.

## Sync and deploy your application
<a name="using-composer-ide-sync-use"></a>

**To sync your application to the AWS Cloud**

1. Select the **sync** button on the Infrastructure Composer canvas.

1. You may receive a prompt to confirm that you are working with a development stack. Select **OK** to continue.

1. Infrastructure Composer may prompt you to configure the following options:
   + **AWS Region** – The region to sync your application to.
   + **CloudFormation stack name** – The name of your CloudFormation stack. You can select an existing stack name or create a new one.
   + **Amazon Simple Storage Service (Amazon S3) bucket** – The name of your Amazon S3 bucket. The AWS SAM CLI will package and store your application files and function code here. You can select an existing bucket or create a new one.

Infrastructure Composer will initiate the AWS SAM CLI `sam sync` command and open a terminal window in your IDE to output its progress.

# Using AWS Infrastructure Composer with Amazon Q Developer
<a name="using-composer-ide-cw"></a>

 AWS Infrastructure Composer from the AWS Toolkit for Visual Studio Code provides an integration with Amazon Q. You can use Amazon Q within Infrastructure Composer to generate the infrastructure code for your AWS resources as you design your application.

Amazon Q is a general purpose, machine learning-powered code generator. To learn more, see [What is Amazon Q?](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html) in the *Amazon Q Developer User Guide*.

For **standard resource** and **standard component** cards, you can use Amazon Q to generate infrastructure code suggestions for your resources.

![\[Amazon Q generating a code suggestion in Infrastructure Composer\]](http://docs.aws.amazon.com/infrastructure-composer/latest/dg/images/aac_use_ide_cw_01.gif)


**Standard resource** and **standard component** cards can represent an CloudFormation resource or a collection of CloudFormation resources. To learn more, see [Configure and modify cards in Infrastructure Composer](using-composer-cards.md).

## Setting up
<a name="using-composer-ide-cw-setup"></a>

To use Amazon Q in Infrastructure Composer, you must authenticate with Amazon Q in the Toolkit. For instructions, see [Getting started with Amazon Q in VS Code and JetBrains](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-in-IDE.html) in the *Amazon Q Developer User Guide*.

## Using Amazon Q Developer in Infrastructure Composer
<a name="using-composer-ide-cw-use"></a>

You can use Amazon Q Developer from the **Resource properties** panel of any **standard resource** or **standard component** card.

**To use Amazon Q in Infrastructure Composer**

1. From a **standard resource** or **standard component** card, open the **Resource properties** panel.

1. Locate the **Resource configuration** field. This field contains the infrastructure code for the card.

1. Select the **Generate suggestions** button. Amazon Q will generate a suggestion.
**Note**  
Code generated at this stage will not overwrite existing infrastructure code from your template.

1. To generate more suggestions, select **Regenerate**. You can toggle through the samples to compare results.

1. To select an option, choose **Select**. You can modify the code here before saving it to your application. To exit without saving, select the **exit icon (X)**.

1. To save the code to your application template, select **Save** from the **Resource properties** panel.

## Learn more
<a name="using-composer-ide-cw-learn"></a>

To learn more about Amazon Q, see [What is Amazon Q?](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html) in the *Amazon Q Developer User Guide*.