Skip to content

AWS bytes

  • Cheat Sheets
  • Concepts
    • Show All
    • S3 Concepts
  • How-To Guides
    • Show all
    • EC2
    • EBS
    • S3
    • Redshift
    • IAM
    • SQS
    • CloudWatch
    • Billing
  • CLI Guides
  • Contact Us
  • Tutorials
  • Interview Questions
  • Postgresql

Category: EC2

EC2

How to get the Instance ID of an EC2 Instance from within the Instance

Run the below command to view the instance-id from within an EC2 Instance. wget -q -O – http://169.254.169.254/latest/meta-data/instance-id

Continue reading
EC2 / How-To Guides

How to enable detailed monitoring on an EC2 Instance from AWS CLI

Run the below command to enabled detailed monitoring on a running EC2 Instance aws ec2 monitor-instances –instance-ids INSTANCEID Disable detailed

Continue reading
EC2 / How-To Guides

How to enable enhanced networking on an EC2 Instance from AWS CLI

Step1: Stop the EC2 Instance: aws ec2 stop-instances –instance-ids INSTANCEID Step2: Set sriov-net-support to ‘simple’. aws ec2 modify-instance-attribute –instance-id INSTANCEID

Continue reading
EC2 / How-To Guides

How to modify “Delete on Termination” attribute of an EC2 Instance from AWS CLI

By default the ‘DeleteOnTermination’ attribute of an EBS backed EC2 Instance is ‘True’. Root volume can be preserved on termination

Continue reading
EC2 / How-To Guides

How to cancel a spot instance request from AWS CLI

Use the below command to cancel a spot instance request where REQUESTID is the request id of the spot instance.

Continue reading
EC2 / How-To Guides

How to list all running EC2 spot instances

You can use one of the below commands to list all running spot instances. aws ec2 describe-instances –filters “Name=instance-lifecycle,Values=spot” aws

Continue reading
EC2 / How-To Guides

How to change EC2 Instance type from AWS CLI

Step1: Stop the Instance aws ec2 stop-instances –instance-ids INSTANCEID Step2: Change Instance type. I’ve used r5.xlarge in the below example.

Continue reading
EC2 / How-To Guides

How to Stop, Start, Reboot, Terminate EC2 Instances from AWS CLI

Command to stop an EC2 Instance: aws ec2 stop-instances –instance-ids INSTANCEID Command to start an EC2 Instance: aws ec2 start-instances

Continue reading
EC2 / How-To Guides

How to create an AMI of an EC2 Instance from AWS CLI

Use the below command to create AMI of an EC2 Instance. Replace instanceid and name values accordingly. aws ec2 create-image

Continue reading
EC2 / How-To Guides

How to change EC2 Instance to an ENA supported Instance type

Step1: Verify if the ENA driver is installed on the EC2 Instance by running the modinfo command as below: modinfo

Continue reading

Posts pagination

1 2 3 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.