Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
AWS write to S3 bucket in prediction calling a batch job

When i invoke the endpoint/batch job in sagemaker deployed with a custom container i want to store some information inside S3. For example, in this image enter image description here

In the "Deployment/Hosting" i want to put some objects inside the S3 container and not only reading the /opt/model

For example BYO container R

In the plumber.R function i would like to:

function(req) {

    # Setup locations
    prefix <- '/opt/ml'
    model_path <- paste(prefix, 'model', sep='/')

    # Bring in model file and factor levels
    load(paste(model_path, 'mars_model.RData', sep='/'))

    # Read in data
    conn <- textConnection(gsub('\\\\n', '\n', req$postBody))
    data <- read.csv(conn)
    close(conn)

    # Convert input to model matrix
    scoring_X <- model.matrix(~., data, xlev=factor_levels)

    ####
    SAVE OBJECT IN S3
    #####


    # Return prediction
    return(paste(predict(mars_model, scoring_X, row.names=FALSE), collapse=','))}

How can i achieve this? Using aws.s3 connecting to the container or with other techniques?

EDIT: The aws.s3 solution to connect directly inside the container seems not working

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!