

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS Elemental MediaStore
<a name="AWS_MediaStore"></a>

**Resource types**
+ [AWS::MediaStore::Container](aws-resource-mediastore-container.md)

# AWS::MediaStore::Container
<a name="aws-resource-mediastore-container"></a>

The AWS::MediaStore::Container resource specifies a storage container to hold objects. A container is similar to a bucket in Amazon S3.

When you create a container using CloudFormation, the template manages data for five API actions: creating a container, setting access logging, updating the default container policy, adding a cross-origin resource sharing (CORS) policy, and adding an object lifecycle policy.

## Syntax
<a name="aws-resource-mediastore-container-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-mediastore-container-syntax.json"></a>

```
{
  "Type" : "AWS::MediaStore::Container",
  "Properties" : {
      "[AccessLoggingEnabled](#cfn-mediastore-container-accessloggingenabled)" : Boolean,
      "[ContainerName](#cfn-mediastore-container-containername)" : String,
      "[CorsPolicy](#cfn-mediastore-container-corspolicy)" : [ CorsRule, ... ],
      "[LifecyclePolicy](#cfn-mediastore-container-lifecyclepolicy)" : String,
      "[MetricPolicy](#cfn-mediastore-container-metricpolicy)" : MetricPolicy,
      "[Policy](#cfn-mediastore-container-policy)" : String,
      "[Tags](#cfn-mediastore-container-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-mediastore-container-syntax.yaml"></a>

```
Type: AWS::MediaStore::Container
Properties:
  [AccessLoggingEnabled](#cfn-mediastore-container-accessloggingenabled): Boolean
  [ContainerName](#cfn-mediastore-container-containername): String
  [CorsPolicy](#cfn-mediastore-container-corspolicy): 
    - CorsRule
  [LifecyclePolicy](#cfn-mediastore-container-lifecyclepolicy): String
  [MetricPolicy](#cfn-mediastore-container-metricpolicy): 
    MetricPolicy
  [Policy](#cfn-mediastore-container-policy): String
  [Tags](#cfn-mediastore-container-tags): 
    - Tag
```

## Properties
<a name="aws-resource-mediastore-container-properties"></a>

`AccessLoggingEnabled`  <a name="cfn-mediastore-container-accessloggingenabled"></a>
The state of access logging on the container. This value is `false` by default, indicating that AWS Elemental MediaStore does not send access logs to Amazon CloudWatch Logs. When you enable access logging on the container, MediaStore changes this value to `true`, indicating that the service delivers access logs for objects stored in that container to CloudWatch Logs.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContainerName`  <a name="cfn-mediastore-container-containername"></a>
The name for the container. The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container named `movies` in every region, as long as you don’t have an existing container with that name.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CorsPolicy`  <a name="cfn-mediastore-container-corspolicy"></a>
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore. After November 13, 2025, you will no longer be able to access the AWS Elemental MediaStore console or AWS Elemental MediaStore resources. For more information, visit this [blog post](https://aws.amazon.com/blogs/media/support-for-aws-elemental-mediastore-ending-soon/). 
Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your AWS Elemental MediaStore container at my.example.container.com by using the browser's XMLHttpRequest capability.  
To enable CORS on a container, you attach a CORS policy to the container. In the CORS policy, you configure rules that identify origins and the HTTP methods that can be executed on your container. The policy can contain up to 398,000 characters. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.  
To learn more about CORS, see [Cross-Origin Resource Sharing (CORS) in AWS Elemental MediaStore](https://docs.aws.amazon.com/mediastore/latest/ug/cors-policy.html).  
*Required*: No  
*Type*: Array of [CorsRule](aws-properties-mediastore-container-corsrule.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LifecyclePolicy`  <a name="cfn-mediastore-container-lifecyclepolicy"></a>
End of support notice: On November 13, 2025, AWS will discontinue support for AWS Elemental MediaStore. After November 13, 2025, you will no longer be able to access the AWS Elemental MediaStore console or AWS Elemental MediaStore resources. For more information, visit this [blog post](https://aws.amazon.com/blogs/media/support-for-aws-elemental-mediastore-ending-soon/). 
Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect.  
For information about how to construct an object lifecycle policy, see [Components of an Object Lifecycle Policy](https://docs.aws.amazon.com/mediastore/latest/ug/policies-object-lifecycle-components.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricPolicy`  <a name="cfn-mediastore-container-metricpolicy"></a>
The metric policy that is associated with the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In the policy, you must indicate whether you want MediaStore to send container-level metrics. You can also include rules to define groups of objects that you want MediaStore to send object-level metrics for.  
To view examples of how to construct a metric policy for your use case, see [Example Metric Policies](https://docs.aws.amazon.com/mediastore/latest/ug/policies-metric-examples.html).  
*Required*: No  
*Type*: [MetricPolicy](aws-properties-mediastore-container-metricpolicy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Policy`  <a name="cfn-mediastore-container-policy"></a>
Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the [AWS Identity and Access Management User Guide](https://docs.aws.amazon.com/iam/).  
For this release of the REST API, you can create only one policy for a container. If you enter `PutContainerPolicy` twice, the second command modifies the existing policy.   
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-mediastore-container-tags"></a>
Property description not available.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-mediastore-container-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-mediastore-container-return-values"></a>

### Ref
<a name="aws-resource-mediastore-container-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the container.

For example: `{ "Ref": "myContainer" }`

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-mediastore-container-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-mediastore-container-return-values-fn--getatt-fn--getatt"></a>

`Endpoint`  <a name="Endpoint-fn::getatt"></a>
The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.

# AWS::MediaStore::Container CorsRule
<a name="aws-properties-mediastore-container-corsrule"></a>

A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.

## Syntax
<a name="aws-properties-mediastore-container-corsrule-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-mediastore-container-corsrule-syntax.json"></a>

```
{
  "[AllowedHeaders](#cfn-mediastore-container-corsrule-allowedheaders)" : [ String, ... ],
  "[AllowedMethods](#cfn-mediastore-container-corsrule-allowedmethods)" : [ String, ... ],
  "[AllowedOrigins](#cfn-mediastore-container-corsrule-allowedorigins)" : [ String, ... ],
  "[ExposeHeaders](#cfn-mediastore-container-corsrule-exposeheaders)" : [ String, ... ],
  "[MaxAgeSeconds](#cfn-mediastore-container-corsrule-maxageseconds)" : Integer
}
```

### YAML
<a name="aws-properties-mediastore-container-corsrule-syntax.yaml"></a>

```
  [AllowedHeaders](#cfn-mediastore-container-corsrule-allowedheaders): 
    - String
  [AllowedMethods](#cfn-mediastore-container-corsrule-allowedmethods): 
    - String
  [AllowedOrigins](#cfn-mediastore-container-corsrule-allowedorigins): 
    - String
  [ExposeHeaders](#cfn-mediastore-container-corsrule-exposeheaders): 
    - String
  [MaxAgeSeconds](#cfn-mediastore-container-corsrule-maxageseconds): Integer
```

## Properties
<a name="aws-properties-mediastore-container-corsrule-properties"></a>

`AllowedHeaders`  <a name="cfn-mediastore-container-corsrule-allowedheaders"></a>
Specifies which headers are allowed in a preflight `OPTIONS` request through the `Access-Control-Request-Headers` header. Each header name that is specified in `Access-Control-Request-Headers` must have a corresponding entry in the rule. Only the headers that were requested are sent back.   
This element can contain only one wildcard character (\$1).  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowedMethods`  <a name="cfn-mediastore-container-corsrule-allowedmethods"></a>
Identifies an HTTP method that the origin that is specified in the rule is allowed to execute.  
Each CORS rule must contain at least one `AllowedMethods` and one `AllowedOrigins` element.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `4`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowedOrigins`  <a name="cfn-mediastore-container-corsrule-allowedorigins"></a>
One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript `XMLHttpRequest` object).  
Each CORS rule must have at least one `AllowedOrigins` element. The string value can include only one wildcard character (\$1), for example, http://\$1.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExposeHeaders`  <a name="cfn-mediastore-container-corsrule-exposeheaders"></a>
One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript `XMLHttpRequest` object).  
This element is optional for each rule.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxAgeSeconds`  <a name="cfn-mediastore-container-corsrule-maxageseconds"></a>
The time in seconds that your browser caches the preflight response for the specified resource.  
A CORS rule can have only one `MaxAgeSeconds` element.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `2147483647`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::MediaStore::Container MetricPolicy
<a name="aws-properties-mediastore-container-metricpolicy"></a>

The metric policy that is associated with the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In the policy, you must indicate whether you want MediaStore to send container-level metrics. You can also include rules to define groups of objects that you want MediaStore to send object-level metrics for.

To view examples of how to construct a metric policy for your use case, see [Example Metric Policies](https://docs.aws.amazon.com/mediastore/latest/ug/policies-metric-examples.html).

## Syntax
<a name="aws-properties-mediastore-container-metricpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-mediastore-container-metricpolicy-syntax.json"></a>

```
{
  "[ContainerLevelMetrics](#cfn-mediastore-container-metricpolicy-containerlevelmetrics)" : String,
  "[MetricPolicyRules](#cfn-mediastore-container-metricpolicy-metricpolicyrules)" : [ MetricPolicyRule, ... ]
}
```

### YAML
<a name="aws-properties-mediastore-container-metricpolicy-syntax.yaml"></a>

```
  [ContainerLevelMetrics](#cfn-mediastore-container-metricpolicy-containerlevelmetrics): String
  [MetricPolicyRules](#cfn-mediastore-container-metricpolicy-metricpolicyrules): 
    - MetricPolicyRule
```

## Properties
<a name="aws-properties-mediastore-container-metricpolicy-properties"></a>

`ContainerLevelMetrics`  <a name="cfn-mediastore-container-metricpolicy-containerlevelmetrics"></a>
A setting to enable or disable metrics at the container level.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricPolicyRules`  <a name="cfn-mediastore-container-metricpolicy-metricpolicyrules"></a>
A parameter that holds an array of rules that enable metrics at the object level. This parameter is optional, but if you choose to include it, you must also include at least one rule. By default, you can include up to five rules. You can also [request a quota increase](https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediastore/quotas) to allow up to 300 rules per policy.  
*Required*: No  
*Type*: Array of [MetricPolicyRule](aws-properties-mediastore-container-metricpolicyrule.md)  
*Minimum*: `1`  
*Maximum*: `300`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::MediaStore::Container MetricPolicyRule
<a name="aws-properties-mediastore-container-metricpolicyrule"></a>

A setting that enables metrics at the object level. Each rule contains an object group and an object group name. If the policy includes the MetricPolicyRules parameter, you must include at least one rule. Each metric policy can include up to five rules by default. You can also [request a quota increase](https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediastore/quotas) to allow up to 300 rules per policy.

## Syntax
<a name="aws-properties-mediastore-container-metricpolicyrule-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-mediastore-container-metricpolicyrule-syntax.json"></a>

```
{
  "[ObjectGroup](#cfn-mediastore-container-metricpolicyrule-objectgroup)" : String,
  "[ObjectGroupName](#cfn-mediastore-container-metricpolicyrule-objectgroupname)" : String
}
```

### YAML
<a name="aws-properties-mediastore-container-metricpolicyrule-syntax.yaml"></a>

```
  [ObjectGroup](#cfn-mediastore-container-metricpolicyrule-objectgroup): String
  [ObjectGroupName](#cfn-mediastore-container-metricpolicyrule-objectgroupname): String
```

## Properties
<a name="aws-properties-mediastore-container-metricpolicyrule-properties"></a>

`ObjectGroup`  <a name="cfn-mediastore-container-metricpolicyrule-objectgroup"></a>
A path or file name that defines which objects to include in the group. Wildcards (\$1) are acceptable.  
*Required*: Yes  
*Type*: String  
*Pattern*: `/?(?:[A-Za-z0-9_=:\.\-\~\*]+/){0,10}(?:[A-Za-z0-9_=:\.\-\~\*]+)?/?`  
*Minimum*: `1`  
*Maximum*: `900`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ObjectGroupName`  <a name="cfn-mediastore-container-metricpolicyrule-objectgroupname"></a>
A name that allows you to refer to the object group.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[a-zA-Z0-9_]+`  
*Minimum*: `1`  
*Maximum*: `30`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::MediaStore::Container Tag
<a name="aws-properties-mediastore-container-tag"></a>

A collection of tags associated with a container. Each tag consists of a key:value pair, which can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each container. For more information about tagging, including naming and usage conventions, see [Tagging Resources in MediaStore](https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html).

## Syntax
<a name="aws-properties-mediastore-container-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-mediastore-container-tag-syntax.json"></a>

```
{
  "[Key](#cfn-mediastore-container-tag-key)" : String,
  "[Value](#cfn-mediastore-container-tag-value)" : String
}
```

### YAML
<a name="aws-properties-mediastore-container-tag-syntax.yaml"></a>

```
  [Key](#cfn-mediastore-container-tag-key): String
  [Value](#cfn-mediastore-container-tag-value): String
```

## Properties
<a name="aws-properties-mediastore-container-tag-properties"></a>

`Key`  <a name="cfn-mediastore-container-tag-key"></a>
Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\p{L}\p{Z}\p{N}_.:/=+\-@]*`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-mediastore-container-tag-value"></a>
Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\p{L}\p{Z}\p{N}_.:/=+\-@]*`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)