Code Monkey home page Code Monkey logo

ec2-reporter-rs's Introduction

EC2 and STS Describer

This was my first app using Rust. Learning basic things such as match

I wrote a Python script that does the exact thing with the boto3 module. I timed the execution and here are my results:

$ time python3 app.py

Instances in AWS Account ID 659892707512
        - i-0a30ac4e196e13320
        - i-0ba71e8950cc72ba1
        - i-041bb4a6f937c684d
        - i-0c14e224dc2e4b2f1
        - i-0002b03d5442655fe
        - i-00b7b0d0b2a436711
        - i-0f30f46c105cf5de5
        - i-040cb4273cf6b45ba
        - i-02da56657b24ba33d
        - i-0664f7ca15eb0e54e
        - i-005073bc2f088df72
        - i-0483613735a3bf27c
        - i-0dc01d0ccb6b66b69
        - i-07e79a9c1a54d2065
        - i-08719758514f336a2
        - i-033aafef0d89ff304


python3 app.py  0.30s user 0.11s system 24% cpu 1.657 total

And the timing results from the Rust build

time ../target/release/ec2-reporter-rs 

Instances in AWS Account ID 659892707512
        - i-0a30ac4e196e13320
        - i-0ba71e8950cc72ba1
        - i-041bb4a6f937c684d
        - i-0c14e224dc2e4b2f1
        - i-0002b03d5442655fe
        - i-00b7b0d0b2a436711
        - i-0f30f46c105cf5de5
        - i-040cb4273cf6b45ba
        - i-02da56657b24ba33d
        - i-0664f7ca15eb0e54e
        - i-005073bc2f088df72
        - i-0483613735a3bf27c
        - i-0dc01d0ccb6b66b69
        - i-07e79a9c1a54d2065
        - i-08719758514f336a2
        - i-033aafef0d89ff304


../target/release/ec2-reporter-rs  0.03s user 0.02s system 4% cpu 1.059 total

I know I'm late to the Rust party, and excuse me sounding naive, but holy speed! I'm sold on this language.

Prerequisites

  • AWS credentials set up in your environment variables
  • Rust to compile

Technologies used

  • tokio
  • rusoto

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.