Conf42 Platform Engineering 2024 - Online

- premiere 5PM GMT

Crafting a Secure and Scalable Generative AI Solution with AWS Serverless and Amazon Bedrock

Video size:

Abstract

Empower platform engineers with a secure, scalable, and AI-driven assistant built on AWS Serverless and Amazon Bedrock. This talk will showcase how the Employee Productivity GenAI Assistant boosts productivity by streamlining tasks with customizable AI models. Learn how this tool offers a pay-as-you-go, fully managed solution, enhancing your workflow without compromising on security or scalability. Perfect for platform engineers looking to leverage AI to optimize their daily operations.

Summary

Transcript

This transcript was autogenerated. To make changes, submit a PR.
Thanks for joining me. My name is Samuel Barufi and I'm a Principal Solutions Architect with Amazon Web Services. Today I'll be presenting about how you can craft a secure and scalable generative AI solution using AWS services. My goal is to show some open source code and open source solution that allows you and your platform engineering teams to potentially have your own private solution to expedite with Gen AI. So let's get started. So this is a very common scenario across any road that. It's pretty much uses technology. You're probably spending hours and hours writing repetitive tasks, writing, repetitive code snippets, emails to your manager, maybe reports to your leadership, creating different proposals if you're working on consultancy, and it's a lot of tedious and it's overwhelming, right? The image just illustrate how potentially all of us feel on a normal day, as we a believer and progress on our job duties. but what if we could find solutions that are private, secure, and available for us and our teams to really alleviate the border, the boredom of those repetitive solutions, right? We're all familiar with tools like such, HDBT, Cloud, and perplexity and many other ones that have become very popular in the last two years. so my goal is not to show you a replacement of those tools, but potentially you will find. show you an architecture and a solution that is open source that you can build on top of that and really have full control of your data and security and deploy that on AWS. So because this is platform engineering conference, it's important to set the context a little bit on how potentially a solution like the one I'm about to present could help platform engineer or platform engineering teams. so it's very important that platform engineers focus on. As a catalyst for developer productivity, right? So you want to enable a lot of self servicing. solutions and really reduce operational bottlenecks. generative AI really allows you to become a much more productive developer and platform engineer. You also want to navigate the complex, of modern tech stack. AWS is an example that we have over 200. services and getting in depth and getting to know really then, it takes a lot of effort and Gen AI can help us expedite that learning curve. you also want to balance innovation with stability. We don't just want to move as fast as possible with no stability because they'll probably give us some downturn. that is another goal that you should have, and he wants to, he wanna ensure consistent security and compliance, and that is potentially one of the main points or why potentially you should consider, building a solution for your team that have full control rather than buying something outside. or if you're not comfortable, it's completely up to your choice and you wanna enhance your customers, which are developers. You wanna enhance their experience by using your platform. So with that said, at a very high level, what I'm going to show to you today, both from a solution architecture pattern and a UI is you're going to have a, a place, a UI, or you can input text and images, that, that solution is hosted within your own AWS account with your own security controls. And you have full control about the data and, the authorization, who authenticated it, who has permissions of the solution. Once the, that data is processed, you're going to send to some AWS services that we're going to talk today, like Bedrock, where it allows you to. Call large language models or multimodality models, on a pay as you go per token input and output token. So you're going to have that processing and generation for you, and then you are going to have the polished content, right? So what I'm going to do next, I will show you some capabilities of the solution that is that I have open source as part of the AWS samples GitHub repository. And, just keep in mind, this is not a, recommendation for you to just use the solution that is available on GitHub as it is, but also for you to look at it and build on top of that. Also look at the solution as an architecture pattern for potentially building applications for your teams, for your platform engineer teams with a similar capability, because it does solve a lot of the problems that generative AI have posed to us in the last couple of years. So let's just look what this solution could look like. So the idea of this solution is you're going to have a UI. the UI is going to be authenticated. So you're going to be able to create users and each users is going to have its own secure sandbox environment. In this case, what on the demo here, you have a playground platform, which is a very simple place where you can input some text. You can select models. Right now, the solution supports cloud models for Entropic. through AWS Bedrock. So in this demo, you can see that it has a couple of things that are really important. First of them, first of them is, you are authenticated into the solution. Second is it supports the streaming of your response, right? So you're going to send a prompt like right upon about New York, that response is going to be streaming from, AWS account into the UI here, and then you are able to manipulate, copy and do whatever you want, right? That is really important. So that is just one of the capabilities is Playground, but Playground, there is nothing new. It's just a way for you to maybe do some testing and play around. The really, important benefit of this UI, if you think about it, or this solution is the capability of create templates. Templates are nothing more than a way for you to create prompts. So if you're familiar with generative AI, it's really important that you do a lot of prompt engineering for whatever you're trying to do. So in the example on the screen, let's say you want to create a prompt that is really good at Creating product names, right? I know it's a simplistic example, but you can think about anything here, right? So what the tool allows you to do is to create templates that can be reused after the fact by you. Or if you decide by other people, you can see that the templates allows you to have a visibility of public and private. What the public and private means is public means only people. They are authenticated to your deployed solution who have access, but every user within that deployment will have access to it, the user needs to be authenticated. A private visibility means only you as the creator will be able to consume that. and you can create prompts. You are going to allow you to input, a model selection that you have, curated that prompt for. A system prompt giving a specific instruction and finally the user data. If you see here on the user data and putting. the input data between, curly brackets and the dollar sign, that is just an automatic variable that when you're going to be able to consume the template, I'm going to show in a moment, when you consume the template, whatever data you're going to be providing is going to automatically replace that variable for you. And you have easy searchability. as a user now, you can either consume already curated or created templates from your team, or you can create your own templates or make those templates available for your team by setting as public here. But it's important to highlight public just doesn't mean that anyone outside the internet will be able to access. It's just within your deployed solution here, users who have authenticated will be able to consume that within this box of authentication. Once you have created the templates, you can go into the activity tab and you are able to select specific, prompts. In this case, I will show you an example that I want to use the product naming pro template. So I want to create names for my product. I select the product template, and then they give a description, right? Descriptions like, Hey, I want you to create a noise canceller, headphone, headless headphone. how do I actually create that? So you'll be able to see that what happens here, he actually sends to AWS and Bedrock, the whole prompt curated with your data, and he provides you with the proper output, and then you can inspect. What is those, what that template, if you're an advanced user can inspect what that template is adding, like the system prompt and what is getting replaced the input data with whatever information, right? and you were able to change those advanced settings of every time you do the inference, right? So now from your teams, these become very interesting because It allows you to have multiple templates that a user can be an export, but it can share the template and that prompt with other people for easy of consumption. Another very important feature of the solution is the capability of providing images as an input. All those core three models that the solution is currently using from Entropiq. support what is called the multi modality, meaning it supports text and also image as inputs. So in this case, I have uploaded a headphone picture and I've said, could you please describe the image uploaded in details to me? And you can see it describes in detail. Now I'm using the playground here, but this vision capability can also be added into the template. I can have a template that has curated prompt and once I consume the template on the activity, I can input images that enhance my data, input, to the system itself, right? so far you were able to see how you can easily check the playground, how you can create templates, which are curated prompts, how you can consume those templates. a common thing that these generative AI solutions provide is the capability of using a chat conversation, right? So the tool also provides you with the ability to use chat. And as you might expect, the chat allows you to also select templates. So you can keep a history, you can keep the context of your conversation of the first prompt in this example, here in using again, the product naming template. And I've asked with a specific description and it was sent to the model. And I received some, answers back and I can say, the names are good, but could you please come up with five? more different names that are a bit more catchy and are great for marketing, right? And you can see that I will send it again. the context and all of that is being baked already from the back in the backend that we're going to demonstrate in a moment. And if you are an advanced user and you want to choose different temperature or top K or top P, you have that capability. We haven't talked about another capability of this tool, which is the history. Every time you use the playground. the activity, and the activity or templates, that data will be stored on a database that you have control within your AWS account and you can check the history, right? So you have the capability. so far we, I've shown you the capabilities and the end product, but okay, you've seen the capabilities, you've seen, the potential, the benefits of this tool. But you might be asking me right now. how does this work under the hood? What is the architecture that you've put in place in order to make this happen with the streaming, with the authentication and all that, how much does the cost, right? How can you be so sure that it's cost efficient, right? So those are all very good, great. Those are very great questions. And my intent for the next, maybe 15 minutes is to really answer some of those questions to you. So the solution here. So the name of the solution that we have open source, and I'm going to share you with some of the links and some of the calls that you can see the solution aims to, the name of the solution is employee productivity, improve employee productivity with generative AI assistant example. That is the name of the solution. What it aims to do is to automate a lot of the repetitive tasks with AI. And it's all built on AWS serverless services. We're going to talk about that in a moment. And Bedrock. We're also going to talk about Bedrock in a moment if you're not familiar. The benefits is it boosts your productivity. It really streamlines workflows with the reusability of templates. It is scalable because you're going to be able to have one user or 5, 000 users. And the application should scale. With those, growth of users because the serverless capability and it's open source with a very simple deployment that I'm gonna show on the demo, the instructions and on GitHub for you. but remember, this is an architecture partner. It's not a full fledged solution. I'm not here selling the solution as for you to go and deploy in production and say okay, Sam has told me to do this. It's already, this is an architecture pattern that you can look at example, build more features, build new capabilities, change specific settings to meet your customer, your own company demands or requirements and so forth. Let's talk about some of the services that we've used into the solution before I share an architecture diagram. So here are a list of all the services that are going to be used if you deploy the solution on your AWS account. So you can see a list of nine services. so let's just start with a very, I'm not going to, I'm not going to go and explain depth of services. My goal here is just to show at a high level why we are using all these services. So all these services have in mind the idea to be pay as you go. So we are not going to provision any services. You're not going to have any commitments for, months or years of consumption. It's literally pay as you go. So as your growth. If, your usage grow, your cost is going to grow with that and also decrease with that. So because this solution is a fully API driven architecture, we are using Amazon API gateway for all the REST API. So every time you are saving a new template, every time you're trying to retrieve your history, every time you are, sending a new data to the model itself, it's saving that data using REST API. Thanks. But then the second flavor of API gateway, which is a service on AWS is WebSocket. And this is a very important service because on the solution, that the data, every time you send some, requests to the solution, the data is getting streamed back into your UI. And the way this is done is by creating a WebSocket. So each user and each web page that he used, It's gonna create a web socket connection to, API gateway, and then API Gateway Web Socket will actually use a Lambda to call whatever services in this case bedrock in order to retrieve the response that is generated by the larger language models and send back to your, ey. We have S3 here. S3 is used in a couple places. So first it hosts the ui. The UI is built on React. so the UI, it's stored there. And then it's also used every time you upload new images for the multimodality capability. It's using S3 to store those objects, those files for you. Cognito is our IDP service. So Cognito is where you have the capability of signing into the system, having a password authentication and authorization. And Cognito integrates really heavily with the REST API and WebSocket API. So every time you're trying to call those APIs, you need to be authenticated and provide a token to it. And all the code that I'm going to share with you that is available open source on the AWS Samples GitHub have that description and capability. Sean ddb here is the database of choice. Is a NoSQL database available for Pay As You Go? super scalable solution on AWS DB here is storing everything. Is it storing your chats? Is storing your, templates, is storing your history. everything that there is, data that is being stored. MDB is that, that, that database. And because this mdb. by default is encrypted and it's going to be deployed on your own account. You have full control of the data premises, and how you decide to encrypt, or, your, maybe you just want to keep X amount of, you just want to keep data for X amount of days. You have that capability as well. Two, three more services here. we have CloudFront. I'm just going to jump on CloudFront, which is the content delivered network capability to host our UI. So the UI is going to be hosted on S3 and CloudFront to make that available across multiple servers around the world that AWS has access. So when your users access those, it makes it very easy to consume. It also does the HTTPS encryption on your front end. WAF then is integrated with CloudFront and you see an architecture diagram to then, create, security rules for avoiding, DDoS attacks, SQL injection attacks, cross site scripts attacking, maybe you want to limit, the access into your system for specific countries or maybe block some countries, WAF gives you the capability. And then finally, it's Bedrock. And I have a couple of slides for Bedrock because really this is the generative AI solution that allows, this whole architecture to be put in place and be super, useful. So Bedrock is the easiest way to build and scale generative AI applications with foundational models on AWS. Bedrock is a very feature rich solution for this specific use case. And this architecture that I'm showing to you is we are using Bedrock to inference large language models, foundational models through a single API. So the solutions by now only supports entropic cloud and cloud models. Bedrock has support for, dozens of different large language models from different providers. And you can use a single API that you literally can test the prompt and the data for whatever model that is available in Bedrock and receive the response, right? So that's what we're using, the capabilities and the benefits of using Bedrock is if you're familiar, the amount of computational that takes for, For any person to host a large language model, it's quite significant. So what we are doing here is we are letting AWS manage all that compute and you have a pay as you go approach, meaning you're every time you send an inference to Bedrock, you're going to be paying on different models. We have different costs and that can be checked into the AWS, pricing page for Bedrock, and you're going to be paying for the input tokens and the output tokens. What are the benefits? First, you don't need to pay for all the computational, GPUs to be up and running 24 7, but also it allows you to have a pay as you go. So if today you have a lot of users consuming this platform, you're going to pay for whatever they consume. if in the next month you don't have anything, you're not going to pay anything for bedrock. No data is stored. No data is used for training any models on bedrock that is documented and is, is a guarantee that AWS makes all the data that you sent are your data. We don't, AWS doesn't store and AWS doesn't use for training any future models. So it's full control, private privacy by default, and it doesn't use any of the data moving forward. the solution itself uses a combination of different models from Bedrock, but mostly focusing on models that are from Entropic. Entropic is one of the leading research labs that AWS and Amazon have invested and partnered very heavily, and it's available on portal. On Bedrock, they have this quadtree. model family in this case currently. And by the way, depending when you're watching this presentation, it might have changed because new models are coming up very often, but as we speak on, and recording on August 22nd, four models of the COD3 family are available on Bedrock, which the most powerful one is COD3. 5 Sonnet, which is one of the best models in the industry. Not just the best model for Entropic. all of them have vision capability. Each of these models are going to have different pricing. Opus being the most expensive one, the biggest one, but it's still on the CoD 3 family. And of course CoD 3. 5 is the most intelligent because it's on the 3. 5. Entropic has already announced that they're going to be coming up with 3. 5 Haiku, which is the smallest model and 3. 5 Opus, which is still going to be the largest model. Which you probably expect to be one of the most intelligent models, but that is not available there The tool allows you to pick those models, right? and if you remember from my demo, you can just look back, you can just pick whatever model you want from Cloud and you know depending on The prompt and the capabilities you require, you might choose to go with 3. 5 sonnet or cloud free hyco, because that is what actually going to, provides you with the biggest, intelligence, that pricing needs to be kept in mind. So this is the full architecture of the solution. Finally, what you can see here is you have on the top. Hopefully you can see here, let me just move. Oh, let's sorry. Let's move my mouse. I don't know if you see my mouse. I don't think you can see my mouse and I apologize. but what I meant to, oh, you can see my mouse here. if you see here on the top, the web application flower, the cloud front and S3, by the way, I'm looking on the side because that's where I have my monitor. that's where the UI is hosted, right? So the UI is a React application. that is just using MD framework and components. and you can look at the code, you can change the code, you can create your own UI. But this architecture is using React, we are just creating the static files, starting the static files, HTML, CSS, and JavaScript on S3, and then having CloudFront creating an endpoint for us that is distributed across the AWS Edge locations for CloudFront, and putting in WAF to make that application secure. Then everything else here where you see the REST API calls. So every time, for example, you need to create a template or you need to save a history or you need to retrieve the history, the way it works, you have API Gateway. And by the way, I didn't talk about Lambda, I just realized, but API Gateway integrates very easily with Lambda. Lambda is the serverless compute function as a service solution on AWS. It allows you to write a small code. for whatever language. In this case, there are, in this architecture, there are lambda functions being written in Python, lambda functions being written in JavaScript. You can choose for other languages. So every time you invoke an API behind the scenes API gate, we invoke the lambda might be running for like maybe four, 400 milliseconds, 700 milliseconds. You're only going to pay for whatever milliseconds that is running. let's say you are creating a new template. The way it works is. You call the REST API, you need to be authenticated. So you can see Cognito here is doing an authentication for you. If you're not authenticated, you cannot, call, that API. You might be, you, if you try to call the API, you're going to get a. deny requests, because that is by default being done by API gateway and API gateway has integration with Cognito by default, right? So all that layer of authentication is being done on the Cognito and API gateway, which is something that AWS provides to you. but the other capability, which is really important one is on the bottom here, and you can see where you have API gateway app socket. So when you log in into the UI and you send any type of request into the solution itself, the way it works, the user is going to create a WebSocket into the API gateway. Then the user is going to start using that connection of WebSocket to send the request. That request will go to a Lambda. The Lambda will therefore call Bedrock with whatever model you define on the UI. Bedrock will process and do the inference and charge you by input and output tokens. That is going to be sent back, to the API Gateway WebSocket. And then API Gateway WebSocket will know which socket connection that user requested the data. You put that back in and send to the UI. All of that is encrypted end to end on the WebSocket connection. And if you have any images from the multimodality capability, you're going to upload them into S3. At the end of the time of inference, this Lambda Python streaming is going to download from S3 and send to Bedrock. So that is the capabilities and how you configure, this application. And I'm going to show you in a moment that this is all done with this, a few commands should easily deploy this end to end solution. So let me talk about costs, right? And so it's important to highlight that this cost is public available, on the back on the AWS pricing page, but it might change, right? This cost is also based on the U. S. East 1 region. Different regions might have different prices for services. So you might need to take in consideration if you plan to deploy this in another region. But, how I decided to provide you with a, highlight of how much this solution would estimate and by the way, it's just an estimate. There is some variables that is very hard to estimate is, let's think that your deployment to have 50 users and each of those 50 users, we use this tool around five times a day. And every time they use the tool, they're going to input around 500 input tokens and 200 output tokens, right? This is just an, a scenario I'm trying to put together. So you understand what you can see here is. The other AWS services cost is always going to remain the same. This is the WAF, this is the Dynadb, this is API gateway. This is always going to remain the same for this estimate, but the more users and the more consumption you have, this might increase a little bit more, right? so just keep that in mind because, but it's not going to be exponentially more, it depends on how you're doing. If you go to the GitHub page and I'm going to share, you can look at the pricing calculator that I've shared, and then you can just add your, specific inputs or even email me if you have any questions and I'm happy to help you do the calculation. But what you can see here that depending on the model you use, and by the way, you can use a combination of models, but I'm just putting in these specific, the specific slide. Let's say if you only use core 3 haiku for all those three, you 50 users and five times a day, the whole, the total cost of application. It's literally only 19. 32, which is much more cost efficient than, for example, a subscription for one of these GNI chat solutions, that are out there, which normally would cost 20 plus dollars, right? Plus you have full access, full control of your data on your own AWS account. You can choose different models. So for example, I would highly recommend using quad 3. 5 sonnet, which is the most intelligent model. And you can see that it equates to 50 and 20 cents, 26 cents a month, right? Country Opus, of course, going to be the most expensive because It's, it's the largest model that Entropic has made available, but it's one of the most impressive as one, especially when Cloud 3. 5 Opus is going to be made available. So that is what I wanted to show to you about cost. but in terms of. In terms of what can you do now? So here you can just click on that button off the open source repository. You are able to just click on that button, navigate. I'm going to show in a moment, I have a demo. It's not going to be a demo. It's just going to be show. it's going to be a demo of the tool and show you the GitHub page, but by clicking the GitHub page or scanning the secure code, you're going to see all the details that I've shown to you today. Even the GIFs that are here for the. The tool itself, how do you deploy, how do you make changes, the architecture diagram, it's all made available. So it's a very simple and easy to deploy on your AWS account. It's going to have the benefits of pay as you go. It's going to be secure and deployed on your own AWS account. So let's jump into a demo now and then we'll finalize the presentation. Awesome. just very quickly, I just want to show you the GitHub. So if you go to the GitHub page, feel free to start the GitHub, project if you like. but if you scroll down, you're going to see a lot of, information. So you can see, for example, the summary, we talked about the benefits that I've presented to you today talks about, why we've created the solution, why it's using, why it's useful as an architecture pattern, but potentially as a starting place, for you and your internal teams, and they scroll down, you can see the architecture diagram that are presented to you. so you can look at these, please feel free to ask questions, reach out if you want. and then it talks about the code itself, the structure of the GitHub repository, right? So we have a folder for the backend where all the information for the backend is stored. we are using SAM, serverless application model, framework to actually deploy this whole solution. Behind the scenes, it's just file formation, It just deploys a CloudFormation for you and it created all those resources. and then you have the front end folder. The front end folder is just, literally the React application that gets deployed. but because we wanted to make it easier for people to deploy, we have created this shell script called deploy. sh. And I'll show you instructions how you can easily deploy this into your account. The deploy. sh not only deploys the back end, but also deploys the front end. And that also So if you want, it deploys the default templates, and the default prompt templates that comes with the solution. So if I look at the templates that are available on the default templates, adjacent, if you're not interested in that, or if you want to add, you can just change and modify the specific format of this Jason and rerun the deployment and you create the templates that are there. you can see some of the requisites that it requires for you to deploy this solution if you're running locally. So you need like Python, you need AWS SAN, you need a Linux environment. Or if you're on Windows, you should have Windows sub Linux system. You need PyJS and you need JQ. And of course you need to enable the Bedrock models on your AWS account. Here it goes into instructions on how to deploy locally. You can see that we have the deploy a sage script that you can set the regions, you can deploy this, whatever region you wanna make. If you want to be sure that you have a good solution, we want to make sure the best solution is. This is the solution that I used for my everything. You can go to Xcode. command with just the region And email, by the way, this email is required because this is going to be the admin user that is going to be used for your application. you use just the single command and the simple command you run and pretty much deploy everything front end, back end, log, create a user for you, create a temporary password, and upload the templates as well. But if you just want to deploy the backend or you just want to deploy the front end, you can use these commands, but you can also use these commands to delete. If you want to delete everything, you just run the deploy dash delete, and you'll delete all that for you. So it goes into details here. You can also use cloud shell to deploy this. So if you don't want to deploy locally, you can just run cloud shell. And if you're not familiar, what cloud shell is literally just go here and you click on this button. this is culture. So this is called shell. It's just a Linux environment that you have access for free on AWS and you can use this Linux environment following these specific instructions. Please do follow these specific instructions to use as the deployment. So you can use cloud shell and so forth. So if we scroll down, you can also use cloud nine if you want, which is just an idea available in AWS to deploy. So you have instruction for that. Once he finalizes, you should see a screenshot similar to this. That has been deployed successfully. Once it has been deployed successfully, you're going to give the URL from the cloud front and then your user and then your password, right? And then once you log in for the first time, you ask you to change that. The other thing that it shows you is the gifts. So you can see all the gifts that I've presented. If you want to showcase your team members or tests, you can see all the gifts that I presented to you are available here. And then you have an estimate monthly cost. And remember when I talk about the pricing for bedrock, you can click here and you can look at the different model providers. For example, if you go to entropic models, you can see each price for a thousand input tokens and a thousand output tokens. It's available there. And then finally, the last thing I want to show you on cost. So let me scroll down. We have this pricing page here. So if you click on this calculator, You'll be able to see this calculator, which gives you the idea, and you can see this for US, it's one region. But if you want to change for the remaining services, not Bedrock, because currently Bedrock is not supported on the pricing calculator or database. For anything else, you can change the variables and you can get, receive your own estimate. and of course, here are some more recommendations, like if you want to contribute or like key considerations in terms of security, it's all described here in depth. but here's the tool. So like the way it works, the tool, I'll show you just do a quick demo. You need to log in here, right? So you just put your email here. I already have a user, so I'm just going to log in behind the scenes is authenticating with Cognito, right? And on the playground, I can just ask a question. Another thing, another feature that I haven't mentioned that I think is important to highlight, it has support for full code syntax. So let's say I want to write a code. create a CloudFormation template, where I have a EC2 name test and a new VPC. You can define the CIDR rank for the VPC, right? I can send these. Here I can choose the model, right? I'm just going to use Cloud 3. 5 SONET because it's the best model. And here, when I click submit behind the scenes, remember it's calling my web socket. And then it's changed, it's calling the WebSocket, the Lambda, and you can see it actually, proper formats, the CloudFormation template, my CloudFormation template is YAML, so you can see here if I scroll down, it has created, the template for me. This is you creating the templates, creating the EC2 instances, creating the outputs. The cool thing here, and even gives you the explanation. The good thing here is you have these buttons here. So any cleaning click cop all, it was going to cop all the output for you. But if you have code, you can just click on the copy here and it just called the copy for you. So it's easier if you're not put on an ID or something like that. but the chat is pretty cool, right? So let's say I have this chat and let's say. I have this, let's actually do this. Let's talk to chat and let's say, create some Python code that has some. Very bad bugs because I want to see if I can fix, right? So let's just ask my chat to create that Python code, right? The first time I send the message might take a while. The reason it takes a while is because it needs to create some of the database entries, but every future interaction is a little bit faster. So it has created the code. So what I want to do, I'm going to copy this code. And I create a new chat and I have this template, which calls Python bug fix, and I'm going to paste the code here and let's see if my template, which, it comes by default. And this tool helps me fix Python bug codes. I can just, and this is just an example that potentially has. as a platform engineer, you'll be dealing quite a lot, right? So you can see that he provided the code snip. It has a few issues and issues, but that's, here's the correct version. I don't know. I haven't gone through this just hypothetical example. You can see this specific fix here. It talks about the problems in the original code and so forth. You can say, okay, this is great. Could you rewrite this in Node. js, JavaScript for me, right? So the same code. So the chat will keep the conversational context so he knows I've talked about it, and I can finalize, say, summarize our conversation so far, please. And you can see it's streaming very quickly. I've, if you look here, the model I'm choosing is quad three haiku, and that is the model I'm using. So it talks about the conversation, what I've taught. So we talk, the conversation summarizes that I provide a Python code in my analysis. issues, then I provided the correct code. Then you asked me to rewrite from Python to JavaScript and finally provide the JavaScript code with the proper information. so I could use just a template. You can see the template is here just as its own. And if you look at the template, if you go here and look at the template, you can click at this option to clone. I don't want to clone, but if you want to add it, you can see that the template it just sets. a system prompt saying your text to analyze provided by the encoded snippet and identify any bugs and so forth, right? And it's using the cloud three model, and so forth is just, here is just the input data to provide, right? I can clone. So you can see, okay, it's a copy and I can save a new one. And it forces me to save as private because there is already one that is public. So this is the capability I want to show. Hopefully this makes sense. Please reach out on LinkedIn if you have any questions, shoot me an email and happy to provide you some guidance on how to deploy these and build on top of that. generative AI provides a lot of limitless capabilities for us builders and platform engineers to build on top of that. So thank you so much for taking the time and watching my session. have a great rest of your day and hope to see you soon. Bye bye.
...

Samuel Baruffi

Principal Global Solutions Architect @ AWS

Samuel Baruffi's LinkedIn account Samuel Baruffi's twitter account



Awesome tech events for

Priority access to all content

Video hallway track

Community chat

Exclusive promotions and giveaways