events:PutRule

Write

events:PutRule is a Write access-level action in the events service. Grants permission to create or updates rules

Resource types

ARNs that events:PutRule can be scoped to in an IAM policy.

arn:${Partition}:events:${Region}:${Account}:rule/${EventBusName}/${RuleName}
rule-on-custom-event-bus
arn:${Partition}:events:${Region}:${Account}:rule/${RuleName}
rule-on-default-event-bus

Condition keys

Keys you can use in the Condition block of a policy that grants events:PutRule.

aws:RequestTag/${TagKey} String

Filters access by the allowed set of values for each of the tags to event bus and rule actions

aws:TagKeys ArrayOfString

Filters access by the tags in the request to event bus and rule actions

events:ManagedBy String

Filters access by AWS services. If a rule is created by an AWS service on your behalf, the value is the principal name of the service that created the rule

events:creatorAccount String

Filters access by the account the rule was created in to rule actions

events:detail-type ArrayOfString

Filters access by the literal string of the detail-type of the event to PutEvents and PutRule actions

events:detail.eventTypeCode String

Filters access by the literal string for the detail.eventTypeCode field of the event to PutRule actions

events:detail.service String

Filters access by the literal string for the detail.service field of the event to PutRule actions

events:detail.userIdentity.principalId String

Filters access by the literal string for the detail.useridentity.principalid field of the event to PutRule actions

events:source ArrayOfString

Filters access by the AWS service or AWS partner event source that generated the event to PutEvents and PutRule actions, or by the configured source of an event source to the CreateEventSource and UpdateEventSource actions. Matches the literal string of the source field of the event

aws:ResourceTag/${TagKey} String

Filters access by tag-value associated with the resource to event bus and rule actions

Example IAM policy

A minimal policy that allows events:PutRule. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowEventsPutRule",
      "Effect": "Allow",
      "Action": "events:PutRule",
      "Resource": "*"
    }
  ]
}

Related actions in events

View all events actions →