Transcript#
This transcript was generated automatically and may contain errors.
This is a brief introduction to Positron on SageMaker Studio. Now, at this point, I've already logged into my AWS account and navigated into SageMaker Studio. And once I'm here, I can see that I have a Positron space that's already running that I can open up, which we'll do in just a moment.
Creating a Positron space
If I don't already have an existing Positron space, these are actually created under the JupyterLab tab over here. So if I come over to the left-hand side, I click on JupyterLab, create a new JupyterLab space. We'll call this Positron example, and go ahead and create the space.
When I create a space, the space doesn't automatically start. Instead, it allows me to configure different details about the space. Here I can change the instance size to be something a little bit larger if I need to. And over here on the right-hand side is where I select the image that this space runs off of. Instead of the default SageMaker distribution image, I can click on this and then select a Positron image that's been made available for me by my AWS account admin.
If your account admin has not already configured a Positron image to be available, details about how to do so are available in our administrator guide, step-by-step to walk through every part of the process to make the Positron image available for users to launch and create Positron spaces.
Opening Positron
Now, I already have a space that's running, so we're going to come back to our SageMaker Studio home, and then I can click Open, which will open Positron in a new browser tab. As this opens, you'll notice that this is Positron as you would expect it to be if you've been a previous user of this IDE. So I have Python and R installed and available. I can create different sessions for both Python and R execution, and I have some additional features here that make it really easy for me to work with other AWS resources and tools.
Running a Shiny app with Athena and Bedrock
So let's look at an example. If I open up a project here, now I have this project that has a number of different Python and R files that I might want to interact with, and I have this application file that's already pulled up. If I click on Run here inside of Positron, this will launch this application. This Shiny application runs here inside of my Positron environment.
And what this does is this gives me sort of this chat-like interface. Let's change the light mode here. There we go. This gives me this chat interface that allows me to interact with some data that's hosted inside of Athena. Because I'm already logged in and authenticated into AWS, any sort of interaction I do with other AWS services, whether it's S3 or Athena or models on Bedrock, all of that can happen without me needing to reestablish credentials or identity.
So in here I have this application that I've created in Positron, and then this application allows me to chat with this data that's hosted inside of Athena. So if we choose, let's create a FIGAR risk plot here. The model that I'm interacting with is hosted on Bedrock, and the data that I'm interacting with is hosted on Athena. So everything's happening natively inside of AWS. I don't have to establish any other permissions.
So everything's happening natively inside of AWS. I don't have to establish any other permissions.
And I get this sort of nice interface here that allows me to see, okay, here's the command that I gave. We're going through and generating a few, looking at the data, making sure that we understand kind of the source of truth, and then creating this nice sort of charge-off rate by FICO band plot with some interpretation that I can continue my conversation here.
Posit Assistant with AWS Bedrock
This sort of same pattern also exists inside of Posit Assistant. So if I come over to the left-hand sidebar, I can open up Posit Assistant. And this is the agent interface inside of Positron that allows me to interact with foundational AI models for code development, data science, those types of tasks.
So in here, if we create a new chat, we can see some details about Posit Assistant. And if I come down here to the bottom, I can choose the model that I want to interact with, and I can see that I'm already configured automatically to interact with available models through AWS Bedrock. So if I wanted to work with Sonnet 5 or GPT, different models that are available here inside of my Amazon environment, I can select this, and then I can come in and I can say, let's create a simple Shiny app using the Diamonds data in R.
Or whatever the case is. This is a fairly simple request, but it's going to submit this request, and then I can use Posit Assistant to evaluate and work with either data that I have available to me inside of my environment, data that's available inside of AWS, or do things like build interactive applications that I might want to share with broader users within my organization.
Token usage and cost tracking
As Posit Assistant is going through and starting to work on this task, I can see down here that I'm keeping track of the tokens that I have, what's available inside of my context window, as well as a cost estimate for how much this session has cost thus far.
So there's some nice features here within Positron that allow me to take advantage of the latest and greatest tools in the AI space, but do so in a very sort of reproducible, governed way, alongside being able to sort of manage the cost and usage of these tools as well.
in the AI space, but do so in a very sort of reproducible, governed way, alongside being able to sort of manage the cost and usage of these tools as well.
Now, like I mentioned, this is a very short introduction. If you'd like to learn more about how to take advantage of and utilize Positron inside of SageMaker, you can visit the user guide, which provides some additional guidance and details about what's possible with this latest integration with the Amazon ecosystem.