one-observability-demo icon indicating copy to clipboard operation
one-observability-demo copied to clipboard

Encounter the issue "Waiter StackCreateComplete failed" once execute the "Setup Cloud9 environment" in workshop

Open jerryjin2018 opened this issue 3 years ago • 1 comments

Encounter the issue "Waiter StackCreateComplete failed" once execute the "Setup Cloud9 environment" in workshop

1. Backgroud

Region: us-east-2 (Ohio) Account: Not Event Engine I follow the steps in the link -- https://catalog.us-east-1.prod.workshops.aws/v2/workshops/31676d37-bbe9-4992-9cd1-ceae13c5116c/en-US/

2. Error/Symptom

1) Where I encountered the issue:

https://catalog.us-east-1.prod.workshops.aws/v2/workshops/31676d37-bbe9-4992-9cd1-ceae13c5116c/en-US/installation/not-using-ee/setup-cloud9

In the section -- Setup Cloud9 environment, after "copy and past the following commands into the terminal", and execute the command. The error is below in the Cloud9:

=========================================================================================
[cloudshell-user@ip-10-0-23-92 ~]$ curl -O https://raw.githubusercontent.com/aws-samples/one-observability-demo/main/cloud9-cfn.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21102  100 21102    0     0   156k      0 --:--:-- --:--:-- --:--:--  157k
[cloudshell-user@ip-10-0-23-92 ~]$ 
[cloudshell-user@ip-10-0-23-92 ~]$ aws cloudformation create-stack --stack-name C9-Observability-Workshop --template-body file://cloud9-cfn.yaml --capabilities CAPABILITY_NAMED_IAM
{
    "StackId": "arn:aws:cloudformation:us-east-2:0************:stack/C9-Observability-Workshop/ddbe3810-6b1c-11ec-aa07-065ddcde578e"
}
[cloudshell-user@ip-10-0-23-92 ~]$ 
[cloudshell-user@ip-10-0-23-92 ~]$ aws cloudformation wait stack-create-complete --stack-name C9-Observability-Workshop
   
Waiter StackCreateComplete failed: Waiter encountered a terminal failure state: For expression "Stacks[].StackStatus" we matched expected path: "ROLLBACK_COMPLETE" at least once
[cloudshell-user@ip-10-0-23-92 ~]$ 
[cloudshell-user@ip-10-0-23-92 ~]$ echo -e "Cloud9 Instance is Ready!!\n\n"
echo -e "Cloud9 Instance is Readyaws cloudformation wait stack-create-complete --stack-name C9-Observability-Workshop\n\n"
Cloud9 Instance is Readyaws cloudformation wait stack-create-complete --stack-name C9-Observability-Workshop

=========================================================================================

2)Error in the cloudformation stack:

2022-01-02 00:09:31 UTC+0800	C9BootstrapInstanceLambda	CREATE_FAILED	Received response status [FAILED] from custom resource. Message returned: See the details in CloudWatch Log Stream: 2022/01/01/[$LATEST]5907c73b4e594e13a4fbb3da7fe072b5 (RequestId: 0985cb63-9839-46a6-973f-ff9c3d029217)

3)Error info in the cloudwatch:

2022-01-02T00:09:30.228+08:00

Copy
[ERROR]	2022-01-01T16:09:30.209Z	f405d19a-b691-4d29-a965-59e7ef1cae33	An error occurred (IncorrectState) when calling the AssociateIamInstanceProfile operation: There is an existing association for instance i-07f26f6008b399af4
Traceback (most recent call last):
  File "/var/task/index.py", line 43, in lambda_handler
    response = ec2.associate_iam_instance_profile(IamInstanceProfile=iam_instance_profile, InstanceId=instance['InstanceId'])
  File "/var/runtime/botocore/client.py", line 386, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/var/runtime/botocore/client.py", line 705, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (IncorrectState) when calling the AssociateIamInstanceProfile operation: There is an existing association for instance i-07f26f6008b399af4
[ERROR] 2022-01-01T16:09:30.209Z f405d19a-b691-4d29-a965-59e7ef1cae33 An error occurred (IncorrectState) when calling the AssociateIamInstanceProfile operation: There is an existing association for instance i-07f26f6008b399af4 Traceback (most recent call last): File "/var/task/index.py", line 43, in lambda_handler response = ec2.associate_iam_instance_profile(IamInstanceProfile=iam_instance_profile, InstanceId=instance['InstanceId']) File "/var/runtime/botocore/client.py", line 386, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 705, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (IncorrectState) when calling the AssociateIamInstanceProfile operation: There is an existing association for instance i-07f26f6008b399af4

4)To be honest, I have tried this in the other region us-east-1, us-east-2, I encountered the same issue.

jerryjin2018 avatar Jan 01 '22 16:01 jerryjin2018

Could not reproduce or haven't heard from others. Closing this issue. Please update this and reopen the issue if you still see it.

awsimaya avatar Dec 14 '22 21:12 awsimaya