Hey @Suraj, For me its working fine. You need to verify that have you verified aws credentials or not?
This is the code I used for creating an Instance.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=18380074741058948636)
The instance Id was displayed as an output for ec2.create_instance
Here is the instance created.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=8399710697042978940)
Give me some more details on your error so that I can suggest you the solution.