paint-brush
Generative AI: Can we Accelerate Infrastructure as Code With Amazon Q?by@karthikrajashekaran
974 reads
974 reads

Generative AI: Can we Accelerate Infrastructure as Code With Amazon Q?

by Karthik RajashekaranMay 17th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Generative AI is not intended to replace the workforce or substitute for human intelligence. Instead, it serves as a means of enhancing our decision-making abilities by offering proposed solutions. In the age of generative AI do you want to reinvent the wheel?
featured image - Generative AI: Can we Accelerate Infrastructure as Code With Amazon Q?
Karthik Rajashekaran HackerNoon profile picture

Since the emergence of generative AI, our work has undergone a significant transformation, and we need to adapt to this change. In the past, we could spend countless hours performing complex tasks to achieve a particular outcome. However, with generative AI tools, somebody on the other side can complete the same task in less time.


Generative AI is not intended to replace the workforce or substitute for human intelligence. Instead, it serves as a means of enhancing our decision-making abilities by offering proposed solutions.


Welcome to the era of generative AI!

Amazon Q

This tool is a big player in the software development industry and has been trained using billions of lines of code, using the proposed code can help us make better decisions and boost our productivity, allowing us to save time and achieve great results. This code companion supports a set of languages such as:


  • Python
  • Java
  • Java script
  • Typescript
  • C #
  • and for code completion:
  • Go
  • C++
  • Shell
  • Kotlin
  • SQL
  • and for the most-supported languages in Infrastructure as Code (IaC) :
  • YAML (AWS cloud formation)
  • JSON (AWS cloud formation)
  • HCL (Terraform)
  • CDK (Typescript, Python)
  • Is the AI coding companion worth using for network engineers and developers?

Infrastructure as code (IaC)

  • IaC is a ubiquitous topic in the tech industry. It's mentioned in conferences, meetups, and online blogs.
  • thanks to the managing and provisioning of infrastructure through code instead of through manual processes, developers, and network engineers can work effectively and deliver high-quality services anytime wherever they are by collaborating easily for better results.

The developer and network engineer's dilemma

  • We all have industry-specific skills, but mastering everything in tech is difficult. Excitement and concerns surround the potential of AI.
  • The security concerns associated with AI arise because not all developers possess the security skills required for networking engineering or software development.
  • Network engineers may accidentally deploy vulnerable scripts that hackers can exploit. Developers can create apps to manage infrastructures, but if they do not follow a security-by-design approach in their software development lifecycle, their products can pose significant security concerns. Companies relying on such products may suffer reputational damage and even go bankrupt due to security breaches.
  • Amazon Q is a huge opportunity for network engineers and developers in the generative AI age.

Where the acceleration will happen

  • Network engineers and developers can improve their productivity by leveraging existing solutions (scripts) rather than reinventing the wheel.
  • the scanning provided by Q helps detect vulnerable code. Network engineers will save time by automating infrastructure deployment.
  • Q is an AI companion for junior engineers and developers. It accelerates their learning and helps with tasks they may find challenging.
  • Q has great potential for troubleshooting, as it is trained on billions of lines of code, surpassing expectations.

A day with Amazon Q

As a cloud engineer, I wanted to ask Q some questions for the first time as a user, here they are

I asked Q what is Elastic Kubernetes Services (EKS) and here is the answer!


Amazon Q explaining EKS


The answer is synthetized and gives some links to the documentation, with such experience we can improve skills better and accelerate infrastructure as code with a wealth of knowledge at our fingertips.

Explaining a terraform script

Asking Amazon Q to explain a terraform script

Amazon Q provides a detailed answer

Amazon Q explained the terraform script with details and documentation to AWS, with such experience, it’s easy to understand some scripts quickly and we can gain more time.

Asking for secure coding practices

The script is a snippet to provision an EC2 instance, the goal is to ask Q secure coding practices before provisioning the instance.

Asking Amazon Q to provide secure coding practices

Amazon Q provides secure coding practices

Such experience allows developers and network engineers to improve the script before it goes into production.

Conclusion

In the era of generative AI, we have the opportunity to improve our learning and achieve greater results. Those who insist on reinventing the wheel cannot keep pace with teams that prioritize agility. Additionally, working with infrastructure as code is challenging and demands skilled teams to maintain high-quality infrastructures.


With AI, we have an excellent opportunity to speed up infrastructure as code. We don't need to know everything; the AI will handle the rest!