

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::Glue::Database
<a name="aws-resource-glue-database"></a>

The `AWS::Glue::Database` resource specifies a logical grouping of tables in AWS Glue. For more information, see [Defining a Database in Your Data Catalog](https://docs.aws.amazon.com/glue/latest/dg/define-database.html) and [Database Structure](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-databases.html#aws-glue-api-catalog-databases-Database) in the *AWS Glue Developer Guide*.

## Syntax
<a name="aws-resource-glue-database-syntax"></a>

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

### JSON
<a name="aws-resource-glue-database-syntax.json"></a>

```
{
  "Type" : "AWS::Glue::Database",
  "Properties" : {
      "[CatalogId](#cfn-glue-database-catalogid)" : String,
      "[DatabaseInput](#cfn-glue-database-databaseinput)" : DatabaseInput,
      "[DatabaseName](#cfn-glue-database-databasename)" : String
    }
}
```

### YAML
<a name="aws-resource-glue-database-syntax.yaml"></a>

```
Type: AWS::Glue::Database
Properties:
  [CatalogId](#cfn-glue-database-catalogid): String
  [DatabaseInput](#cfn-glue-database-databaseinput): 
    DatabaseInput
  [DatabaseName](#cfn-glue-database-databasename): String
```

## Properties
<a name="aws-resource-glue-database-properties"></a>

`CatalogId`  <a name="cfn-glue-database-catalogid"></a>
The AWS account ID for the account in which to create the catalog object.  
 To specify the account ID, you can use the `Ref` intrinsic function with the `AWS::AccountId` pseudo parameter. For example: `!Ref AWS::AccountId`
*Required*: Yes  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DatabaseInput`  <a name="cfn-glue-database-databaseinput"></a>
The metadata for the database.  
*Required*: Yes  
*Type*: [DatabaseInput](aws-properties-glue-database-databaseinput.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DatabaseName`  <a name="cfn-glue-database-databasename"></a>
The name of the catalog database.  
*Required*: No  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-glue-database-return-values"></a>

### Ref
<a name="aws-resource-glue-database-return-values-ref"></a>

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

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).

# AWS::Glue::Database DatabaseIdentifier
<a name="aws-properties-glue-database-databaseidentifier"></a>

A structure that describes a target database for resource linking.

## Syntax
<a name="aws-properties-glue-database-databaseidentifier-syntax"></a>

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

### JSON
<a name="aws-properties-glue-database-databaseidentifier-syntax.json"></a>

```
{
  "[CatalogId](#cfn-glue-database-databaseidentifier-catalogid)" : String,
  "[DatabaseName](#cfn-glue-database-databaseidentifier-databasename)" : String,
  "[Region](#cfn-glue-database-databaseidentifier-region)" : String
}
```

### YAML
<a name="aws-properties-glue-database-databaseidentifier-syntax.yaml"></a>

```
  [CatalogId](#cfn-glue-database-databaseidentifier-catalogid): String
  [DatabaseName](#cfn-glue-database-databaseidentifier-databasename): String
  [Region](#cfn-glue-database-databaseidentifier-region): String
```

## Properties
<a name="aws-properties-glue-database-databaseidentifier-properties"></a>

`CatalogId`  <a name="cfn-glue-database-databaseidentifier-catalogid"></a>
The ID of the Data Catalog in which the database resides.  
*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)

`DatabaseName`  <a name="cfn-glue-database-databaseidentifier-databasename"></a>
The name of the catalog database.  
*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)

`Region`  <a name="cfn-glue-database-databaseidentifier-region"></a>
The Region of the database.  
*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)

# AWS::Glue::Database DatabaseInput
<a name="aws-properties-glue-database-databaseinput"></a>

The structure used to create or update a database.

## Syntax
<a name="aws-properties-glue-database-databaseinput-syntax"></a>

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

### JSON
<a name="aws-properties-glue-database-databaseinput-syntax.json"></a>

```
{
  "[CreateTableDefaultPermissions](#cfn-glue-database-databaseinput-createtabledefaultpermissions)" : [ PrincipalPrivileges, ... ],
  "[Description](#cfn-glue-database-databaseinput-description)" : String,
  "[FederatedDatabase](#cfn-glue-database-databaseinput-federateddatabase)" : FederatedDatabase,
  "[LocationUri](#cfn-glue-database-databaseinput-locationuri)" : String,
  "[Name](#cfn-glue-database-databaseinput-name)" : String,
  "[Parameters](#cfn-glue-database-databaseinput-parameters)" : Json,
  "[TargetDatabase](#cfn-glue-database-databaseinput-targetdatabase)" : DatabaseIdentifier
}
```

### YAML
<a name="aws-properties-glue-database-databaseinput-syntax.yaml"></a>

```
  [CreateTableDefaultPermissions](#cfn-glue-database-databaseinput-createtabledefaultpermissions): 
    - PrincipalPrivileges
  [Description](#cfn-glue-database-databaseinput-description): String
  [FederatedDatabase](#cfn-glue-database-databaseinput-federateddatabase): 
    FederatedDatabase
  [LocationUri](#cfn-glue-database-databaseinput-locationuri): String
  [Name](#cfn-glue-database-databaseinput-name): String
  [Parameters](#cfn-glue-database-databaseinput-parameters): Json
  [TargetDatabase](#cfn-glue-database-databaseinput-targetdatabase): 
    DatabaseIdentifier
```

## Properties
<a name="aws-properties-glue-database-databaseinput-properties"></a>

`CreateTableDefaultPermissions`  <a name="cfn-glue-database-databaseinput-createtabledefaultpermissions"></a>
Creates a set of default permissions on the table for principals. Used by AWS Lake Formation. Not used in the normal course of AWS Glue operations.  
*Required*: No  
*Type*: Array of [PrincipalPrivileges](aws-properties-glue-database-principalprivileges.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-glue-database-databaseinput-description"></a>
A description of the database.  
*Required*: No  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*`  
*Minimum*: `0`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FederatedDatabase`  <a name="cfn-glue-database-databaseinput-federateddatabase"></a>
A `FederatedDatabase` structure that references an entity outside the AWS Glue Data Catalog.  
*Required*: No  
*Type*: [FederatedDatabase](aws-properties-glue-database-federateddatabase.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LocationUri`  <a name="cfn-glue-database-databaseinput-locationuri"></a>
The location of the database (for example, an HDFS path).   
*Required*: No  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*`  
*Minimum*: `1`  
*Maximum*: `1024`  
*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-glue-database-databaseinput-name"></a>
The name of the database. For Hive compatibility, this is folded to lowercase when it is stored.  
*Required*: No  
*Type*: String  
*Pattern*: `[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Parameters`  <a name="cfn-glue-database-databaseinput-parameters"></a>
These key-value pairs define parameters and properties of the database.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetDatabase`  <a name="cfn-glue-database-databaseinput-targetdatabase"></a>
A `DatabaseIdentifier` structure that describes a target database for resource linking.  
*Required*: No  
*Type*: [DatabaseIdentifier](aws-properties-glue-database-databaseidentifier.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Glue::Database DataLakePrincipal
<a name="aws-properties-glue-database-datalakeprincipal"></a>

The AWS Lake Formation principal.

## Syntax
<a name="aws-properties-glue-database-datalakeprincipal-syntax"></a>

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

### JSON
<a name="aws-properties-glue-database-datalakeprincipal-syntax.json"></a>

```
{
  "[DataLakePrincipalIdentifier](#cfn-glue-database-datalakeprincipal-datalakeprincipalidentifier)" : String
}
```

### YAML
<a name="aws-properties-glue-database-datalakeprincipal-syntax.yaml"></a>

```
  [DataLakePrincipalIdentifier](#cfn-glue-database-datalakeprincipal-datalakeprincipalidentifier): String
```

## Properties
<a name="aws-properties-glue-database-datalakeprincipal-properties"></a>

`DataLakePrincipalIdentifier`  <a name="cfn-glue-database-datalakeprincipal-datalakeprincipalidentifier"></a>
An identifier for the AWS Lake Formation principal.  
*Required*: Conditional  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Glue::Database FederatedDatabase
<a name="aws-properties-glue-database-federateddatabase"></a>

A `FederatedDatabase` structure that references an entity outside the AWS Glue Data Catalog.

## Syntax
<a name="aws-properties-glue-database-federateddatabase-syntax"></a>

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

### JSON
<a name="aws-properties-glue-database-federateddatabase-syntax.json"></a>

```
{
  "[ConnectionName](#cfn-glue-database-federateddatabase-connectionname)" : String,
  "[Identifier](#cfn-glue-database-federateddatabase-identifier)" : String
}
```

### YAML
<a name="aws-properties-glue-database-federateddatabase-syntax.yaml"></a>

```
  [ConnectionName](#cfn-glue-database-federateddatabase-connectionname): String
  [Identifier](#cfn-glue-database-federateddatabase-identifier): String
```

## Properties
<a name="aws-properties-glue-database-federateddatabase-properties"></a>

`ConnectionName`  <a name="cfn-glue-database-federateddatabase-connectionname"></a>
The name of the connection to the external metastore.  
*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)

`Identifier`  <a name="cfn-glue-database-federateddatabase-identifier"></a>
A unique identifier for the federated database.  
*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)

# AWS::Glue::Database PrincipalPrivileges
<a name="aws-properties-glue-database-principalprivileges"></a>

the permissions granted to a principal

## Syntax
<a name="aws-properties-glue-database-principalprivileges-syntax"></a>

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

### JSON
<a name="aws-properties-glue-database-principalprivileges-syntax.json"></a>

```
{
  "[Permissions](#cfn-glue-database-principalprivileges-permissions)" : [ String, ... ],
  "[Principal](#cfn-glue-database-principalprivileges-principal)" : DataLakePrincipal
}
```

### YAML
<a name="aws-properties-glue-database-principalprivileges-syntax.yaml"></a>

```
  [Permissions](#cfn-glue-database-principalprivileges-permissions): 
    - String
  [Principal](#cfn-glue-database-principalprivileges-principal): 
    DataLakePrincipal
```

## Properties
<a name="aws-properties-glue-database-principalprivileges-properties"></a>

`Permissions`  <a name="cfn-glue-database-principalprivileges-permissions"></a>
The permissions that are granted to the principal.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Principal`  <a name="cfn-glue-database-principalprivileges-principal"></a>
The principal who is granted permissions.  
*Required*: No  
*Type*: [DataLakePrincipal](aws-properties-glue-database-datalakeprincipal.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)