You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to pass in a Resource as an input during execution?
GetExecutionName:
Type: Task
Resource: arn:aws:states:::lambda:invoke
Parameters:
FunctionName.$: $$.DynamicFunctionArn <-- Is this possible?
Payload:
ExecutionName.$: "$$.Execution.Name"
Example adapted from issue 209 linked below
For example, I want to be able to retry a lambda. Normally, I would have to enter the ARN of the lambda into the resource section like so "Resource: some_lambda_arn".
In my case, I will not know the lamdba ARN in advance. Instead, I will get the lambda ARN as part of the error attributes sent as part of Serverless' error destinations functionality via SQS.
Use case: If Lambda A fails, the failure is sent to SQS -> Lambda B which triggers a state machine to retry Lambda A
(Note: The ARN of lambda A is sent as an attribute of the failure message to SQS).
My questions i, can I pass in the ARN of Lambda A as an input to the state machine, which then uses that to set the Resource?
EDIT: Just stumbled across this issues/209 But instead of the hardcoded ARN, I want to pass in the ARN as an input variable.
The text was updated successfully, but these errors were encountered:
Question about a possible feature
Description
Is it possible to pass in a Resource as an input during execution?
Example adapted from issue 209 linked below
For example, I want to be able to retry a lambda. Normally, I would have to enter the ARN of the lambda into the resource section like so "Resource: some_lambda_arn".
In my case, I will not know the lamdba ARN in advance. Instead, I will get the lambda ARN as part of the error attributes sent as part of Serverless' error destinations functionality via SQS.
Use case: If Lambda A fails, the failure is sent to SQS -> Lambda B which triggers a state machine to retry Lambda A
(Note: The ARN of lambda A is sent as an attribute of the failure message to SQS).
My questions i, can I pass in the ARN of Lambda A as an input to the state machine, which then uses that to set the Resource?
EDIT: Just stumbled across this issues/209 But instead of the hardcoded ARN, I want to pass in the ARN as an input variable.
The text was updated successfully, but these errors were encountered: