Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Solutions Architect Associate Question: Stopping EC2 with instance store?

  • Question: Stopping EC2 with instance store?

  • BM.

    Member
    September 27, 2020 at 4:04 pm

    Hey Team

    I’ve just started to go through questions from topic based section. I need a clarification for below question. Is 2nd level support engineer cannot stop EC2 instance just because it’s using instance store backed root volume?

    If it’s required to be stopped, how one can stop it?

    In the VPC that you are managing, it has one EC2 instance with its data stored in its root volume. A 2nd level support engineer tried to stop the EC2 instance using the AWS CLI to save costs. However, he received an UnsupportedOperation error as a response.

    Answer: The EC2 instance was using an instance-store-backed root volume hence, the instance cannot be stopped.

  • TutorialsDojo-Support

    Member
    September 28, 2020 at 10:16 am

    Hello BM.,

    Thank you for the feedback.

    Yes, Because the data in an instance store persists only during the lifetime of its associated instance. Take note that the “2nd level support engineer tried to stop the EC2 instance using the AWS CLI”. If it’s required to be stopped, you can use the AWS PORTAL to stop the EC2 instance.

    For more information about different error codes, you can visit this AWS Documentation.

    https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html

    I hope this helps.

    Let us know if you need further assistance. The Tutorials Dojo team is dedicated to helping you pass your AWS exam on your first try!

    Regards,

    Gerome @ Tutorials Dojo

  • BM.

    Member
    September 28, 2020 at 12:14 pm

    Thank you Gerome, your explanation helped me. However, I have follow up questions.

    Stopping EC2 with instance store backed root volume is NOT allowed from CLI. But, can be stopped using an API and/or AWS Portal.

    How these are different (from the viewpoint of AWS Architecture)?

    Why stopping not allowed only from CLI?

  • TutorialsDojo-Support

    Member
    September 29, 2020 at 9:55 am

    Hello BM.

    Thanks for the reply. I will try my best to answer your question.

    You can still stop an instance if you are using Amazon EBS as root volume because EBS volumes are persistent block storage. You just can’t stop an instance store volume using AWS CLI because it is not a persistent storage. Because if you’ve accidentally stopped it using an AWS CLI, all of your data will be gone. An instance store volume only provides temporary block-level storage for your instance. If you really need to stop an instance store volume, you can use the AWS Management Console.

    I hope this helps.

    Let us know if you need further assistance. The Tutorials Dojo team is dedicated to helping you pass your AWS exam on your first try!

    Regards,

    Gerome @ Tutorials Dojo

  • BM.

    Member
    September 29, 2020 at 6:28 pm

    I’m sorry but I’m not getting proper answer here.

    It’s an EC2 with instance stored backed root volume and data would be lost even from Management console. How it’s been taken care in Management console? Why was same precautionary step not there with AWS CLI?

    Just saying that you cannot stop EC2 instance because it’s instance store backed root volume not making much sense.

  • TutorialsDojo-Support

    Member
    September 30, 2020 at 10:12 am

    Hello BM.

    Thanks for the reply.

    Apologies. After reviewing other sections of the Amazon EC2 documentation, you also can’t stop an instance store-backed instances using the AWS Console. The STOP and START action are only supported in an Amazon EBS-backed instance.

    To understand it better, we can take a look at these statements. It says that “You can’t STOP and start an instance store-backed instance.” and if you are using the AWS Console, “If STOP is disabled, either the instance is already stopped or its root device is an instance store volume.” This means that if it is an Instance Store-backed EC2 instance, it does not support the STOP action. You can only TERMINATE it using the Console, CLI, and API.

    For more information, you might want to visit this AWS Documentation.

    https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html

    Also, based on this AWS CLI command reference: “You can’t stop or hibernate instance store-backed instances.”

    https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html

    I hope this helps.

    Regards,

    Gerome @ Tutorials Dojo

  • BM.

    Member
    September 30, 2020 at 11:59 am

    Hope, you are going to update your explanation to the question with these additional details.

    Thanks for taking time to dig deep and get the required information.

    Baswaraj

Viewing 1 - 7 of 7 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now