- Newest
- Most votes
- Most comments
Hi,
You should check in CloudTrail to see the EC2 API calls made by your Lambda to start the EC2 instance and see if they succeed or fail.
Best,
Didier
@Didier_Durand thank you very much! I checked the CloudTrail as you guide, and found there's error in CreateGrant: { ... "errorCode": "AccessDenied", "errorMessage": "User: arn:aws:sts::806782514604:assumed-role/a205925-lambda-start-instance-service-role/a205925-start-ec2-on-monday-morning is not authorized to perform: kms:CreateGrant on resource: arn:aws:kms:us-east-1:806782514604:key/8f702ef1-61cb-4ddc-a369-bb71c004955d because no identity-based policy allows the kms:CreateGrant action", } and this kms key helped me to recall that I replaced my EC2's non-encrypted EBS with a new encrypted EBS with this KMS id month ago. after I added my lambda iam role into this KMS key policy, the EC2 instance can be started successfully.
thanks again for your kindly & timely help!
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
Hi zcb, very happy that you found and fixed your problem! thanks for accepting my answer. Didier