KumologicaHQ / kumologica-support

3 stars 0 forks source link

Error on Deployment to AWS #26

Closed sparkyrider closed 2 years ago

sparkyrider commented 3 years ago

I'm getting this error: Kumologica: Error: Only literal string and Environment variable reference env. are supported sources of values. To use other types you must specify explicit role arn in function properties. I don't have any environment variables defined, and from what I understood about the error, I even created an IAM Role and added that to the deployment, but received the same error.

This is the first time I've received an error like this, and I'm sure it's something simple, but I can't seem to figure it out. Any insights you have into this error would be greatly appreciated.

sparkyrider commented 3 years ago

I was able to figure out the issue. I had an S3 node with the Bucket Name referencing msg.source.bucketName which was defined in the flow and worked locally, but I'm guessing that on deployment to Lambda, it saw that reference as invalid.

Is the S3 Node supposed to support msg.bucketName or is it required to be hardcoded or provided in a different way?

bjq-dev commented 3 years ago

Kumologica designer is building IAM role with relevant permissions based on nodes and events used by the flow. To put specific resources into policy definition, the relevant parameters must be known during deploy time. The only sources of resource details known at deployment time are: fixed string or environment variable. If your flow computes resource identifiers during processing time and you use msg. or vars. to access them, you need to build IAM role yourself and provide its ARN on AWS Tab under More Parameters -> Custom Role section. Designer will skip role creation and use the ARN you provide.