Skip to content

Invalid principal deploying IamRoleStateMachineExecution Role #59

@robizz

Description

@robizz

Hi,
using
[email protected]
[email protected]

found a problem while deploying a state machine

IamRoleStateMachineExecution Invalid principal in policy: "SERVICE":"states.${opt:region, self:custom.defaultRegion}.amazonaws.com"

I'm a noob at nodejs but I managed to fix it doing in the serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js file :

- iamRoleStateMachineExecutionTemplate.replace('[region]', this.region)
+ iamRoleStateMachineExecutionTemplate.replace('[region]', this.options.region)

please see the attached patch
local_history.patch.txt

sorry for not submitting PR, but I'm not sure if the fix is right :)

Regards and keep up with this good work!

Roberto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions