

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Infrastructure Composer에서 카드 연결 해제
<a name="reference-navigation-gestures-disconnect"></a>

Infrastructure Composer에서는 *향상된 구성 요소 카드*와 *표준 구성 요소 카드를* 사용하여 AWS 리소스를 연결하고 연결을 해제합니다. 이 섹션에서는 두 유형의 카드를 모두 연결 해제하는 방법을 설명합니다.

## 향상된 구성 요소 카드
<a name="using-composer-connecting-enhanced-disconnect"></a>

향상된 구성 요소 카드를 연결 해제하려면 라인을 선택하고 **연결 해제**를 선택합니다.

![\[Lambda 함수에서 연결 해제된 API Gateway 카드입니다.\]](http://docs.aws.amazon.com/ko_kr/infrastructure-composer/latest/dg/images/aac_use_con_03.png)


Infrastructure Composer는 애플리케이션에서 이벤트 기반 관계를 제거하도록 템플릿을 자동으로 수정합니다.

## 표준 구성 요소 카드
<a name="w2aac17c31b7"></a>

표준 구성 요소 카드에는 다른 리소스와의 연결을 생성하는 포트가 포함되지 않습니다. [카드 구성](using-composer-standard-cards.md) 중에 애플리케이션의 템플릿에서 이벤트 기반 관계를 지정하면 Infrastructure Composer는 이러한 연결을 자동으로 감지하고 카드 사이에 점선으로 시각화합니다. 표준 구성 요소 카드의 연결을 해제하려면 애플리케이션의 템플릿에서 이벤트 기반 관계를 제거합니다.

다음 예제는 Amazon API Gateway Rest API와 연결된 Lambda 함수를 보여줍니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyApi:
    Type: 'AWS::ApiGateway::RestApi'
    Properties:
      Name: MyApi

  ApiGatewayMethod:
    Type: 'AWS::ApiGateway::Method'
    Properties:
      HttpMethod: POST  # Specify the HTTP method you want to use (e.g., GET, POST, PUT, DELETE)
      ResourceId: !GetAtt MyApi.RootResourceId
      RestApiId: !Ref MyApi
      AuthorizationType: NONE
      Integration:
        Type: AWS_PROXY
        IntegrationHttpMethod: POST
        Uri: !Sub
          - arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaFunctionArn}/invocations
          - { LambdaFunctionArn: !GetAtt MyLambdaFunction.Arn }
      MethodResponses:
        - StatusCode: 200

  MyLambdaFunction:
    Type: 'AWS::Lambda::Function'
    Properties:
      Handler: index.handler
      Role: !GetAtt LambdaExecutionRole.Arn
      Runtime: nodejs14.x
      Code:
        S3Bucket: your-bucket-name
        S3Key: your-lambda-zip-file.zip

  LambdaExecutionRole:
    Type: 'AWS::IAM::Role'
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: lambda.amazonaws.com
            Action: 'sts:AssumeRole'
      Policies:
        - PolicyName: LambdaExecutionPolicy
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - 'logs:CreateLogGroup'
                  - 'logs:CreateLogStream'
                  - 'logs:PutLogEvents'
                Resource: 'arn:aws:logs:*:*:*'
              - Effect: Allow
                Action:
                  - 'lambda:InvokeFunction'
                Resource: !GetAtt MyLambdaFunction.Arn
```

두 카드 간의 연결을 제거하려면 `ApiGatewayMethod:` 아래의에 `MyLambdaFunction` 나열된에 대한 참조를 제거합니다`Integration`.