Open aptwebapps opened 1 year ago
I tried with Lightsail as well, and got a different error:
"log": [
"AWS::Lightsail::Instance Instance CREATE_FAILED: Resource handler returned message: \"The specified bundle does not exist in this region: nano_2_0 (Service: Lightsail, Status Code: 400, Request ID: 11fcdd7b-96d2-4afb-8723-2774625aa7c1)\" (RequestToken: 6b58b8f3-2efe-9d70-5dbd-7fdbda57640f, HandlerErrorCode: NotFound)"
]
Should I create a separate ticket for this? I wonder if it's related - in both cases I'm trying to set up the VPN in ap-southeast-2 (Sydney).
The instance type might not be available in selected region. You can update it in config.cfg
@jackivanov Do you mean for Lightsail? I did that (changed from nano_2_0 to nano_2_2) and it worked, so my immediate need is met. The listed type for EC2 in config.cfg is t2.micro which is definitely available in ap-southeast-2 so not sure what I should change it to.
For EC2 I suggest you to try and remove the stacks using the console and deploy from scratch. It seem like it's trying to update some resources, not to provision new
Hi, I am trying to deploy it on AWS lightsail. Here is the ROLLBACK_COMPLETE error that I get. May I have any idea how to solve this? I have tried to re-start the lightsail instance but it doesn't help.
TASK [cloud-lightsail : Deploy the template] ***** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the UpdateStack operation: Stack:arn:aws:cloudformation:us-west-2:xxxxxxxxx:stack/algo/4ce6d8a0-44c4-11ee-9dc6-026dfbaa8503 is in ROLLBACK_COMPLETE state and can not be updated. fatal: [localhost]: FAILED! => {"boto3_version": "1.28.35", "botocore_version": "1.31.35", "changed": false, "error": {"code": "ValidationError", "message": "Stack:arn:aws:cloudformation:us-west-2:xxxxxxxxx:stack/algo/4ce6d8a0-44c4-11ee-9dc6-026dfbaa8503 is in ROLLBACK_COMPLETE state and can not be updated.", "type": "Sender"}, "msg": "Failed to update stack algo: An error occurred (ValidationError) when calling the UpdateStack operation: Stack:arn:aws:cloudformation:us-west-2:xxxxxxxx:stack/algo/4ce6d8a0-44c4-11ee-9dc6-026dfbaa8503 is in ROLLBACK_COMPLETE state and can not be updated.", "response_metadata": {"http_headers": {"connection": "keep-alive", "content-length": "410", "content-type": "text/xml", "date": "Sun, 27 Aug 2023 10:38:40 GMT", "x-amzn-requestid": "6feb8bf9-8665-42e9-b11e-52db333f1d4d"}, "http_status_code": 400, "request_id": "6feb8bf9-8665-42e9-b11e-52db333f1d4d", "retry_attempts": 0}}
========================= I have updated the policies to below to reach this place. { "Version": "2012-10-17", "Statement": [ { "Sid": "PreDeployment", "Effect": "Allow", "Action": [ "lightsail:DescribeImage", "lightsail:DescribeKeyPairs", "lightsail:DescribeRegions", "lightsail:ImportKeyPair", "lightsail:GetRegions", "cloudformation:DescribeStacks", "cloudformation:CreateStack", "cloudformation:ListStackResources", "cloudformation:UpdateStack", "lightsail:CopyImage" ], "Resource": [ "*" ] } ] }
@aptwebapps @monglebest One tip is to always choose a new algo server name when running ./algo
. For example add this cli argument: -e server_name=algo-$(date +%Y%b%d-%H%M)
If you always use the default server name 'algo' when prompted, it will reuse a previous ec2 / lightsail stack you ran earlier, which is why the log file errors show An error occurred (ValidationError) when calling the **UpdateStack** operation
. Secondly, you can always ignore the ROLLBACK portions of the error messages, since that is the error recovery steps done automatically by EC2 CloudFormation after the true failure.
As @jackivanov mentions, the best is to delete old stacks from the CloudFormation service in the AWS Web Console. Also in the CloudFormation Console, scroll down the Status column until see the resources that have status CREATE_FAILED. The Status Reason will explain the true reason for failure.
Thanks, @glennschler
it works for me. Just need to locate the stack in the server region under AWS, otherwise, it's not there
After trial and error, I have my working policy setup for aws lightsail shared. { "Version": "2012-10-17", "Statement": [ { "Sid": "PreDeployment", "Effect": "Allow", "Action": [ "lightsail:ImportKeyPair", "lightsail:GetRegions", "cloudformation:DescribeStacks", "cloudformation:CreateStack", "cloudformation:ListStackResources", "cloudformation:UpdateStack", "cloudformation:DescribeStackEvents", "lightsail:GetInstance", "lightsail:CreateInstances", "lightsail:TagResource", "lightsail:DeleteInstance", "lightsail:PutInstancePublicPorts", "lightsail:GetStaticIp", "lightsail:AllocateStaticIp", "lightsail:AttachStaticIp", "lightsail:StartInstance" ], "Resource": [ "*" ] } ] }
Describe the bug
Create Algo instance on EC2 using default configs - only modified the user list.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Algo configuration should launch
Full log