I am attempting to create an EC2 instance and get the following error message. How do I decode it ?
Launch Failed
You are not authorized to perform this operation. Encoded authorization failure message: KDmmJmkLKmQhatEqYt...MN3iUtfAa
To decode an authorization status message you can use the AWS Command Line (CLI).
The "UnauthorizedOperation" error indicates that permissions attached to the AWS Identity and Access Management (IAM) role or user trying to perform the operation doesn't have the required permissions to launch EC2 instances.
The UnauthorizedOperation error occurs because either the user or role trying to perform the operation doesn't have permission to describe (or list) EC2 instances. The easy solution is to attach an Inline Policy, similar to the snippet below, giving the user access.
use the following aws cli command from the console or CloudShell:
aws sts decode-authorization-message --encoded-message KDmmJmkLKm...iUtfAa
I use the following command:
aws sts decode-authorization-message --encoded-message 'KDmmJmkLKm...iUtfAa' | sed 's/\\"/"/g' | sed 's/^"//' | sed 's/"$//'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With