opsworks
This commit is contained in:
@@ -8,7 +8,6 @@ pp = pprint.PrettyPrinter(indent=5, width=80)
|
|||||||
# http://docs.aws.amazon.com/general/latest/gr/rande.html#opsworks_region
|
# http://docs.aws.amazon.com/general/latest/gr/rande.html#opsworks_region
|
||||||
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', ]
|
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', ]
|
||||||
|
|
||||||
#region = 'us-east-1'
|
|
||||||
|
|
||||||
def describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
def describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
||||||
print('#### Listing Stacks ####')
|
print('#### Listing Stacks ####')
|
||||||
@@ -22,7 +21,7 @@ def describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
)
|
)
|
||||||
response = client.describe_stacks()
|
response = client.describe_stacks()
|
||||||
# debug
|
# debug
|
||||||
print(response)
|
# print(response)
|
||||||
if response.get('Stacks') is None:
|
if response.get('Stacks') is None:
|
||||||
print("{} likely does not have Lambda permissions\n" .format(AWS_ACCESS_KEY_ID))
|
print("{} likely does not have Lambda permissions\n" .format(AWS_ACCESS_KEY_ID))
|
||||||
elif len(response['Stacks']) <= 0:
|
elif len(response['Stacks']) <= 0:
|
||||||
|
|||||||
6
modules/opsworks.py
Normal file
6
modules/opsworks.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from libs.opsworks import *
|
||||||
|
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
|
||||||
|
def step_opsworkds_describe_stacks():
|
||||||
|
describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
from libs.opsworks import *
|
|
||||||
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
|
||||||
|
|
||||||
describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
|
||||||
Reference in New Issue
Block a user