AWS CLI Cloudformation OperationInProgressException when calling the CreateStackInstances operation
up vote
1
down vote
favorite
I'm using the aws cli to create a cloudformation stackset
echo "creating stackset..."
some_stackset_id=$(aws cloudformation create-stack-set
--stack-set-name $StacksetName
--template-url $TemplateURL
--capabilities '["CAPABILITY_NAMED_IAM"]'
--administration-role-arn "arn:aws:iam::000000000009:role/AWSCloudFormationStackSetAdministrationRole"
--execution-role-name "AWSCloudFormationStackSetExecutionRole"
--parameters '[
{"ParameterKey":"env","ParameterValue":"DEV","UsePreviousValue": false, "ResolvedValue": "DEV"}
]'
| jq '.StackSetId')
echo "Waiting for stack instance to be created ..."
aws cloudformation wait stack-create-complete
--region $region
--stack-name $some_stackset_id
echo "Creating stack instances..."
some_id=$(aws cloudformation create-stack-instances
--stack-set-name myStackset
--accounts '["0000030000"]'
--regions '["us-east-1"]'
--operation-preferences='
{
"RegionOrder": ["us-east-1"],
"FailureToleranceCount": 0,
"MaxConcurrentCount": 3
}' | jq '.OperationId')
echo "Done creating stack instances"
When I wait for the stackset to finish creating before I can create stack instances within that stackset, the cli is supposed to
Wait until stack status is CREATE_COMPLETE. It will poll every 30
seconds until a successful state has been reached. This will exit with
a return code of 255 after 120 failed checks.
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/wait/stack-create-complete.html
However, that's not the behavior i'm observing. As soon as the cli gets to that aws cloudformation wait stack-create-complete...
it doesn't wait there for 30 secs as it's supposed to according to the cli doc, instead, it just moves on to the next command (create-stack-instances) which fails with OperationInProgressException
any idea why?
amazon-web-services amazon-cloudformation aws-cli
This question has an open bounty worth +50
reputation from pelican ending in 12 hours.
This question has not received enough attention.
add a comment |
up vote
1
down vote
favorite
I'm using the aws cli to create a cloudformation stackset
echo "creating stackset..."
some_stackset_id=$(aws cloudformation create-stack-set
--stack-set-name $StacksetName
--template-url $TemplateURL
--capabilities '["CAPABILITY_NAMED_IAM"]'
--administration-role-arn "arn:aws:iam::000000000009:role/AWSCloudFormationStackSetAdministrationRole"
--execution-role-name "AWSCloudFormationStackSetExecutionRole"
--parameters '[
{"ParameterKey":"env","ParameterValue":"DEV","UsePreviousValue": false, "ResolvedValue": "DEV"}
]'
| jq '.StackSetId')
echo "Waiting for stack instance to be created ..."
aws cloudformation wait stack-create-complete
--region $region
--stack-name $some_stackset_id
echo "Creating stack instances..."
some_id=$(aws cloudformation create-stack-instances
--stack-set-name myStackset
--accounts '["0000030000"]'
--regions '["us-east-1"]'
--operation-preferences='
{
"RegionOrder": ["us-east-1"],
"FailureToleranceCount": 0,
"MaxConcurrentCount": 3
}' | jq '.OperationId')
echo "Done creating stack instances"
When I wait for the stackset to finish creating before I can create stack instances within that stackset, the cli is supposed to
Wait until stack status is CREATE_COMPLETE. It will poll every 30
seconds until a successful state has been reached. This will exit with
a return code of 255 after 120 failed checks.
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/wait/stack-create-complete.html
However, that's not the behavior i'm observing. As soon as the cli gets to that aws cloudformation wait stack-create-complete...
it doesn't wait there for 30 secs as it's supposed to according to the cli doc, instead, it just moves on to the next command (create-stack-instances) which fails with OperationInProgressException
any idea why?
amazon-web-services amazon-cloudformation aws-cli
This question has an open bounty worth +50
reputation from pelican ending in 12 hours.
This question has not received enough attention.
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm using the aws cli to create a cloudformation stackset
echo "creating stackset..."
some_stackset_id=$(aws cloudformation create-stack-set
--stack-set-name $StacksetName
--template-url $TemplateURL
--capabilities '["CAPABILITY_NAMED_IAM"]'
--administration-role-arn "arn:aws:iam::000000000009:role/AWSCloudFormationStackSetAdministrationRole"
--execution-role-name "AWSCloudFormationStackSetExecutionRole"
--parameters '[
{"ParameterKey":"env","ParameterValue":"DEV","UsePreviousValue": false, "ResolvedValue": "DEV"}
]'
| jq '.StackSetId')
echo "Waiting for stack instance to be created ..."
aws cloudformation wait stack-create-complete
--region $region
--stack-name $some_stackset_id
echo "Creating stack instances..."
some_id=$(aws cloudformation create-stack-instances
--stack-set-name myStackset
--accounts '["0000030000"]'
--regions '["us-east-1"]'
--operation-preferences='
{
"RegionOrder": ["us-east-1"],
"FailureToleranceCount": 0,
"MaxConcurrentCount": 3
}' | jq '.OperationId')
echo "Done creating stack instances"
When I wait for the stackset to finish creating before I can create stack instances within that stackset, the cli is supposed to
Wait until stack status is CREATE_COMPLETE. It will poll every 30
seconds until a successful state has been reached. This will exit with
a return code of 255 after 120 failed checks.
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/wait/stack-create-complete.html
However, that's not the behavior i'm observing. As soon as the cli gets to that aws cloudformation wait stack-create-complete...
it doesn't wait there for 30 secs as it's supposed to according to the cli doc, instead, it just moves on to the next command (create-stack-instances) which fails with OperationInProgressException
any idea why?
amazon-web-services amazon-cloudformation aws-cli
I'm using the aws cli to create a cloudformation stackset
echo "creating stackset..."
some_stackset_id=$(aws cloudformation create-stack-set
--stack-set-name $StacksetName
--template-url $TemplateURL
--capabilities '["CAPABILITY_NAMED_IAM"]'
--administration-role-arn "arn:aws:iam::000000000009:role/AWSCloudFormationStackSetAdministrationRole"
--execution-role-name "AWSCloudFormationStackSetExecutionRole"
--parameters '[
{"ParameterKey":"env","ParameterValue":"DEV","UsePreviousValue": false, "ResolvedValue": "DEV"}
]'
| jq '.StackSetId')
echo "Waiting for stack instance to be created ..."
aws cloudformation wait stack-create-complete
--region $region
--stack-name $some_stackset_id
echo "Creating stack instances..."
some_id=$(aws cloudformation create-stack-instances
--stack-set-name myStackset
--accounts '["0000030000"]'
--regions '["us-east-1"]'
--operation-preferences='
{
"RegionOrder": ["us-east-1"],
"FailureToleranceCount": 0,
"MaxConcurrentCount": 3
}' | jq '.OperationId')
echo "Done creating stack instances"
When I wait for the stackset to finish creating before I can create stack instances within that stackset, the cli is supposed to
Wait until stack status is CREATE_COMPLETE. It will poll every 30
seconds until a successful state has been reached. This will exit with
a return code of 255 after 120 failed checks.
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/wait/stack-create-complete.html
However, that's not the behavior i'm observing. As soon as the cli gets to that aws cloudformation wait stack-create-complete...
it doesn't wait there for 30 secs as it's supposed to according to the cli doc, instead, it just moves on to the next command (create-stack-instances) which fails with OperationInProgressException
any idea why?
amazon-web-services amazon-cloudformation aws-cli
amazon-web-services amazon-cloudformation aws-cli
edited Nov 19 at 16:04
asked Nov 19 at 15:41
pelican
1,21921435
1,21921435
This question has an open bounty worth +50
reputation from pelican ending in 12 hours.
This question has not received enough attention.
This question has an open bounty worth +50
reputation from pelican ending in 12 hours.
This question has not received enough attention.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
A Cloudformation stackSet is different from a stack. The waiter you are using aws cloudformation wait stack-create-complete
is for stacks, not stackSets. Unfortunately there is no waiter for stackSets at this time, though using a bash loops is not difficult to create your own waiter.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
A Cloudformation stackSet is different from a stack. The waiter you are using aws cloudformation wait stack-create-complete
is for stacks, not stackSets. Unfortunately there is no waiter for stackSets at this time, though using a bash loops is not difficult to create your own waiter.
add a comment |
up vote
0
down vote
A Cloudformation stackSet is different from a stack. The waiter you are using aws cloudformation wait stack-create-complete
is for stacks, not stackSets. Unfortunately there is no waiter for stackSets at this time, though using a bash loops is not difficult to create your own waiter.
add a comment |
up vote
0
down vote
up vote
0
down vote
A Cloudformation stackSet is different from a stack. The waiter you are using aws cloudformation wait stack-create-complete
is for stacks, not stackSets. Unfortunately there is no waiter for stackSets at this time, though using a bash loops is not difficult to create your own waiter.
A Cloudformation stackSet is different from a stack. The waiter you are using aws cloudformation wait stack-create-complete
is for stacks, not stackSets. Unfortunately there is no waiter for stackSets at this time, though using a bash loops is not difficult to create your own waiter.
answered 2 days ago
cementblocks
1,368613
1,368613
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378108%2faws-cli-cloudformation-operationinprogressexception-when-calling-the-createstack%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown