start/stop/status scripts for AWS cloud formation demo
This commit is contained in:
18
example-projects/counter-demo/aws-cloudformation/status.py
Normal file
18
example-projects/counter-demo/aws-cloudformation/status.py
Normal file
@ -0,0 +1,18 @@
|
||||
import json
|
||||
import time
|
||||
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
region = 'eu-central-1'
|
||||
stackName = 'cloudcomp-counter-demo-stack'
|
||||
|
||||
client = boto3.setup_default_session(region_name=region)
|
||||
cfClient = boto3.client('cloudformation')
|
||||
|
||||
print("Showing stack...")
|
||||
print("------------------------------------")
|
||||
response = cfClient.describe_stacks(
|
||||
StackName=stackName,
|
||||
)
|
||||
print(json.dumps(response, indent=4, sort_keys=True, default=str))
|
Reference in New Issue
Block a user