lib/modulator/stack/policies.rb
def add_lambda_iam_role(function_name: nil)
      StackBuilder.stack.add('LambdaRole', Humidifier::IAM::Role.new(
          assume_role_policy_document: {
            "Version" => "2012-10-17",
            'Statement' => [
              {
                "Action" => ["sts:AssumeRole"],
                "Effect" => "Allow",
                'Principal' => {
                  'Service' => ["lambda.amazonaws.com"]
                }
              }
            ]
          },
          policies: []
        )
      )
    end
# add inline iam role to lambda, NOTE: use the same role for all lambdas for now
add inline iam role to lambda, NOTE: use the same role for all lambdas for now
add inline iam role to lambda NOTE : use the same role for all lambdas for now
def add_lambda_iam_role(function_name: nil)
      StackBuilder.stack.add('LambdaRole', Humidifier::IAM::Role.new(
          assume_role_policy_document: {
            "Version" => "2012-10-17",
            'Statement' => [
              {
                "Action" => ["sts:AssumeRole"],
                "Effect" => "Allow",
                'Principal' => {
                  'Service' => ["lambda.amazonaws.com"]
                }
              }
            ]
          },
          policies: []
        )
      )
    end
def add_lambda_iam_role ( function_name : nil ) StackBuilder . stack . add ( 'LambdaRole' , Humidifier :: IAM :: Role . new ( assume_role_policy_document : { "Version" => "2012-10-17" , 'Statement' => [ { "Action" => [ "sts:AssumeRole" ] , "Effect" => "Allow" , 'Principal' => { 'Service' => [ "lambda.amazonaws.com" ] } } ] } , policies : [ ] ) ) end
add inline iam role to lambda, NOTE: use the same role for all lambdas for now
add inline iam role to lambda NOTE : use the same role for all lambdas for now
function_name