

# Ingesting an asset


To ingest source content, create an asset in AWS Elemental MediaPackage. When MediaPackage ingests content, it creates a unique playback URL for every packaging configuration that's associated with the asset.

**Important**  
To ingest an asset, MediaPackage must have permissions to access the Amazon S3 bucket where the source content is stored. To create a role that gives MediaPackage the right permissions, see [Allowing AWS Elemental MediaPackage to access other AWS services](setting-up-create-trust-rel.md).

To create an asset, you can use the MediaPackage console, the AWS CLI, or the MediaPackage API. For information about creating a packaging configuration with the AWS CLI or MediaPackage API, see [Assets](https://docs.aws.amazon.com/mediapackage-vod/latest/apireference/assets.html) in the *AWS Elemental MediaPackage VOD API Reference*.

When you're creating an asset, don't put sensitive identifying information like customer account numbers into free-form fields, such as the **ID** field. This applies when you're using the MediaPackage console, MediaPackage API, AWS CLI, or AWS SDKs. Any data that you enter into MediaPackage might get picked up for inclusion in diagnostic logs or Amazon CloudWatch Events.

**To ingest an asset (console)**

1. Open the MediaPackage console at [https://console.aws.amazon.com/mediapackage/](https://console.aws.amazon.com/mediapackage/).

1. In the navigation pane, under **Video on demand**, choose **Assets**.

1. On the **Assets** page, choose **Ingest assets**.

1. On the **Ingest assets** page, complete the fields as described in the following topics:
   + [Asset access fields](asset-create-access.md)
   + [Asset details fields](asset-create-details.md)
   + [Packaging settings field](asset-create-pkg.md)

1. Choose **Ingest assets**.

Ingesting a VOD asset is an asynchronous action. The time it takes before an asset becomes available for playback can vary based on several factors, such as asset duration and asset complexity. You can track when a VOD asset is ready for playback by monitoring the CloudWatch `VodAssetPlayable` events that MediaPackage sends when the asset is ready for playback. For more information, see [VOD Playback Events](cloudwatch-events-example.md#vod-asset-playable). 

If you exceed the quotas for your account when you're creating a packaging configuration, you get an error. If you get an error similar to Too many requests, please try again. Resource limit exceeded, either you have exceeded the API request quotas, or you have already reached the maximum number of packaging groups allowed on your account. If this is your first group, or if you think you mistakenly received this error, use the Service Quotas console to [request quota increases](https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediapackage/quotas). For more information about quotas in MediaPackage, see [Quotas in AWS Elemental MediaPackage](quotas.md).

# Asset access fields


The following fields describe how AWS Elemental MediaPackage accesses the source content in your Amazon S3 bucket. MediaPackage must have permissions to access the bucket. To create an IAM role with the right permissions, see [Allowing AWS Elemental MediaPackage to access other AWS services](setting-up-create-trust-rel.md).

1. For **Amazon S3 bucket name**, choose from a list of buckets that MediaPackage has detected in your account or enter the name of the bucket. The Amazon S3 bucket holds the source content that MediaPackage ingests and packages for playback. If you entered the name of the bucket, MediaPackage doesn't have visibility into this bucket, so it can't tell if the bucket is compatible or not.
**Note**  
If you don't have permissions to view Amazon S3 buckets, MediaPackage doesn't display any options. Contact your AWS administrator or enter the bucket name manually in the **Specify bucket name** field.

1. For **IAM role**, choose the IAM role with the MediaPackage permissions to read from the Amazon S3 bucket.
   + To choose from a list of roles that MediaPackage has detected on your account, choose **Use existing role** and choose the role.
**Note**  
If you don't have permissions to view IAM roles, MediaPackage doesn't display any options. Contact your AWS administrator or enter the role ARN manually in the **Specify custom role name** field.
   + To use a role that MediaPackage hasn't detected, choose **Specify custom role name** and enter the custom ARN of the role. Because MediaPackage doesn't have visibility into this role, it can't tell if the role provides the correct permissions or not.

# Asset details fields


The following fields describe the source content that this asset uses.

If you have multiple sources for this asset, choose **Add asset** and complete the fields. Do this for all source contents.

**Important**  
Source content must be in a .smil (MP4) or .m3u8 (HLS/TS) file format.

1. For **Filename**, Enter the full path to either the .smil manifest (MP4) or the .m3u8 parent playlist (HLS) within your Amazon S3 bucket, including the name of the source content. You don't need to enter the bucket name because you chose it in **S3 bucket name** field. For example, if your content is called` lion_movie.m3u8` and is in a subdirectory called `thursday_night` in a bucket called `movies`, you would enter the following in the **Filename** field:

   ```
   thursday_night/lion_movie.m3u8
   ```

   For more information about using .smil manifests with MediaPackage, see [Requirements for .smil manifests](supported-inputs-vod-smil.md).

1. For **ID**, enter a name that describes the asset. The ID is the primary identiﬁer for the asset, and must be unique for your account in this Region. Supported characters are letters, numbers, underscores (\$1), and dashes (-).

1. (Optional) For **Resource ID**, enter an identifier for the content. When you're using SPEKE, the resource ID is the identifier that your key server uses to reference the content. MediaPackage sends the ID to the key server to identify the current asset. How unique you make the ID depends on the level of access controls you need. The service doesn't allow you to use the same ID for two simultaneous encryption processes. The resource ID is also known as the content ID.  
**Example**  

   ```
   MovieNight20171126093045
   ```

# Packaging settings field


The following field determines how AWS Elemental MediaPackage packages outputs from this asset.
+ For **Packaging group**, choose the group that holds the configurations that you want to use for this asset. The packaging group determines which packaging configurations MediaPackage uses when it packages content to fulfill playback requests.