% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/starburst-map.R
\name{starburst_cluster}
\alias{starburst_cluster}
\title{Create a Starburst Cluster}
\usage{
starburst_cluster(
  workers = 10,
  cpu = 4,
  memory = "8GB",
  region = NULL,
  timeout = 3600,
  launch_type = "EC2",
  instance_type = "c7g.xlarge",
  use_spot = TRUE
)
}
\arguments{
\item{workers}{Number of parallel workers}

\item{cpu}{CPU units per worker}

\item{memory}{Memory per worker}

\item{region}{AWS region}

\item{timeout}{Maximum runtime in seconds}

\item{launch_type}{Compute backend: "EC2" (default) or "FARGATE"}

\item{instance_type}{EC2 instance type when \code{launch_type = "EC2"}
(default: "c7g.xlarge"). Worker CPU architecture follows the instance type
(Graviton \code{*g.*} = ARM64, Intel/AMD = x86_64); there is no separate
platform argument.}

\item{use_spot}{Use EC2 Spot instances for cost savings (default: TRUE)}
}
\value{
A starburst_cluster object
}
\description{
Creates a cluster object for managing AWS workers (EC2 by default, or Fargate)
using the staRburst Future backend.
}
\examples{
\donttest{
if (starburst_is_configured()) {
  cluster <- starburst_cluster(workers = 20)
  results <- cluster$map(data, function(x) x * 2)

  # Fargate backend instead of the EC2 default
  fg <- starburst_cluster(workers = 20, launch_type = "FARGATE")
}
}
}
