This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
Overview
Cloudcraft’s Auto Layout feature, accessible through the web application, is a powerful tool for automatically generating diagrams of your AWS environment. This functionality can significantly streamline documentation processes and facilitate the onboarding of new team members.
This guide provides a step-by-step approach to utilizing this feature via common command-line utilities and the Cloudcraft developer API.
The ability to add and scan AWS and Azure accounts, as well as to use Cloudcraft's developer API, is only available to Pro subscribers. Check out Cloudcraft's pricing page for more information.
The account ID of the AWS or Azure account you wish to scan.
Access to a Unix-like environment (Linux, macOS, or Windows Subsystem for Linux).
Familiarity with command-line operations.
Basic knowledge of API usage.
Take a snapshot of the account
Start by creating a snapshot of your AWS or Azure account using the Snapshot AWS account or Snapshot Azure account endpoints. This process mirrors the functionality of the Scan Now button in the Cloudcraft UI and outputs the snapshot in JSON format.
Replace PROVIDER with the cloud provider, for example, azure or aws, ACCOUNT_ID with the ID of your AWS or Azure account in Cloudcraft, REGION with your desired scan region, and API_KEY with your Cloudcraft API key.
After executing the command, the JSON representation of your AWS account snapshot is displayed. To save this output directly to a file, use the following command:
The snapshot is saved with the filename account-infra.json in your temporary directory.
Generate a new blueprint
Next, create a new blueprint in your Cloudcraft account using the Create blueprint API endpoint. The saved snapshot data serves as the payload for this request.
Remember to replace API_KEY with your actual Cloudcraft API key.
Upon completion, a new blueprint reflecting your cloud infrastructure is created in your Cloudcraft account, replicating the effect of manually using the Scan Now and Auto Layout buttons.