Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

AWS cloudformation: Unable to delete a stack

I have created a simple cloudformation

Resources:
  MyNewEC2Instance:
    Type: AWS::EC2::Instance
    Properties:
      ImageId: ami-0b16d80945b1a9c7d
      InstanceType: t2.micro
      SubnetId: subnet-0cc709c048a0ec292
      SecurityGroupIds:
        - sg-09cd08e7081541ada
      KeyName: stg-emr-test

The stack was successfully created. I was able to ssh into the ec2 instance. but now i want to remove this stack. i.e the Ec2 instance

and later tried to delete it. Its failing

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

I saw the error in events
enter image description here

>Solution :

The logged in user has the rights to create, but not terminate/delete.

Make sure that the correct permissions (via AWS IAM) are assoicated to the user to perform any action within the AWS account

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading