

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::AppSync::ChannelNamespace
<a name="aws-resource-appsync-channelnamespace"></a>

The `AWS::AppSync::ChannelNamespace` resource creates a channel namespace associated with an `Api`. The `ChannelNamespace` contains the definitions for code handlers for the `Api`.

## Syntax
<a name="aws-resource-appsync-channelnamespace-syntax"></a>

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

### JSON
<a name="aws-resource-appsync-channelnamespace-syntax.json"></a>

```
{
  "Type" : "AWS::AppSync::ChannelNamespace",
  "Properties" : {
      "[ApiId](#cfn-appsync-channelnamespace-apiid)" : String,
      "[CodeHandlers](#cfn-appsync-channelnamespace-codehandlers)" : String,
      "[CodeS3Location](#cfn-appsync-channelnamespace-codes3location)" : String,
      "[HandlerConfigs](#cfn-appsync-channelnamespace-handlerconfigs)" : HandlerConfigs,
      "[Name](#cfn-appsync-channelnamespace-name)" : String,
      "[PublishAuthModes](#cfn-appsync-channelnamespace-publishauthmodes)" : [ AuthMode, ... ],
      "[SubscribeAuthModes](#cfn-appsync-channelnamespace-subscribeauthmodes)" : [ AuthMode, ... ],
      "[Tags](#cfn-appsync-channelnamespace-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-appsync-channelnamespace-syntax.yaml"></a>

```
Type: AWS::AppSync::ChannelNamespace
Properties:
  [ApiId](#cfn-appsync-channelnamespace-apiid): String
  [CodeHandlers](#cfn-appsync-channelnamespace-codehandlers): String
  [CodeS3Location](#cfn-appsync-channelnamespace-codes3location): String
  [HandlerConfigs](#cfn-appsync-channelnamespace-handlerconfigs): 
    HandlerConfigs
  [Name](#cfn-appsync-channelnamespace-name): String
  [PublishAuthModes](#cfn-appsync-channelnamespace-publishauthmodes): 
    - AuthMode
  [SubscribeAuthModes](#cfn-appsync-channelnamespace-subscribeauthmodes): 
    - AuthMode
  [Tags](#cfn-appsync-channelnamespace-tags): 
    - Tag
```

## Properties
<a name="aws-resource-appsync-channelnamespace-properties"></a>

`ApiId`  <a name="cfn-appsync-channelnamespace-apiid"></a>
The `Api` ID.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CodeHandlers`  <a name="cfn-appsync-channelnamespace-codehandlers"></a>
The event handler functions that run custom business logic to process published events and subscribe requests.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `32768`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CodeS3Location`  <a name="cfn-appsync-channelnamespace-codes3location"></a>
The Amazon S3 endpoint where the code is located.  
*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)

`HandlerConfigs`  <a name="cfn-appsync-channelnamespace-handlerconfigs"></a>
The configuration for the `OnPublish` and `OnSubscribe` handlers.  
*Required*: No  
*Type*: [HandlerConfigs](aws-properties-appsync-channelnamespace-handlerconfigs.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-appsync-channelnamespace-name"></a>
The name of the channel namespace. This name must be unique within the `Api`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `([A-Za-z0-9](?:[A-Za-z0-9\-]{0,48}[A-Za-z0-9])?)`  
*Minimum*: `1`  
*Maximum*: `50`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PublishAuthModes`  <a name="cfn-appsync-channelnamespace-publishauthmodes"></a>
The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default `Api`authorization configuration.  
*Required*: No  
*Type*: Array of [AuthMode](aws-properties-appsync-channelnamespace-authmode.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SubscribeAuthModes`  <a name="cfn-appsync-channelnamespace-subscribeauthmodes"></a>
The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default `Api`authorization configuration.  
*Required*: No  
*Type*: Array of [AuthMode](aws-properties-appsync-channelnamespace-authmode.md)  
*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-appsync-channelnamespace-tags"></a>
A set of tags (key-value pairs) for this channel namespace.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-appsync-channelnamespace-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-appsync-channelnamespace-return-values"></a>

### Ref
<a name="aws-resource-appsync-channelnamespace-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns The Amazon Resource Name (ARN) of the channel namespace. 

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-appsync-channelnamespace-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-appsync-channelnamespace-return-values-fn--getatt-fn--getatt"></a>

`ChannelNamespaceArn`  <a name="ChannelNamespaceArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the channel namespace. 

# AWS::AppSync::ChannelNamespace AuthMode
<a name="aws-properties-appsync-channelnamespace-authmode"></a>

Describes an authorization configuration. Use `AuthMode` to specify the publishing and subscription authorization configuration for an Event API.

## Syntax
<a name="aws-properties-appsync-channelnamespace-authmode-syntax"></a>

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

### JSON
<a name="aws-properties-appsync-channelnamespace-authmode-syntax.json"></a>

```
{
  "[AuthType](#cfn-appsync-channelnamespace-authmode-authtype)" : String
}
```

### YAML
<a name="aws-properties-appsync-channelnamespace-authmode-syntax.yaml"></a>

```
  [AuthType](#cfn-appsync-channelnamespace-authmode-authtype): String
```

## Properties
<a name="aws-properties-appsync-channelnamespace-authmode-properties"></a>

`AuthType`  <a name="cfn-appsync-channelnamespace-authmode-authtype"></a>
The authorization type.  
*Required*: No  
*Type*: String  
*Allowed values*: `AMAZON_COGNITO_USER_POOLS | AWS_IAM | API_KEY | OPENID_CONNECT | AWS_LAMBDA`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::AppSync::ChannelNamespace HandlerConfig
<a name="aws-properties-appsync-channelnamespace-handlerconfig"></a>

The `HandlerConfig` property type specifies the configuration for the handler.

## Syntax
<a name="aws-properties-appsync-channelnamespace-handlerconfig-syntax"></a>

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

### JSON
<a name="aws-properties-appsync-channelnamespace-handlerconfig-syntax.json"></a>

```
{
  "[Behavior](#cfn-appsync-channelnamespace-handlerconfig-behavior)" : String,
  "[Integration](#cfn-appsync-channelnamespace-handlerconfig-integration)" : Integration
}
```

### YAML
<a name="aws-properties-appsync-channelnamespace-handlerconfig-syntax.yaml"></a>

```
  [Behavior](#cfn-appsync-channelnamespace-handlerconfig-behavior): String
  [Integration](#cfn-appsync-channelnamespace-handlerconfig-integration): 
    Integration
```

## Properties
<a name="aws-properties-appsync-channelnamespace-handlerconfig-properties"></a>

`Behavior`  <a name="cfn-appsync-channelnamespace-handlerconfig-behavior"></a>
The behavior for the handler.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `CODE | DIRECT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Integration`  <a name="cfn-appsync-channelnamespace-handlerconfig-integration"></a>
The integration data source configuration for the handler.  
*Required*: Yes  
*Type*: [Integration](aws-properties-appsync-channelnamespace-integration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::AppSync::ChannelNamespace HandlerConfigs
<a name="aws-properties-appsync-channelnamespace-handlerconfigs"></a>

The `HandlerConfigs` property type specifies the configuration for the `OnPublish` and `OnSubscribe` handlers.

## Syntax
<a name="aws-properties-appsync-channelnamespace-handlerconfigs-syntax"></a>

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

### JSON
<a name="aws-properties-appsync-channelnamespace-handlerconfigs-syntax.json"></a>

```
{
  "[OnPublish](#cfn-appsync-channelnamespace-handlerconfigs-onpublish)" : HandlerConfig,
  "[OnSubscribe](#cfn-appsync-channelnamespace-handlerconfigs-onsubscribe)" : HandlerConfig
}
```

### YAML
<a name="aws-properties-appsync-channelnamespace-handlerconfigs-syntax.yaml"></a>

```
  [OnPublish](#cfn-appsync-channelnamespace-handlerconfigs-onpublish): 
    HandlerConfig
  [OnSubscribe](#cfn-appsync-channelnamespace-handlerconfigs-onsubscribe): 
    HandlerConfig
```

## Properties
<a name="aws-properties-appsync-channelnamespace-handlerconfigs-properties"></a>

`OnPublish`  <a name="cfn-appsync-channelnamespace-handlerconfigs-onpublish"></a>
The configuration for the `OnPublish` handler.  
*Required*: No  
*Type*: [HandlerConfig](aws-properties-appsync-channelnamespace-handlerconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OnSubscribe`  <a name="cfn-appsync-channelnamespace-handlerconfigs-onsubscribe"></a>
The configuration for the `OnSubscribe` handler.  
*Required*: No  
*Type*: [HandlerConfig](aws-properties-appsync-channelnamespace-handlerconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::AppSync::ChannelNamespace Integration
<a name="aws-properties-appsync-channelnamespace-integration"></a>

The `Integration` property type specifies the integration data source configuration for the handler.

## Syntax
<a name="aws-properties-appsync-channelnamespace-integration-syntax"></a>

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

### JSON
<a name="aws-properties-appsync-channelnamespace-integration-syntax.json"></a>

```
{
  "[DataSourceName](#cfn-appsync-channelnamespace-integration-datasourcename)" : String,
  "[LambdaConfig](#cfn-appsync-channelnamespace-integration-lambdaconfig)" : LambdaConfig
}
```

### YAML
<a name="aws-properties-appsync-channelnamespace-integration-syntax.yaml"></a>

```
  [DataSourceName](#cfn-appsync-channelnamespace-integration-datasourcename): String
  [LambdaConfig](#cfn-appsync-channelnamespace-integration-lambdaconfig): 
    LambdaConfig
```

## Properties
<a name="aws-properties-appsync-channelnamespace-integration-properties"></a>

`DataSourceName`  <a name="cfn-appsync-channelnamespace-integration-datasourcename"></a>
The unique name of the data source that has been configured on the API.  
*Required*: Yes  
*Type*: String  
*Pattern*: `([_A-Za-z][_0-9A-Za-z]{0,511})?`  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LambdaConfig`  <a name="cfn-appsync-channelnamespace-integration-lambdaconfig"></a>
The configuration for a Lambda data source.  
*Required*: No  
*Type*: [LambdaConfig](aws-properties-appsync-channelnamespace-lambdaconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::AppSync::ChannelNamespace LambdaConfig
<a name="aws-properties-appsync-channelnamespace-lambdaconfig"></a>

The `LambdaConfig` property type specifies the integration configuration for a Lambda data source.

## Syntax
<a name="aws-properties-appsync-channelnamespace-lambdaconfig-syntax"></a>

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

### JSON
<a name="aws-properties-appsync-channelnamespace-lambdaconfig-syntax.json"></a>

```
{
  "[InvokeType](#cfn-appsync-channelnamespace-lambdaconfig-invoketype)" : String
}
```

### YAML
<a name="aws-properties-appsync-channelnamespace-lambdaconfig-syntax.yaml"></a>

```
  [InvokeType](#cfn-appsync-channelnamespace-lambdaconfig-invoketype): String
```

## Properties
<a name="aws-properties-appsync-channelnamespace-lambdaconfig-properties"></a>

`InvokeType`  <a name="cfn-appsync-channelnamespace-lambdaconfig-invoketype"></a>
The invocation type for a Lambda data source.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `REQUEST_RESPONSE | EVENT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::AppSync::ChannelNamespace Tag
<a name="aws-properties-appsync-channelnamespace-tag"></a>

A tag (key-value pair) for this channel namespace.

## Syntax
<a name="aws-properties-appsync-channelnamespace-tag-syntax"></a>

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

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

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

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

```
  [Key](#cfn-appsync-channelnamespace-tag-key): String
  [Value](#cfn-appsync-channelnamespace-tag-value): String
```

## Properties
<a name="aws-properties-appsync-channelnamespace-tag-properties"></a>

`Key`  <a name="cfn-appsync-channelnamespace-tag-key"></a>
Describes the key of the tag.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(?!aws:)[ a-zA-Z+-=._:/]+$`  
*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-appsync-channelnamespace-tag-value"></a>
Describes the value of the tag.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[\s\w+-=\.:/@]*$`  
*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)