sam package

Package an AWS SAM application

Options

NameDescription
--config-env <environment>The environment name specifying the default parameter values in the configuration file to use
--config-file <config file>The path and file name of the configuration file containing default parameter values to use
--debugTurn on debug logging to print debug message generated by SAM CLI and display timestamps
--force-uploadIndicates whether to override existing files in the S3 bucket. Specify this flag to upload artifacts even if they match existing artifacts in the S3 bucket
--help, -hShow help for sam
--image-repositories, <mapping>
  • Repeatable ♾
--image-repository <repo URI>ECR repo uri where this command uploads the image artifacts that are referenced in your template
--kms-key-id <kms key id>The ID of an AWS KMS key that the command uses to encrypt artifacts that are at rest in the S3 bucket
--metadata <map>A map of metadata to attach to ALL the artifacts that are referenced in your template
--no-progressbarDoes not showcase a progress bar when uploading artifacts to s3
--profile <profile name>Select a specific profile from your credential file to get AWS credentials
--region <region>Set the AWS Region of the service
--resolve-s3Automatically resolve s3 bucket for non-guided deployments. Enabling this option will also create a managed default s3 bucket for you
--s3-bucket <bucket name>The name of the S3 bucket where this command uploads the artifacts that are referenced in your template
--s3-prefix <prefix>A prefix name that the command adds to the artifacts name when it uploads them to the S3 bucket
--signing-profiles <profiles>A string that contains Code Sign configuration parameters
-t, --template-file, --template <path>AWS SAM template file
--use-jsonIndicates whether to use JSON as the format for the output AWS CloudFormation template. YAML is used by default
--output-template-file <path>The path to the file where the command writes the output AWS CloudFormation template. If unspecified, the command writes the template to the standard output