Turn Your Vehicle Into a Smart Earning Asset

While you’re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

🚗 You set the rental price
🔐 Secure bookings with verified renters
📍 Track your vehicle with GPS integration
💰 Start earning within 48 hours

Join as a Partner Today

It’s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

AWS Tutorials: AWS CodeBuild – Buildspec code for creating AMI from running instances


version: 0.2

phases:
  build:
    commands:
      - |
        #!/bin/bash

		# Author - Rajesh Kumar
		
        # Set AWS region
        export AWS_DEFAULT_REGION=us-east-1

        # Get running all instance IDs
        instance_ids=$(aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" "Name=tag:environment,Values=uat" --query 'Reservations[].Instances[].InstanceId' --output text)

        echo "List of Instances: $instance_ids"

        # Create AMIs from instance IDs
        for instance_id in $instance_ids; do
          instance_name=$(aws ec2 describe-instances --instance-ids $instance_id --query 'Reservations[].Instances[].Tags[?Key==`Name`].Value' --output text)
          timestamp=$(date +%Y-%m-%d-%H-%M-%S)
          ami_name="$instance_name-$timestamp"
          aws ec2 create-image --instance-id $instance_id --name "$ami_name" --no-reboot
        done
Code language: PHP (php)

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "EC2Read",
            "Effect": "Allow",
            "Action": [
                "ec2:DescribeInstances",
                "ec2:DescribeImages",
                "ec2:CreateImage"
            ],
            "Resource": "*"
        }
    ]
}
Code language: JSON / JSON with Comments (json)

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x