Running Shiny from a SageMaker notebook?

I would like to run a Shiny app from within an AWS SageMaker notebook and was wondering if this is possible.
It is possible to run other types of web app, eg TensorBoard.

I tried running a simple embedded Shiny app using this example -- the only change I made was to specify the port at the end:


  ui = fluidPage(
    selectInput("region", "Region:",
                choices = colnames(WorldPhones)),

  server = function(input, output) {
    output$phonePlot = renderPlot({
              ylab = "Number of Telephones", xlab = "Year")

  options = list(height = 500, port=3387)

I then tried to access the Shiny app in another browser tab via https://<my-notebook-instance-name>, using the same method to construct the URL as with TensorBoard. The selectInput did load, but the plot wasn't produced, and after 5 seconds the app greyed out.

(I verified that I was able to get the Shiny app running successfully on my local machine.)

For the avoidance of doubt, this is with a standard SageMaker notebook instance, running an R kernel. I don't have a RStudio Workbench licence.

Thanks for any insight you may have.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.