0

I'm running this command ecs-cli up --keypair aws-keypair-brickpile --capability-iam --size 1 --instance-type t3.medium --spot-price 0.02 with my default region eu-north-1 but it exits with this error. I can't figure out what the problem is.

INFO[0000] Using recommended Amazon Linux 2 AMI with ECS Agent 1.24.0 and Docker version 18.06.1-ce
INFO[0000] Created cluster                               cluster=brickpile region=eu-north-1
INFO[0001] Waiting for your cluster resources to be created...
INFO[0001] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS
INFO[0061] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS
INFO[0122] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS
ERRO[0183] Failure event                                 reason="AMI cannot be described (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: 8aa9e331-199d-11e9-903f-e74f15be8d34)" resourceType="AWS::AutoScaling::LaunchConfiguration"
FATA[0183] Error executing 'up': Cloudformation failure waiting for 'CREATE_COMPLETE'. State is 'ROLLBACK_IN_PROGRESS'
marcus
  • 101

1 Answers1

0

The AMI does not exist basically. Check that you have the rights or that the AMI is where it is supposed to be.

jayooin
  • 294
  • 1
  • 8
  • Ok. How do I check if I have the correct rights and where should the AMI be? The log says, `Using recommended Amazon Linux 2 AMI with ECS Agent 1.24.0 and Docker version 18.06.1-ce` so I would guess that it knows where to download the image? – marcus Jan 16 '19 at 15:28
  • You can see [the documentation](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-set-ami-launch-perms.html) concerning the permissions and the AMI. – jayooin Jan 16 '19 at 15:31
  • Ok, the view from the documentation seems to be some kind of windows app. I'm using MacOS and I use the AWS management console. It's strange because I can create a cluster in the same region from the management console but I can not create a cluster from the `ecs-cli`? – marcus Jan 17 '19 at 08:41
  • With the cli, the config file would be stored in `~/.ecs/config`. You need to see if you have that path accessible. Maybe even check the content of this file if it exists. Also see the permissions on that file. Again, more details in [the documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cmd-ecs-cli-configure.html) – jayooin Jan 17 '19 at 08:57
  • Yes, that is correct. My config file is complete and I can create new clusters from the same machine if I use another region, like `eu-west-1` it works but when I use `eu-north-1` it does not work from the cli but from the web it works flawless – marcus Jan 17 '19 at 12:42