[ AWS CLI Command Reference ](../../index.html)

  * [ Home ](../../index.html)
  * [ User Guide ](https://docs.aws.amazon.com/cli/latest/userguide/)
  * [ Forum ](https://forums.aws.amazon.com/forum.jspa?forumID=150)
  * [ GitHub ](https://github.com/aws/aws-cli)

###  Navigation

  * [ index ](../../genindex.html "General Index")
  * [ next ](publish-type.html "publish-type") | 
  * [ previous ](list-types.html "list-types") | 
  * [ AWS CLI 2.15.40 Command Reference ](../../index.html) » 
  * [ aws ](../index.html) » 
  * [ cloudformation ](index.html) » 

  * [ ← list-types ](list-types.html "previous chapter \(use the left arrow\)") / 
  * [ publish-type → ](publish-type.html "next chapter \(use the right arrow\)")

[ ![Amazon Web Services logo](../../_static/logo.png) ](../../index.html)

###  [ Table of Contents ](../../index.html)

  * package 
    * Description 
    * Synopsis 
    * Options 
    * Global Options 
    * Examples 

###  Quick search

Search box  Search

###  Feedback

Did you find this page useful? Do you have a suggestion to improve the
documentation? [ Give us feedback ](https://docs.aws.amazon.com/forms/aws-doc-
feedback?hidden_service_name=AWS%20Command%20Line%20Interface&hidden_guide_name=Reference&topic_url=https%3A%2F%2Fdocs.aws.amazon.com%2Fcli%2Flatest%2Freference/cloudformation/package.html)
.  
If you would like to suggest an improvement or fix for the AWS CLI, check out
our [ contributing guide ](https://github.com/aws/aws-
cli/blob/develop/CONTRIBUTING.md) on GitHub.

###  User Guide

First time using the AWS CLI? See the [ User Guide
](https://docs.aws.amazon.com/cli/latest/userguide/) for help getting started.

[ [ aws  ](../index.html#cli-aws) . [ cloudformation  ](index.html#cli-aws-
cloudformation) ]

#  package  Â¶

##  Description  Â¶

Packages the local artifacts (local paths) that your AWS CloudFormation
template references. The command uploads local artifacts, such as source code
for an AWS Lambda function or a Swagger file for an AWS API Gateway REST API,
to an S3 bucket. The command returns a copy of your template, replacing
references to local artifacts with the S3 location where the command uploaded
the artifacts.

Use this command to quickly upload local artifacts that might be required by
your template. After you package your templateâs artifacts, run the ` deploy
` command to deploy the returned template.

This command can upload local artifacts referenced in the following places:

>   * ` BodyS3Location  ` property for the ` AWS::ApiGateway::RestApi  `
> resource
>   * ` Code  ` property for the ` AWS::Lambda::Function  ` resource
>   * ` Content  ` property for the ` AWS::Lambda::LayerVersion  ` resource
>   * ` CodeUri  ` property for the ` AWS::Serverless::Function  ` resource
>   * ` ContentUri  ` property for the ` AWS::Serverless::LayerVersion  `
> resource
>   * ` Location  ` property for the ` AWS::Serverless::Application  `
> resource
>   * ` DefinitionS3Location  ` property for the ` AWS::AppSync::GraphQLSchema
> ` resource
>   * ` RequestMappingTemplateS3Location  ` property for the `
> AWS::AppSync::Resolver  ` resource
>   * ` ResponseMappingTemplateS3Location  ` property for the `
> AWS::AppSync::Resolver  ` resource
>   * ` RequestMappingTemplateS3Location  ` property for the `
> AWS::AppSync::FunctionConfiguration  ` resource
>   * ` ResponseMappingTemplateS3Location  ` property for the `
> AWS::AppSync::FunctionConfiguration  ` resource
>   * ` DefinitionUri  ` property for the ` AWS::Serverless::Api  ` resource
>   * ` Location  ` parameter for the ` AWS::Include  ` transform
>   * ` SourceBundle  ` property for the `
> AWS::ElasticBeanstalk::ApplicationVersion  ` resource
>   * ` TemplateURL  ` property for the ` AWS::CloudFormation::Stack  `
> resource
>   * ` Command.ScriptLocation  ` property for the ` AWS::Glue::Job  `
> resource
>   * ` DefinitionS3Location  ` property for the `
> AWS::StepFunctions::StateMachine  ` resource
>   * ` DefinitionUri