

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

# AWS::AmplifyGen3::IntegrationConnection

The `AWS::AmplifyGen3::IntegrationConnection` resource connects an Amazon Amplify Gen 3 integration configuration to an environment. The connection gives the environment the environment variables that the integration provides.

## Syntax
<a name="aws-resource-amplifygen3-integrationconnection-syntax"></a>

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

### JSON
<a name="aws-resource-amplifygen3-integrationconnection-syntax.json"></a>

```json
{
  "Type" : "AWS::AmplifyGen3::IntegrationConnection",
  "Properties" : {
      "[EnvironmentArn](#cfn-amplifygen3-integrationconnection-environmentarn)" : {{String}},
      "[IntegrationArn](#cfn-amplifygen3-integrationconnection-integrationarn)" : {{String}}
    }
}
```

### YAML
<a name="aws-resource-amplifygen3-integrationconnection-syntax.yaml"></a>

```yaml
Type: AWS::AmplifyGen3::IntegrationConnection
Properties:
  [EnvironmentArn](#cfn-amplifygen3-integrationconnection-environmentarn): {{String}}
  [IntegrationArn](#cfn-amplifygen3-integrationconnection-integrationarn): {{String}}
```

## Properties
<a name="aws-resource-amplifygen3-integrationconnection-properties"></a>

`EnvironmentArn`  <a name="cfn-amplifygen3-integrationconnection-environmentarn"></a>
The Amazon Resource Name (ARN) of the environment.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IntegrationArn`  <a name="cfn-amplifygen3-integrationconnection-integrationarn"></a>
The Amazon Resource Name (ARN) of the integration.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-amplifygen3-integrationconnection-return-values"></a>

### Ref
<a name="aws-resource-amplifygen3-integrationconnection-return-values-ref"></a>

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

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

### Fn::GetAtt
<a name="aws-resource-amplifygen3-integrationconnection-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 [`Fn::GetAtt`](https://docs.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-amplifygen3-integrationconnection-return-values-fn--getatt-fn--getatt"></a>

`ConnectionId`  <a name="ConnectionId-fn::getatt"></a>
The ID of the integration connection.

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The time at which the integration connection was created. The value is in ISO-8601 format.

`IntegrationName`  <a name="IntegrationName-fn::getatt"></a>
The name of the integration.

## Examples
<a name="aws-resource-amplifygen3-integrationconnection--examples"></a>

### Connect an integration configuration to an environment
<a name="aws-resource-amplifygen3-integrationconnection--examples--Connect_an_integration_configuration_to_an_environment"></a>

The following example connects an existing integration configuration to an existing environment.

#### JSON
<a name="aws-resource-amplifygen3-integrationconnection--examples--Connect_an_integration_configuration_to_an_environment--json"></a>

```json
{
    "Resources": {
        "MyIntegrationConnection": {
            "Type": "AWS::AmplifyGen3::IntegrationConnection",
            "Properties": {
                "IntegrationArn": "arn:aws:amplifygen3:us-east-1:123456789012:integration-configuration/my-bucket",
                "EnvironmentArn": "arn:aws:amplifygen3:us-east-1:123456789012:app/my-app/environment/staging"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-amplifygen3-integrationconnection--examples--Connect_an_integration_configuration_to_an_environment--yaml"></a>

```yaml
Resources:
  MyIntegrationConnection:
    Type: AWS::AmplifyGen3::IntegrationConnection
    Properties:
      IntegrationArn: arn:aws:amplifygen3:us-east-1:123456789012:integration-configuration/my-bucket
      EnvironmentArn: arn:aws:amplifygen3:us-east-1:123456789012:app/my-app/environment/staging
```