Cloudformation template issue

I was trying this lab, I made my own json which matches the template provided for this lab. Provided template is working properly but my template is not, whereas I am only using the authorised resources for the lab. Below is the error that I got for EC2 instance.

API: ec2:RunInstances You are not authorized to perform this operation. Encoded authorization failure message: _ciTmCWuw-fMQ6vlK5Vjp4X0hW6qZ7HDUM26KV7MYTQy9mFpB30CnTAVUq_OlkO8qKRMXOdZRz1GgyYry-Iyby9ai3b9MszoNcIaQxObG6W_7ED1O435ywnd7sHvod449GYb2OnPc3P_Q5zX7pbxS_TsnUyGmDk_cg8iXGTUBzOHFZQ2IYr-7BuVGMko94ZWPK6qOofutJ6szf2oWJtxNgcfVkXnFoCHJOnyxZwYFyzfKI06E-OhTnbB-B_qIdg6Np--mvQCHGiBGvj3jFDMjP-vlwl290FkmrZWY0zA648Oa0UEzWuqnvmAe6GEprxqZOIgv5QQ-uTGI40QZLD867QRD00FcGCnSY3w1p_A4XPjTPDbitPs8NpduFkd41ZOGpfXZ6lKewPgBrL35nDu0NbVn2KRpoKTH_4h8erheGvdHCLnzRDkr-gGqewquqi-7mz2AxdKEjNJm5WHTl6IVd4JNFeGrQgb2F6xLZUZo4SCUOe-N09dcLWkT9WUHeXboXIp1EF-RyzzWnV1G3y4gJp7VZPUOIJqsWI3hPwccEdRxSeEaf-vda9qiIquJc3NRlXz5oOx3baaJh3r88H1w7uOY-5XqXLkaxpk2aVPZYYO6GDaGgV3WKfnFkl9-FpzyL5OOdDBZhTcTOHfRY46Xtj8S6R0e44Ejxkg81SszIOhRk4Tf2EFaH08S-GtTKr-nNSb04BBmyCnh--xQZH2xH_QPKyyCRsILbeXuiWO7ZP2jtZH35UCZrWS7QZlIoaWPzb2NnSt1OEcYfKXul0MITIP5h3WGnSEOsTi8bidv8sRSCNMfS3Id6_ojzIijcKs8UsF
Client Request Token:Console-CreateStack-dda88b91-5cf7-4ea2-a5ab-167ea0ab890b

I tried to decode this message with the help of aws doc but in decoding I also getting the below error.
user_274747_5bb07665f00da.PNG_800.jpg

Please check my template and tell what is the wrong and how to fix the issue.
 
  • post-author-pic
    Michael M
    09-30-2018

    This appears to be an IAM permissions issue in which you do not have the proper permissions. From the error, the missing permission appears to be the directive to run the EC2 instance.


    API: ec2:RunInstances You are not authorized to perform this operation.


    I would check and validate that the account that you are using is allowed to perform the operations that you are attempting. 

  • post-author-pic
    Tinu D
    09-30-2018

     @mmcclaren  Yeah seems to be IAM issue but lab is for launching the EC2 instance with cloudformation and even authors template is working in the same lab and same session. I checked every thing is fine, I mean I am only using the resources that belongs to that lab.


    Kindly check and pleasse sort it out.

Looking For Team Training?

Learn More