bootstrap

autogluon.cloud.bootstrap(*, backend: Literal['sagemaker', 'ray_aws'] = 'sagemaker', stack_name: str | None = None, session: Session | None = None) None[source]

Deploy the CloudFormation stack and persist resource identifiers.

On completion the IAM role and S3 bucket created by the stack are saved to ~/.autogluon/cloud.yaml via register(). If you already have an IAM role and bucket in place, call register() directly and skip this function entirely.

Each backend has its own slot in the config file, so calling bootstrap() for sagemaker and again for ray_aws keeps both in the config.

Parameters:
  • backend – Which AutoGluon-Cloud backend to provision.

  • stack_name – CloudFormation stack name. Auto-generated as ag-cloud-<backend> if not given.

  • session – A boto3.Session to use for AWS calls. If None, a default session is constructed from the standard credential chain (env vars, ~/.aws/credentials, SSO, instance profile).