DEV Community

GargeeBhatnagar for AWS Community Builders

Posted on

2

Trace EC2 Console Activity in Multiple Code Format Using AWS Console-to-Code

“ I have checked the documents of AWS to trace ec2 console activity. So I found out that it can be possible using aws console-to-code(a feature of ec2 console). Pricing of Amazon EC2 depends on usage of instance and AWS Console-to-Code cost is free of charge. This service feature is available in the N.Virginia region only for now.”

AWS Console-to-Code is a generative AI capability that makes it simple, fast and cost-effective to move from prototyping on the AWS Management Console to deploying production code for your workloads. Customers can now generate code for their console actions in their preferred format. The code helps customers get started and bootstrap their automation pipelines for their workloads tasks.

It makes it easy to convert actions performed in the console to reusable code, in the language of your choice. It automatically captures your actions and workflows and in a few simple clicks, generates code for it.

In this post, you will get to know how to trace ec2 console activity in multiple code format using aws console-to-code. Here I have used an ec2 server with a detailed monitoring option enabled and console-to-code feature to trace and record the ec2 console activity.

Architecture Overview

Image description
The architecture diagram shows the overall deployment architecture with data flow, amazon ec2 and aws console-to-code.

Solution overview

The blog post consists of the following phases:

  1. Launch of EC2 Instance with Detailed Monitoring Enabled
  2. Output of Code and CLI Commands for EC2 Instance Console Activity in Multiple Format

Phase 1: Launch of EC2 Instance with Detailed Monitoring Enabled

  1. Open the ec2 console and launch an ec2 instance with default parameters. Also enable detailed monitoring option.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 2: Output of Code and CLI Commands for EC2 Instance Console Activity in Multiple Format

  1. The code can be used for the automation process for launching the same parameter instance again in other environments.

Image description

Image description

Image description

Image description

Image description

Clean-up

Delete EC2 Instance.

Pricing

I review the pricing and estimated cost of this example.

Cost of EC2 Instance = $0.09

Cost of AWS Console-to-code = $0.0

Total Cost = $(0.09 + 0.0) = $0.09

Summary

In this post, I showed “how to trace ec2 console activity in multiple code format using aws console-to-code”.

For more details on AWS Console-to-code, Checkout Get started AWS Console-to-code, open the AWS Console-to-code console. To learn more, read the AWS Console-to-code documentation.

Thanks for reading!

Connect with me: Linkedin
Image description

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Create a simple OTP system with AWS Serverless cover image

Create a simple OTP system with AWS Serverless

Implement a One Time Password (OTP) system with AWS Serverless services including Lambda, API Gateway, DynamoDB, Simple Email Service (SES), and Amplify Web Hosting using VueJS for the frontend.

Read full post

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay