List an Account's Stacks (describe-stacks) - AWS OpsWorks

List an Account's Stacks (describe-stacks)

Important

AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.

Use the describe-stacks command to list an account's stacks or get details about specified stacks.

aws opsworks --region us-west-2 describe-stacks

The preceding command returns a JSON object that contains details about each stack in the account, two in this example. For a description of each parameter, see describe-stacks.

{ "Stacks": [ { "ServiceRoleArn": "arn:aws:iam::444455556666:role/aws-opsworks-service-role", "StackId": "aeb7523e-7c8b-49d4-b866-03aae9d4fbcb", "DefaultRootDeviceType": "instance-store", "Name": "TomStack-sd", "ConfigurationManager": { "Version": "11.4", "Name": "Chef" }, "UseCustomCookbooks": true, "CustomJson": "{\n \"tomcat\": {\n \"base_version\": 7,\n \"java_opts\": \"-Djava.awt.headless=true -Xmx256m\"\n },\n \ "datasources\": {\n \"ROOT\": \"jdbc/mydb\"\n }\n}", "Region": "us-west-2", "DefaultInstanceProfileArn": "arn:aws:iam::444455556666:instance-profile/aws-opsworks-ec2-role", "CustomCookbooksSource": { "Url": "git://github.com/example-repo/tomcustom.git", "Type": "git" }, "DefaultAvailabilityZone": "us-west-2a", "HostnameTheme": "Layer_Dependent", "Attributes": { "Color": "rgb(45, 114, 184)" }, "DefaultOs": "Amazon Linux", "CreatedAt": "2013-08-01T22:53:42+00:00" }, { "ServiceRoleArn": "arn:aws:iam::444455556666:role/aws-opsworks-service-role", "StackId": "40738975-da59-4c5b-9789-3e422f2cf099", "DefaultRootDeviceType": "instance-store", "Name": "MyStack", "ConfigurationManager": { "Version": "11.4", "Name": "Chef" }, "UseCustomCookbooks": false, "Region": "us-west-2", "DefaultInstanceProfileArn": "arn:aws:iam::444455556666:instance-profile/aws-opsworks-ec2-role", "CustomCookbooksSource": {}, "DefaultAvailabilityZone": "us-west-2a", "HostnameTheme": "Layer_Dependent", "Attributes": { "Color": "rgb(45, 114, 184)" }, "DefaultOs": "Amazon Linux", "CreatedAt": "2013-10-25T19:24:30+00:00" } ] }