integration/resources/templates/combination/connector_httpapi_to_function.yaml [1:69]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  MyRole1:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Effect: Allow
          Action: sts:AssumeRole
          Principal:
            Service: lambda.amazonaws.com
      ManagedPolicyArns:
      - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole

  MyRole2:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Effect: Allow
          Action: sts:AssumeRole
          Principal:
            Service: lambda.amazonaws.com
      ManagedPolicyArns:
      - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole

  TriggerFunction:
    Type: AWS::Lambda::Function
    Properties:
      Role: !GetAtt MyRole1.Arn
      Runtime: nodejs18.x
      Handler: index.handler
      Code:
        ZipFile: |
          const https = require('https');

          exports.handler = (event, context, callback) => {
            const req = https.get(process.env.API_URL, res => {
              
              var body = [];

              res.on('data', function(chunk) {
                  body.push(chunk);
              });

              res.on('end', function() {
                  try {
                    const message = JSON.parse(Buffer.concat(body).toString())['message'];
                    if (message === "connector works!") {
                      callback(null, {
                        StatusCode: res.statusCode,
                      });
                    } else {
                      callback(new Error("Unexpected message"));
                    }
                  } catch(error) {
                    callback(error);
                  }
              });
            });
            
            req.on('error', error => {
              callback(error);
            });
            
            req.end();
          };

      Environment:
        Variables:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



integration/resources/templates/combination/connector_restapi_to_function.yaml [1:69]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  MyRole1:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Effect: Allow
          Action: sts:AssumeRole
          Principal:
            Service: lambda.amazonaws.com
      ManagedPolicyArns:
      - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole

  MyRole2:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Effect: Allow
          Action: sts:AssumeRole
          Principal:
            Service: lambda.amazonaws.com
      ManagedPolicyArns:
      - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole

  TriggerFunction:
    Type: AWS::Lambda::Function
    Properties:
      Role: !GetAtt MyRole1.Arn
      Runtime: nodejs18.x
      Handler: index.handler
      Code:
        ZipFile: |
          const https = require('https');

          exports.handler = (event, context, callback) => {
            const req = https.get(process.env.API_URL, res => {
              
              var body = [];

              res.on('data', function(chunk) {
                  body.push(chunk);
              });

              res.on('end', function() {
                  try {
                    const message = JSON.parse(Buffer.concat(body).toString())['message'];
                    if (message === "connector works!") {
                      callback(null, {
                        StatusCode: res.statusCode,
                      });
                    } else {
                      callback(new Error("Unexpected message"));
                    }
                  } catch(error) {
                    callback(error);
                  }
              });
            });
            
            req.on('error', error => {
              callback(error);
            });
            
            req.end();
          };

      Environment:
        Variables:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



