sparkleformation/sfn-lambda

role name is not accepting

Opened this issue · 1 comments

i'm not able to pass role name in lambda function.
lambda!(:index, :role => attr!(lambda_role, 'Arn')) or
lamdba!(:index, :role => 'LambdaRole')

I'm getting ERROR: TypeError: Received invalid value type Hash! (Allowed types: String, Symbol) -> ./.vendor/bundle/ruby/2.2.0/gems/sfn-lambda-0.1.2/lib/sfn-lambda/inject.rb @ line 12
vendor/bundle/ruby/2.2.0/gems/sparkle_formation-3.0.10/lib/sparkle_formation/utils.rb:23:in __t_check' ./.vendor/bundle/ruby/2.2.0/gems/sparkle_formation-3.0.10/lib/sparkle_formation/utils.rb:33:in __t_stringish'
./.vendor/bundle/ruby/2.2.0/gems/sfn-lambda-0.1.2/lib/sfn-lambda/inject.rb:12:in `_lambda'

You can try with:

  lambda!(:lambda_function_name, '',
    :role => attr!('iam_role_resource_name', 'Arn')
  )

Pay attention on the second argument (which is empty at that case), this will do the trick in that case.