Enséñale a tu agente a usar AWS

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

Enséñale a tu agente a usar AWS

Cada día que pasa estamos sorprendidos por lo capaces que los agentes de código se han convertido. Muchos incluso predicen que ya no necesitamos ingenieros o ingenieras en el futuro y que se viene un apocalipsis donde las computadoras se van a rebelar contra nosotros y contra aquellos que no le decían por favor y gracias a sus agentes después de terminar una tarea. Nada más alejado de la realidad.

Every day that passes, we are surprised by how capable code agents have become. Many even predict that we will no longer need engineers in the future and that an apocalypse is coming where computers will rebel against us and against those who didn’t say “please” and “thank you” to their agents after finishing a task. Nothing could be further from the truth.

Cuando le preguntas algo a tu agente seguramente has notado que se inventa cosas que ni siquiera existen o que te da una solución que quizás no es la adecuada. Y es que el agente no tiene la culpa en sí de que no pueda darte la última versión de la API de una librería porque ellos tienen un corte en la información. Es decir, quedan congelados en el tiempo.

When you ask your agent something, you have surely noticed that it makes things up that don’t even exist or gives you a solution that might not be the right one. The agent isn’t really to blame for not being able to give you the latest version of a library’s API because they have a knowledge cutoff. In other words, they remain frozen in time.

Por supuesto, existen herramientas que le ayudan al agente a encontrar información actualizada y con eso puede ponerle un parche a lo que le falta de información y completar la tarea. Hemos visto cómo pasamos de MCPs a skills y luego a un mix entre ellas. Y es por eso que hoy quiero platicarte acerca de una herramienta que le va a ayudar a tu agente a hacer las cosas de la forma correcta cuando trabajas con AWS.

Of course, there are tools that help the agent find updated information, and with that, it can patch what it lacks in information and complete the task. We have seen how we went from MCPs to skills and then to a mix of both. And that is why today I want to tell you about a tool that will help your agent do things the right way when you work with AWS.

AWS no tiene que ser complicado. Sí… yo sé que alguien te dijo que usar AWS es difícil o que necesitas configurar demasiadas cosas. Pero algo que quizás nadie te ha dicho todavía es que mejoramos la plataforma para que puedas construir de manera más sencilla con AWS sin que tengas que gastar tantas horas configurando tu cuenta antes de empezar siquiera a construir.

AWS doesn’t have to be complicated. Yes… I know someone told you that using AWS is difficult or that you need to configure too many things. But something that perhaps no one has told you yet is that we improved the platform so you can build more easily with AWS without having to spend so many hours configuring your account before you even start building.

La nueva experiencia de AWS te permite comenzar de manera más sencilla y sin tanto rollo. Aquí te dejo un blog post adicional por si quieres leer más al respecto. Uno de los principales cambios para personas como tú y como yo que les gusta empezar rápido y sin tanto trámite es la forma en que puedes conectar tus agentes de IA para que trabajen por ti y te ayuden a construir en AWS.

The new AWS experience allows you to start more simply and without so much hassle. Here is an additional blog post in case you want to read more about it. One of the main changes for people like you and me who like to start quickly and without so much paperwork is the way you can connect your AI agents to work for you and help you build on AWS.

¿Qué hace esta herramienta? Como te dije antes, los agentes únicamente aprenden hasta cierta fecha y lo que hace esta herramienta es que te permite utilizar herramientas que quizás ya son familiares para ti como MCP y los Agent Skills para brindarle conocimiento a tu agente de cómo debe trabajarse en AWS de la forma CORRECTA, utilizando las mejores prácticas y aprovechando las bondades de la nueva experiencia.

What does this tool do? As I told you before, agents only learn up to a certain date, and what this tool does is allow you to use tools that might already be familiar to you, like MCP and Agent Skills, to provide your agent with knowledge on how to work in AWS the RIGHT way, using best practices and taking advantage of the benefits of the new experience.

Si quieres que tu agente tenga estas habilidades solo tenemos que realizar unas configuraciones. Pero lo bueno es que podemos copiar un prompt y pegarlo en nuestro agente para que haga el trabajo por nosotros. Sencillo, ¿no? Vamos a instalarlo.

If you want your agent to have these skills, we just need to perform a few configurations. But the good thing is that we can copy a prompt and paste it into our agent so it does the work for us. Simple, right? Let’s install it.

Iniciemos sesión en nuestra cuenta. Si no tienes una cuenta todavía, te dejo un recurso para que crees tu cuenta. ¡Ahora puedes iniciar sesión hasta con GitHub! Copiamos el prompt que aparece en nuestra pantalla: El prompt le dice a nuestros agentes que deben configurar el Agent Toolkit. Y además, les da instrucciones para que usen la nueva experiencia de AWS.

Let’s log in to our account. If you don’t have an account yet, I’ll leave you a resource to create your account. Now you can even log in with GitHub! We copy the prompt that appears on our screen: The prompt tells our agents that they must configure the Agent Toolkit. And it also gives them instructions to use the new AWS experience.

Pegamos el prompt en nuestro editor y esperamos a que el agente termine. Solo necesitaremos ir dando permisos, ya que lo que hará es instalar la AWS CLI en caso de que no la tengamos, o la actualizará y muchas otras cosas. Después de pegar el prompt empieza con esto. Verificando las herramientas que necesita: Ya aquí mi agente verificó todo lo que necesita para empezar con la configuración.

We paste the prompt into our editor and wait for the agent to finish. We will only need to grant permissions, as what it will do is install the AWS CLI in case we don’t have it, or update it, among many other things. After pasting the prompt, it starts with this. Verifying the tools it needs: My agent has already verified everything it needs to start with the configuration.

En mi caso me pidió que le diera un nombre de perfil. Así que le puedo decir que use el default o darle un nombre. Yo elijo el default. Esto sirve por si quieres trabajar en diferentes proyectos. Le dices al agente que proyecto tiene que usar y utilizará ese perfil.

In my case, it asked me to give it a profile name. So I can tell it to use the default or give it a name. I choose the default. This is useful if you want to work on different projects. You tell the agent which project to use, and it will use that profile.

Una vez definido el perfil me pide que inicie sesión. Solo necesitas aws login y se abrirá una ventana en tu navegador para terminar de hacer login y seleccionar el proyecto al que quieras acceder. En mi caso yo estoy colaborando en un proyecto con un compañero por eso se ven dos tarjetas para elegir. Una que en particular dice: Owned by Ramsés. Si quieres saber más acerca de los proyectos, checa este link, ya que es una ¡nueva feature!

Once the profile is defined, it asks me to log in. You just need aws login, and a window will open in your browser to finish logging in and select the project you want to access. In my case, I am collaborating on a project with a colleague, which is why two cards appear to choose from. One in particular says: “Owned by Ramsés.” If you want to know more about projects, check this link, as it is a new feature!

Seleccionamos la opción que necesitemos y vamos a ver la siguiente pantalla: Después de que haya seleccionado el proyecto se crean credenciales temporales para que pueda acceder a mi cuenta desde la terminal (este acceso lo usará el agente. Ojo, el agente nunca tiene acceso a mi token o contraseña).

We select the option we need and we will see the following screen: After I have selected the project, temporary credentials are created so that it can access my account from the terminal (the agent will use this access. Note: the agent never has access to my token or password).

Ya que tenemos el acceso listo, el agente configura las Agent Skills que contienen buenas prácticas para trabajar con AWS. Esto le dará a nuestro agente instrucciones adicionales para que sepa qué hacer en ciertos momentos y que no invente cosas. Después instalará las nuevas reglas e instrucciones para aprovechar al máximo la nueva experiencia de AWS. Esto agregará las instrucciones a las guías de tu agente. En mi caso, estoy usando Kiro, así que configurará esas instrucciones en los Steering Files.

Once we have the access ready, the agent configures the Agent Skills that contain best practices for working with AWS. This will give our agent additional instructions so it knows what to do at certain times and doesn’t make things up. Then it will install the new rules and instructions to make the most of the new AWS experience. This will add the instructions to your agent’s guides. In my case, I am using Kiro, so it will configure those instructions in the Steering Files.

Al finalizar, el agente tiene todas las herramientas necesarias para trabajar con nuestra cuenta. Incluso a mí me aparece que puedo pedirle una nueva webapp. Algo que también es útil es que le podemos preguntar acerca de la nueva experiencia de AWS. Otra cosa que está genial en la nueva experiencia son los límites de gastos, que también nos los menciona.

Upon finishing, the agent has all the necessary tools to work with our account. It even shows me that I can ask it for a new webapp. Something else that is useful is that we can ask it about the new AWS experience. Another thing that is great in the new experience is the spending limits, which it also mentions to us.

Empecemos a crear. Ya que tenemos esto podemos crear lo que nosotros nos imaginemos y desplegarlo de inmediato en nuestra cuenta. Ya no tenemos que desperdiciar tanto tiempo configurando. Ahora podemos aprovechar ese tiempo construyendo, ya que AWS se encarga de darnos una cuenta con configuraciones sensatas por default para que no nos preocupemos.

Let’s start creating. Since we have this, we can create whatever we imagine and deploy it immediately to our account. We no longer have to waste so much time configuring. Now we can use that time building, since AWS takes care of giving us an account with sensible default configurations so we don’t have to worry.

Recuerda: cada vez que vayas a trabajar con AWS, únicamente escribe aws login para crear las credenciales temporales y que tu agente pueda desplegar tus recursos. ¡Ojo! No te olvides revisar cada acción que el agente tome por ti para siempre estar seguro de lo que estás haciendo 🙂. ¿Qué es lo primero que vas a crear con esta nueva experiencia? Deja tu comentario.

Remember: every time you are going to work with AWS, just type aws login to create the temporary credentials so your agent can deploy your resources. Note! Don’t forget to review every action the agent takes for you to always be sure of what you are doing 🙂. What is the first thing you are going to create with this new experience? Leave your comment.