Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Step 4: Run the script - AWS OpsWorks

Step 4: Run the script

When you run python3 stack_exporter.py, you can either provision the application, or create a starter template by setting the value of the --provision-application parameter to FALSE.

Example 1: Provision a Systems Manager Application Manager application

The following command gets information about an existing OpsWorks layer, and provisions an application using the newer OpsWorks architecture, which achieves a result similar to the Chef version configured for the stack. The script provisions all required resources, such as Auto Scaling groups by using CloudFormation, and then registers the application in Systems Manager Application Manager.

Replace stack-region and layer-id with the values for your OpsWorks stack and layer.

python3 stack_exporter.py \ --layer-id layer-id \ --region stack-region

Example 2: Generate a template

The following command gets information about an existing OpsWorks layer and generates a CloudFormation template. The template, if provisioned, achieves a result similar to using Chef 14. In this example, no resources are provisioned, because the --provision-application parameter is set to FALSE.

Replace stack-region and layer-id with the values for your OpsWorks stack and layer.

python3 stack_exporter.py \ --layer-id layer-id \ --region stack-region \ --provision-application FALSE

After running the command, you can review the template in the Application Manager template library in Systems Manager, and you can also provision the template. For more information about viewing the template library, see Working with the template library in the AWS Systems Manager User Guide.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.