Problem:
 
You are using Skeddly to start an EC2 instance and your EC2 instance starts, but it then immediately stops.
 
However, using the AWS Management Console, you are able to start the same EC2 instance without problems.
 
Please Check:
 
On the AWS Management Console:
 
Check your EC2 instance's "State Transition Reason" and "State Transition Reason Message" values:

  1. Go to the EC2 Management Console
  2. Click "Instances" on the left navigation bar
  3. Find your EC2 instance in the list of instances and select it.
  4. In the details pane, find the following:


 
 State transition reason: Server.InternalError
 State transition reason message: Client.InternalError: Client error on launch
 
 Check if your root EBS volume is encypted using a KMS key:

  1. Go to the EC2 Management Console
  2. Click "Volumes" on the left navigation bar
  3. Find your root EBS volume in the list of volumes and select it.
  4. In the details pane, find the following:


 
Possible Solution:
 
If the above matches the problem you are facing, then the IAM credentials that Skeddly is using to start your EC2 instance may not have permissions to access the KMS key used to decrypt your root EBS volume.
 
Update the IAM policy for your AWS credentials to add the "kms:CreateGrant" command.
 
Once this command has been added to your permission policy in your IAM role or user, re-run your Skeddly action. The EC2 instance should start correctly.
 

Did this answer your question?