Skip to content

Missing permissions in DEPLOY_WEBINY_PROJECT_CF_TEMPLATE #4320

@cat5inthecradle

Description

@cat5inthecradle

Version

5.40.6

Operating System

N/A

Browser

N/A

What are the steps to reproduce this bug?

To deploy our initial Webiny infrastructure, we followed these steps:

  1. create a new AWS Account
  2. Create an IAM user, "Webiny_Deployer" with no permissions
  3. Use the provided cloudformation template in the docs to assign the user to least-privilege groups suitable for deploying Webiny. This was created in us-east-1.
  4. Attempt to deploy Webiny, using the "Webiny_Deployer" user, via yarn webiny deploy

What is the expected behavior?

Successful Webiny environment creation.

What do you see instead?

We receive an IAM permissions error (account ID's redacted)

validating Step Functions State Machine definition:
User: arn:aws:iam::REDACTED:user/Webiny_Deployer
is not authorized to perform:
states:ValidateStateMachineDefinition on resource: arn:aws:states:us-east-1:REDACTED:stateMachine:*
because no identity-based policy allows the states:ValidateStateMachineDefinition action

And additional errors appear as each permission is granted. Logging them here:

  • states:ValidateStateMachineDefinition on resource: arn:aws:states:us-east-1:REDACTED:stateMachine:*
  • states:ListStateMachineVersions on resource: stateMachine:wby-background-task-sfn-811a8dd
  • cloudfront:GetDistribution on resource: distribution/<distribution id> - This occurred on yarn webiny destroy
    • this looks like a Condition mismatch.
  • lambda:ListTags on resource: event-source-mapping:<guid>
    • this looks like a Condition mismatch.

Additional information

No response

Possible solution

#4321

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions