Interface ICredentials
Specifies a target role assumed by the State Machine's execution role for invoking the task's resource.
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICredentials
Syntax (vb)
Public Interface ICredentials
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda;
Function submitLambda;
Role iamRole;
// use a fixed role for all task invocations
var role = TaskRole.FromRole(iamRole);
// or use a json expression to resolve the role at runtime based on task inputs
//const role = sfn.TaskRole.fromRoleArnJsonPath('$.RoleArn');
var submitJob = new LambdaInvoke(this, "Submit Job", new LambdaInvokeProps {
LambdaFunction = submitLambda,
OutputPath = "$.Payload",
// use credentials
Credentials = new Credentials { Role = role }
});
Synopsis
Properties
Role | The role to be assumed for executing the Task. |