Closed rrhodes closed 1 year ago
Hi @rrhodes, thanks for reaching out!
Have you considered using the payloadS3
input parameter? That allows you to provide an S3 bucket/key that contains the input payload (instead of providing it directly to Step Functions).
This should solve the more common case (no error).
In case of errors, I'd suggest to just avoid dumping the credentials into your logs (or somehow encrypt it before dumping it).
Apologies, I didn't fully understand the issue at first :)
Your're correct, we should also add a toggle for the executor function to avoid logging the invocation payload.
Happy to accept a PR 🚀
Thanks for the prompt reply @alexcasalboni! I'll take a look into this and try to have a PR up next week for review. 🙂
@rrhodes would it make more sense as an execution parameter (at runtime) or as a CloudFormation parameter (at deploy time)? I don't have a strong opinion, but it sounds like it would be more flexible as an execution parameter, so you can use the same deployment for both use cases.
it sounds like it would be more flexible as an execution parameter, so you can use the same deployment for both use cases.
An execution parameter I agree would make more sense, yep. 👍🏻
Thanks @alexcasalboni! The name sounds good to me, and thanks for the head's up on the other areas to review. 😊
Hey @alexcasalboni, that should be PR #213 ready for review implementing the agreed approach. Feedback welcome!
Problem
I want to use AWS Lambda Power Tuning to invoke Lambda functions with an input payload that contains credentials. I do not want this information in the AWS Step Functions execution history.
Initially I explored the use of a pre-processor to workaround this by allowing the pre-processor to fetch credentials and pass those direct to the Lambda being tuned. This I understand would all execute within a single state of the Step Functions, so credentials would not be shared in the Step Functions console.
However, if the Lambda being tuned throws an error, we log the payload, which in my case would include the credentials.
Proposed Solutions
Two ideas spring to mind, but I'm open to discussing the problem further and open to other suggestions how to solve this:
we stop including the payload in the error message thrown. The payload I think should be the same for each execution of the Step Functions, unless we use a pre-processor which returns different output given the same input. So is logging the payload valuable?
we introduce a new toggle to enable / disable inclusion of the payload in the error thrown, defaulting to showing the payload to maintain consistent behaviour, but this would allow users like me to disable it if desired.
Contributing
I'm happy to contribute to this project with any agreed changes.