AWS Builder Center

Billing Transfer Event Subscription Guide

Monitor billing responsibility transfers in near real time with EventBridge rules that capture the CloudTrail events and deliver them to SNS or Lambda.

helping AWS build services and programs for AWS Partners

Overview

AWS Organizations records every billing responsibility transfer operation in CloudTrail and delivers those records to Amazon EventBridge, so you can monitor transfers and automate responses. The records fall into two categories:
  • Service events ( AwsServiceEvent ) — high-level lifecycle events. Only two exist:  ResponsibilityTransferAccepted  and  ResponsibilityTransferTerminated . Each is delivered to the party that did not initiate the action — and, in a chained (three-tier) transfer, also to each payer further up the chain (see Chained transfers and transferChain).
  • API calls ( AwsApiCall ) — the underlying Organizations operations (invite, accept, decline, cancel, rename, terminate). Each is recorded in the account that made the call.  AcceptHandshake  and  DeclineHandshake  are additionally recorded in the inviting organization's management account as a shared copy of the same call (see Event identifiers and de-duplication).
Both categories reach EventBridge as CloudTrail events, which requires the account to have a CloudTrail trail that logs management events. For details, see  AWS service events delivered via AWS CloudTrail  in the Amazon EventBridge User Guide.
Acceptance and termination are the only actions that raise a service event; every other action is visible only as an API call, and expiry produces no event at all. The table below maps each lifecycle action to the events it produces:
Lifecycle action
What CloudTrail records
Invitation sent
InviteOrganizationToTransferResponsibility API call (inviter account only); no service event
Invitation accepted
AcceptHandshake API call (both accounts), plus the ResponsibilityTransferAccepted service event (to the payer)
Invitation declined
DeclineHandshake API call (both accounts); no service event
Invitation canceled
CancelHandshake API call (inviter account only); no service event
Invitation expired
no record at all — no API call, no service event
Transfer renamed
UpdateResponsibilityTransfer API call (caller account only); no service event
Transfer terminated
TerminateResponsibilityTransfer API call (initiator account), plus the ResponsibilityTransferTerminated service event (to the other party)
The parenthetical notes where each record lands. "Both accounts" means the caller's account plus a shared copy in the inviting organization's management account. In chained transfers, both service events also reach upstream payers (see Chained transfers and transferChain); expired invitations produce no record at all, so poll  describe-responsibility-transfer  for  Status  =  EXPIRED  instead.
⚠️ Only acceptance and termination raise a service event Declined, canceled, expired, and renamed invitations emit no service event — detect those through the API calls (see below) or by polling  describe-responsibility-transfer .

Prerequisites

Using AWS CloudShell (recommended)

The easiest way to run these commands is using AWS CloudShell, which comes pre-configured with the AWS CLI and appropriate permissions.
Open CloudShell from the AWS Management Console:
AWS Management Console showing the CloudShell icon in the top navigation bar


Alternative: local AWS CLI

If using your local environment, ensure you have:
  • AWS CLI configured with appropriate permissions
  • Access to Amazon EventBridge in your AWS account
  • A CloudTrail trail that logs management events in the account and Region
The examples in this guide call the following IAM actions:  events:PutRule ,  events:PutTargets ,  events:DescribeRule ,  events:ListTargetsByRule ,  events:RemoveTargets ,  events:DeleteRule ,  sns:CreateTopic ,  sns:Subscribe ,  sns:SetTopicAttributes ,  sns:DeleteTopic ,  lambda:AddPermission , and  sts:GetCallerIdentity .

Setup instructions

Step 1: Create the EventBridge rules

Create one rule per event category. Splitting them lets each pattern pin its own  eventType  and  detail-type  — so a rule matches only its category — and lets you manage the two independently.
# Rule 1: service events
aws events put-rule \
--name "billing-transfer-service-events" \
--description "Capture Billing Transfer service events (accept, terminate)" \
--event-pattern '{
"source": ["aws.organizations"],
"detail-type": ["AWS Service Event via CloudTrail"],
"detail": {
"eventSource": ["organizations.amazonaws.com"],
"eventType": ["AwsServiceEvent"],
"eventName": [
"ResponsibilityTransferAccepted",
"ResponsibilityTransferTerminated"
]
}
}'

# Rule 2: API calls. Failed calls (for example AccessDenied) are also logged
# to CloudTrail, so the pattern excludes records that carry an errorCode.
aws events put-rule \
--name "billing-transfer-api-calls" \
--description "Capture Billing Transfer API calls (invite, accept, decline, cancel, rename, terminate)" \
--event-pattern '{
"source": ["aws.organizations"],
"detail-type": ["AWS API Call via CloudTrail"],
"detail": {
"eventSource": ["organizations.amazonaws.com"],
"eventType": ["AwsApiCall"],
"eventName": [
"InviteOrganizationToTransferResponsibility",
"AcceptHandshake",
"DeclineHandshake",
"CancelHandshake",
"UpdateResponsibilityTransfer",
"TerminateResponsibilityTransfer"
],
"errorCode": [ { "exists": false } ]
}
}'
📘 A CloudTrail trail is required CloudTrail-delivered events — both detail types used here — reach EventBridge only when the account has a CloudTrail trail logging management events in the Region. Without one, neither rule receives events. Remove the  errorCode  filter from the second rule if you also want to observe failed API calls (for example, accept attempts rejected with  AccessDenied ).

Step 2: Choose your target

You can send events to different targets depending on your needs. Choose one of the following options. The examples use a distinct target Id per option ( sns-notification ,  lambda-processor ), so adding one target never silently replaces the other —  put-targets  overwrites an existing target that has the same Id.

Event processing options

Option 1: Email notifications via SNS

For simple email notifications when Billing Transfer events occur, use Amazon SNS as your EventBridge target:

Create the SNS topic

# Create SNS topic and capture the ARN
TOPIC_ARN=$(aws sns create-topic \
--name "billing-transfer-notifications" \
--query 'TopicArn' \
--output text)

echo "Created topic: $TOPIC_ARN"

Subscribe an email address

# Subscribe your email address to receive notifications
aws sns subscribe \
--topic-arn "$TOPIC_ARN" \
--protocol "email" \
--notification-endpoint "your-email@company.com"
📘 Confirm your subscription You'll receive a confirmation email that you must click to activate the subscription.

Add the SNS topic as an EventBridge target

# Add the SNS topic as a target on each rule (TOPIC_ARN was set above)
aws events put-targets \
--rule "billing-transfer-service-events" \
--targets "Id"="sns-notification","Arn"="$TOPIC_ARN"

aws events put-targets \
--rule "billing-transfer-api-calls" \
--targets "Id"="sns-notification","Arn"="$TOPIC_ARN"

Grant EventBridge permission to publish

# Allow EventBridge to publish to your SNS topic.
# Note: this REPLACES the topic's access policy.
aws sns set-topic-attributes \
--topic-arn "$TOPIC_ARN" \
--attribute-name "Policy" \
--attribute-value '{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {
"Service": "events.amazonaws.com"
},
"Action": "SNS:Publish",
"Resource": "'"$TOPIC_ARN"'"
}]
}'
📘 Why this policy has no Condition Amazon SNS topic policies for EventBridge do not support  Condition  blocks — adding one (for example  aws:SourceAccount ) blocks delivery. This statement follows the  Amazon SNS permissions guidance for EventBridge . To scope the Lambda option instead, the  add-permission  calls in Option 2 pin each grant to a specific rule ARN.

Email message format

When events occur, you'll receive emails whose body is the complete EventBridge event in JSON format — the envelope plus the full CloudTrail record in  detail , as shown in Event schema examples:
Subject:  AWS Notification Message 
Body (excerpt —  detail  is abbreviated here):
{
"version": "0",
"id": "49021116-22f4-3428-8f0f-637fe27127f8",
"detail-type": "AWS Service Event via CloudTrail",
"source": "aws.organizations",
"account": "222222222222",
"time": "2025-10-18T02:17:42Z",
"region": "us-east-1",
"resources": [],
"detail": {
"eventName": "ResponsibilityTransferAccepted",
"eventTime": "2025-10-18T02:17:42Z",
"eventType": "AwsServiceEvent",
"serviceEventDetails": {
"id": "rt-1a2b3c4d",
"type": "BILLING",
"status": "ACCEPTED",
"source": {
"managementAccountId": "111111111111"
},
"target": {
"managementAccountId": "222222222222"
}
}
}
}

Multiple email recipients

To notify multiple people, add additional email subscriptions:
# Add additional email subscribers (TOPIC_ARN already set from above)
aws sns subscribe \
--topic-arn "$TOPIC_ARN" \
--protocol "email" \
--notification-endpoint "partner-ops@company.com"

aws sns subscribe \
--topic-arn "$TOPIC_ARN" \
--protocol "email" \
--notification-endpoint "billing-team@company.com"

Option 2: Advanced processing with Lambda

For more sophisticated event processing, use AWS Lambda to handle events programmatically. Work through this option in order: write the handler, create the function from it, then add the function as a target on the rules.

Lambda function handler (Python)

Save the handler below as  lambda_function.py ; the next step creates the function from it:
import json
import logging

logger = logging.getLogger()
logger.setLevel(logging.INFO)

def lambda_handler(event, context):
"""Process Billing Transfer CloudTrail events"""

# Extract event details
detail = event.get('detail', {})
event_name = detail.get('eventName')
event_time = detail.get('eventTime')

# Failed API calls are also logged to CloudTrail. The rule pattern in
# Step 1 already excludes them; this guard protects the handler if the
# pattern is broadened.
if detail.get('errorCode'):
logger.info(f"Skipping failed call {event_name}: {detail['errorCode']}")
return {'statusCode': 200}

logger.info(f"Processing BT event: {event_name} at {event_time}")

# API-call events carry no serviceEventDetails block; the actor is in
# userIdentity and the arguments are in requestParameters.
API_CALL_EVENTS = {
'InviteOrganizationToTransferResponsibility',
'AcceptHandshake',
'DeclineHandshake',
'CancelHandshake',
'UpdateResponsibilityTransfer',
'TerminateResponsibilityTransfer',
}

if event_name == 'ResponsibilityTransferAccepted':
handle_transfer_accepted(detail)
elif event_name == 'ResponsibilityTransferTerminated':
handle_transfer_terminated(detail)
elif event_name in API_CALL_EVENTS:
handle_api_call(detail)

return {'statusCode': 200}

def handle_transfer_accepted(detail):
"""Process transfer acceptance event"""
service_details = detail.get('serviceEventDetails', {})
transfer_id = service_details.get('id')
source = service_details.get('source', {}).get('managementAccountId')
target = service_details.get('target', {}).get('managementAccountId')
logger.info(f"Transfer {transfer_id} accepted: {source} -> {target}")
# Add your business logic here

def handle_transfer_terminated(detail):
"""Process transfer termination event.

This event fires only when an already-ACCEPTED transfer is withdrawn, so
status is always 'WITHDRAWN'. Declined, canceled, and expired invitations
(never accepted) do NOT produce this event.
"""
service_details = detail.get('serviceEventDetails', {})
transfer_id = service_details.get('id')
status = service_details.get('status') # always 'WITHDRAWN'
source = service_details.get('source', {}).get('managementAccountId')
target = service_details.get('target', {}).get('managementAccountId')

logger.info(f"Transfer {transfer_id} withdrawn ({status}): {source} -> {target}")
# Add your business logic for withdrawn transfers here.
# To track declined / canceled / expired invitations, poll
# describe-responsibility-transfer instead — they are not delivered here.

def handle_api_call(detail):
"""Process an AwsApiCall event (invite, accept, decline, cancel, rename,
terminate).

These have no serviceEventDetails block — the caller is in userIdentity and
the arguments are in requestParameters. Note the identifier differs by
call: the *Handshake calls carry requestParameters.handshakeId, the
rt-level calls carry requestParameters.id, and the invite carries neither
(its new handshake ID is in responseElements.handshake.id).
"""
event_name = detail.get('eventName')
actor = (detail.get('userIdentity') or {}).get('accountId')
params = detail.get('requestParameters') or {}
response = detail.get('responseElements') or {}
identifier = (params.get('id') or params.get('handshakeId')
or (response.get('handshake') or {}).get('id'))

logger.info(f"API call {event_name} by {actor} on {identifier}: {params}")
# Add your business logic for the individual API calls here.

Create the Lambda function

Create the function from the handler above using the AWS Console or CLI — a Python runtime and the basic execution role are all it needs. Billing Transfer events are emitted in us-east-1, so create the function there, in the same account and Region as the rules from Step 1. If you haven't created a function before, see  Create your first Lambda function  in the AWS Lambda Developer Guide.

Add the function as a target on each rule

📘 Run this after the function exists The  add-permission  calls fail with  ResourceNotFoundException: Function not found  when the function hasn't been created yet. Replace "process-bt-events" with your actual function name.
# Set your Lambda function name
FUNCTION_NAME="process-bt-events"

# Build the function ARN (the function was created in us-east-1 above)
REGION="us-east-1"
ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
LAMBDA_ARN="arn:aws:lambda:$REGION:$ACCOUNT_ID:function:$FUNCTION_NAME"

# Add the Lambda function as a target on each rule, and grant EventBridge
# permission to invoke it from each rule. The named statement IDs show which
# grant belongs to which rule.
aws events put-targets \
--rule "billing-transfer-service-events" \
--targets "Id"="lambda-processor","Arn"="$LAMBDA_ARN"

aws lambda add-permission \
--function-name "$FUNCTION_NAME" \
--statement-id "allow-eventbridge-service-events" \
--action "lambda:InvokeFunction" \
--principal "events.amazonaws.com" \
--source-arn "arn:aws:events:$REGION:$ACCOUNT_ID:rule/billing-transfer-service-events"

aws events put-targets \
--rule "billing-transfer-api-calls" \
--targets "Id"="lambda-processor","Arn"="$LAMBDA_ARN"

aws lambda add-permission \
--function-name "$FUNCTION_NAME" \
--statement-id "allow-eventbridge-api-calls" \
--action "lambda:InvokeFunction" \
--principal "events.amazonaws.com" \
--source-arn "arn:aws:events:$REGION:$ACCOUNT_ID:rule/billing-transfer-api-calls"

Event schema examples

ResponsibilityTransferAccepted event

{
"version": "0",
"id": "49021116-22f4-3428-8f0f-637fe27127f8",
"detail-type": "AWS Service Event via CloudTrail",
"source": "aws.organizations",
"account": "222222222222",
"time": "2025-10-18T02:17:42Z",
"region": "us-east-1",
"resources": [],
"detail": {
"eventVersion": "1.11",
"userIdentity": {
"type": "AWSService",
"invokedBy": "AWS Internal"
},
"eventTime": "2025-10-18T02:17:42Z",
"eventSource": "organizations.amazonaws.com",
"eventName": "ResponsibilityTransferAccepted",
"awsRegion": "us-east-1",
"sourceIPAddress": "AWS Internal",
"userAgent": "AWS Internal",
"requestParameters": null,
"responseElements": null,
"eventID": "3f2a9c1e-8b4d-4a6f-9c2e-5d7b1a3f8e60",
"readOnly": false,
"eventType": "AwsServiceEvent",
"managementEvent": true,
"recipientAccountId": "222222222222",
"sharedEventID": "9b1c4d7e-2f5a-4e8b-b3c6-0d9e2a5f8b71",
"serviceEventDetails": {
"id": "rt-1a2b3c4d",
"transferChain": [
"rt-1a2b3c4d"
],
"type": "BILLING",
"status": "ACCEPTED",
"source": {
"managementAccountId": "111111111111"
},
"target": {
"managementAccountId": "222222222222"
},
"requester": "111111111111",
"startTimestamp": 1761955200000
},
"eventCategory": "Management"
}
}
The  requester  field identifies the management account that performed the action (here, the customer that accepted). Timestamps in  serviceEventDetails  are epoch milliseconds.
📘 Which account receives this event The customer (bill source) accepts with  AcceptHandshake , so the service event lands on the payer's event bus, not the customer's — create your EventBridge rule in the payer account. In a chained transfer, payers further up the chain also receive a copy (see Chained transfers and transferChain). A transfer's  source  is populated only after acceptance; while the invitation is still  REQUESTED ,  describe-responsibility-transfer  returns only the  target  and an  ActiveHandshakeId .

ResponsibilityTransferTerminated event

{
"version": "0",
"id": "4104ca86-d324-352c-8ea9-7246c80fee88",
"detail-type": "AWS Service Event via CloudTrail",
"source": "aws.organizations",
"account": "222222222222",
"time": "2025-10-18T02:25:02Z",
"region": "us-east-1",
"resources": [],
"detail": {
"eventVersion": "1.11",
"userIdentity": {
"type": "AWSService",
"invokedBy": "AWS Internal"
},
"eventTime": "2025-10-18T02:25:02Z",
"eventSource": "organizations.amazonaws.com",
"eventName": "ResponsibilityTransferTerminated",
"awsRegion": "us-east-1",
"sourceIPAddress": "AWS Internal",
"userAgent": "AWS Internal",
"requestParameters": null,
"responseElements": null,
"eventID": "7c5e2b9a-4d1f-4b8c-a6e3-9f0d2c5b8a41",
"readOnly": false,
"eventType": "AwsServiceEvent",
"managementEvent": true,
"recipientAccountId": "222222222222",
"sharedEventID": "e2d8a5c1-6b3f-4a7d-9e0c-4b7a1d3e6f92",
"serviceEventDetails": {
"id": "rt-1a2b3c4d",
"transferChain": [
"rt-1a2b3c4d"
],
"type": "BILLING",
"status": "WITHDRAWN",
"source": {
"managementAccountId": "111111111111"
},
"target": {
"managementAccountId": "222222222222"
},
"requester": "111111111111",
"startTimestamp": 1761955200000,
"endTimestamp": 1761955200000
},
"eventCategory": "Management"
}
}
 endTimestamp  (epoch milliseconds) reflects when the transfer ends. It can equal  startTimestamp  when a transfer is withdrawn before it takes effect, and it commonly lands on a month boundary (sometimes as the last millisecond of the month, for example  1769903999999 ).
⚠️ This event fires only for a transfer that was previously  ACCEPTED , so its  status  is always  WITHDRAWN  — whether the source (customer) or the target (payer) initiates the withdrawal. It is delivered to the party that did not initiate it, and to payers further up the chain in a chained transfer. The  requester  field identifies the party that initiated the termination.

Chained transfers and transferChain

In a three-tier hierarchy — for example, a distributor that pays for a reseller, which in turn pays for an end customer — both service events are delivered to every payer above the transfer, not just the direct target. Each recipient's copy is a separate event with its own  eventID , and the  transferChain  array describes the path from the affected transfer up to that recipient:
  • The direct target (the reseller) receives the event with  transferChain  containing just the affected transfer, for example  ["rt-1a2b3c4d"] .
  • The upstream payer (the distributor) receives its own copy with the chain extended by the transfer that connects it, for example  ["rt-1a2b3c4d", "rt-9z8y7x6w"] .
The upstream copy is delivered even though the distributor is not a party to the affected transfer — its  source  and  target  still name the customer and the reseller. This gives distributors native, near-real-time visibility into downstream acceptances and terminations without any event forwarding between accounts: the same two rules from Step 1, created in the distributor's management account, capture them. Use the last element of  transferChain  to identify which of your own inbound transfers connects you to the activity.

Capturing the accept API call

The customer accepts an invitation by calling  AcceptHandshake . CloudTrail records this call twice — once in the customer account that made the call, and once as a shared copy in the payer (inviting) organization's management account. Both copies match the  billing-transfer-api-calls  rule from Step 1, so:
  • The customer can detect its own acceptance, and record which principal accepted, from its own copy ( userIdentity.type  is the caller's identity type, such as  AssumedRole , with the full principal ARN).
  • The payer receives both the  ResponsibilityTransferAccepted  service event and the shared copy of the  AcceptHandshake  call ( userIdentity.type  is  AWSAccount , identifying the customer account that accepted). Deduplicate by handshake or transfer ID, not by event count.

Event pattern for AcceptHandshake

{
"source": ["aws.organizations"],
"detail-type": ["AWS API Call via CloudTrail"],
"detail": {
"eventSource": ["organizations.amazonaws.com"],
"eventType": ["AwsApiCall"],
"eventName": ["AcceptHandshake"],
"errorCode": [ { "exists": false } ]
}
}

AcceptHandshake event (excerpt)

The invitation is identified by  requestParameters.handshakeId . There is no  serviceEventDetails  block, but  responseElements.handshake.resources  carries the associated  rt-…  transfer ID, the start timestamp, and both parties — no extra  describe-handshake  call is needed. Note that CloudTrail masks free-text fields in these records: the invitation's  sourceName  and  notes , and the handshake's management-account email and name resources, appear as  ****  (account IDs and transfer IDs remain visible):
{
"detail-type": "AWS API Call via CloudTrail",
"source": "aws.organizations",
"detail": {
"eventSource": "organizations.amazonaws.com",
"eventName": "AcceptHandshake",
"eventType": "AwsApiCall",
"userIdentity": {
"type": "AWSAccount",
"accountId": "111111111111"
},
"requestParameters": {
"handshakeId": "h-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"responseElements": {
"handshake": {
"id": "h-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"state": "ACCEPTED",
"action": "TRANSFER_RESPONSIBILITY",
"resources": [
{
"value": "rt-1a2b3c4d",
"type": "RESPONSIBILITY_TRANSFER",
"resources": [
{ "value": "1761955200", "type": "TRANSFER_START_TIMESTAMP" },
{ "value": "BILLING", "type": "TRANSFER_TYPE" }
]
},
{ "value": "222222222222", "type": "ACCOUNT" }
]
}
}
}
}
📘 Pairing the acceptance signals The service event carries the resolved  serviceEventDetails  (source, target, status  ACCEPTED ,  transferChain ); the API-call event carries the caller's  userIdentity , the  handshakeId , and the handshake details in  responseElements . On the payer side both arrive for the same acceptance — correlate them through the  rt-…  transfer ID.

Capturing the terminate API call

The  ResponsibilityTransferTerminated  service event reaches only the non-initiating party (and upstream payers in a chain). Unlike accept and decline, the  TerminateResponsibilityTransfer  call is recorded only in the initiating account — so for the initiator to detect the termination through events, or to record who triggered it and with what parameters, subscribe to the API call in that account.

Event pattern for TerminateResponsibilityTransfer

{
"source": ["aws.organizations"],
"detail-type": ["AWS API Call via CloudTrail"],
"detail": {
"eventSource": ["organizations.amazonaws.com"],
"eventType": ["AwsApiCall"],
"eventName": ["TerminateResponsibilityTransfer"],
"errorCode": [ { "exists": false } ]
}
}

TerminateResponsibilityTransfer event (excerpt)

This is an API-call event: the transfer is identified by  requestParameters.id , and there is no  serviceEventDetails  block.  requestParameters.endTimestamp  appears only when the caller supplied one — omitting it is common and lets the service pick the default end date. The resolved result (status  WITHDRAWN , source, target, effective timestamps) is in  responseElements.responsibilityTransfer . The  userIdentity  block identifies the account and principal that initiated the termination.
{
"detail-type": "AWS API Call via CloudTrail",
"source": "aws.organizations",
"detail": {
"eventSource": "organizations.amazonaws.com",
"eventName": "TerminateResponsibilityTransfer",
"eventType": "AwsApiCall",
"userIdentity": {
"type": "AssumedRole",
"accountId": "111111111111"
},
"requestParameters": {
"id": "rt-1a2b3c4d",
"endTimestamp": "2025-10-31T23:59:59Z"
},
"responseElements": {
"responsibilityTransfer": {
"id": "rt-1a2b3c4d",
"type": "BILLING",
"status": "WITHDRAWN",
"source": { "managementAccountId": "111111111111" },
"target": { "managementAccountId": "222222222222" },
"startTimestamp": "2025-11-01T00:00:00Z",
"endTimestamp": "2025-11-01T00:00:00Z"
}
}
}
}
⚠️ Do not parse  requestParameters  timestamps strictly: CloudTrail records them as the caller sent them, so both ISO 8601 strings ( 2025-10-31T23:59:59Z ) and locale-formatted strings ( Oct 31, 2025, 11:59:59 PM ) occur, depending on the tool that made the call. The authoritative values are the epoch-millisecond timestamps in  serviceEventDetails  and the ISO strings in  responseElements .
📘 Pairing the two termination events Subscribe to  ResponsibilityTransferTerminated  (service event) in the non-initiating account and to  TerminateResponsibilityTransfer  (API call) in the initiating account to give both parties a signal. The API-call event carries the caller's  userIdentity  and the raw request parameters; the service event carries the resolved  serviceEventDetails  (source, target, and the always- WITHDRAWN  status).

Detecting the remaining lifecycle actions

Invitation, decline, cancel, and rename never raise a service event, and expiry raises no event at all. Detect them through the API calls or, for expiry, by polling:
  • Invitation sent -  InviteOrganizationToTransferResponsibility , recorded in the inviter (payer) account only. The invited customer receives no event — to react to incoming invitations, the customer must poll  list-handshakes-for-account .
  • Declined -  DeclineHandshake , recorded in the decliner's account and as a shared copy in the inviter's account, so the payer sees declines through its own trail.
  • Canceled -  CancelHandshake , recorded in the canceling (inviter) account only.
  • Renamed -  UpdateResponsibilityTransfer  (takes the transfer  id  and a new  name ; renames the transfer without changing its status). Recorded in the caller's account only. As with the invitation's free-text fields, CloudTrail masks the new  name  as  ****  in the record — the  id  remains visible.
  • Expired - expiry is automatic (no API call and no service event), so it can be detected only by polling  describe-responsibility-transfer  (or the list APIs) and checking for  Status  =  EXPIRED .
The  billing-transfer-api-calls  rule created in Step 1 already captures all of these. The event names of interest are  InviteOrganizationToTransferResponsibility ,  DeclineHandshake ,  CancelHandshake , and  UpdateResponsibilityTransfer .
📘 Which identifier each call carries  AcceptHandshake ,  DeclineHandshake , and  CancelHandshake  identify the invitation by  requestParameters.handshakeId .  UpdateResponsibilityTransfer  and  TerminateResponsibilityTransfer  reference the transfer by its  rt-…   id .  InviteOrganizationToTransferResponsibility  carries neither — its  requestParameters  holds  type , the  target  (an  ACCOUNT  ID or an  EMAIL  address),  startTimestamp ,  sourceName , and  notes ; the new handshake and transfer IDs are returned in  responseElements.handshake .

DeclineHandshake / CancelHandshake event (excerpt)

These are API-call events: the handshake is identified by  requestParameters.handshakeId , and there is no  serviceEventDetails  block. As with accept,  responseElements.handshake  carries the final handshake  state  ( DECLINED  or  CANCELED ) and the  rt-…  transfer ID in its  resources .
{
"detail-type": "AWS API Call via CloudTrail",
"source": "aws.organizations",
"detail": {
"eventSource": "organizations.amazonaws.com",
"eventName": "CancelHandshake",
"eventType": "AwsApiCall",
"requestParameters": {
"handshakeId": "h-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"responseElements": {
"handshake": {
"id": "h-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"state": "CANCELED",
"action": "TRANSFER_RESPONSIBILITY",
"resources": [
{
"value": "rt-1a2b3c4d",
"type": "RESPONSIBILITY_TRANSFER"
}
]
}
}
}
}

Event identifiers and de-duplication

Several identifiers appear across these events. Use them as follows when building automations:
  •  rt-…  transfer ID — the primary correlation key for a transfer's lifecycle. It appears as  serviceEventDetails.id  on service events,  requestParameters.id  on the rt-level calls, and inside  responseElements.handshake.resources  (type  RESPONSIBILITY_TRANSFER ) on the handshake calls.
  •  handshakeId  ( h-… ) — identifies one invitation. Each invitation creates a new handshake and a new transfer ID, so treat  responseElements.handshake  as the authoritative handshake-to-transfer mapping.
  •  eventID  — unique per CloudTrail record. Two records for the same action (see next bullet) have different  eventID s.
  •  sharedEventID  — present when CloudTrail records the same action in more than one account: the customer-side and payer-side copies of a successful  AcceptHandshake  or  DeclineHandshake  carry the same  sharedEventID . If you aggregate events from several of your own accounts, deduplicate these copies on  sharedEventID . Service events also carry a  sharedEventID , but it does not correlate with the API call that caused them, and the copies delivered to different recipients of one acceptance carry different values — so for anything other than the shared API-call copies, deduplicate on the  rt-…  ID plus event name instead. Failed calls and single-account calls (invite, cancel, rename, terminate) have no  sharedEventID .

Monitoring and troubleshooting

Verify the rules are active

# Check status and targets for each rule
aws events describe-rule --name "billing-transfer-service-events"
aws events list-targets-by-rule --rule "billing-transfer-service-events"

aws events describe-rule --name "billing-transfer-api-calls"
aws events list-targets-by-rule --rule "billing-transfer-api-calls"

CloudWatch metrics

Monitor each rule's performance with these EventBridge metrics:
  • MatchedEvents - Number of events that matched the rule
  • InvocationsCount - Number of times targets were invoked
  • FailedInvocations - Number of failed target invocations

Common issues

❌ Rules not triggering Both rules depend on CloudTrail delivery: the account needs a CloudTrail trail that logs management events in the account and Region, or neither the  AwsApiCall  nor the  AwsServiceEvent  records reach EventBridge. Also confirm the rule is in the same Region as your Organizations activity (see below) and that its event pattern matches the event you expect — for example, the API-call pattern in this guide deliberately excludes failed calls that carry an  errorCode .
📘 Create your rules in us-east-1 EventBridge rules are Regional, and AWS Organizations records billing responsibility transfer events in us-east-1. Create your rules and their targets there, or they won't match.

Clean up

To remove everything this guide created:
# Remove targets, then the rules (removing a target Id that was never added
# is harmless)
aws events remove-targets --rule "billing-transfer-service-events" \
--ids "sns-notification" "lambda-processor"
aws events delete-rule --name "billing-transfer-service-events"

aws events remove-targets --rule "billing-transfer-api-calls" \
--ids "sns-notification" "lambda-processor"
aws events delete-rule --name "billing-transfer-api-calls"

# Delete the SNS topic (TOPIC_ARN from the SNS option). This also removes
# any subscriptions, including ones still pending confirmation.
aws sns delete-topic --topic-arn "$TOPIC_ARN"
If you created a Lambda function for Option 2, delete it and its log group separately.

Next steps

Once you have event subscription working:
  1. Implement business logic - Add your specific processing logic for each event type
  1. Add error handling - Implement retry logic and dead letter queues
  1. Set up monitoring - Create CloudWatch alarms for failed invocations
  1. Test thoroughly - Verify event processing with actual billing transfer operations
For more information about EventBridge patterns and targets, see the  Amazon EventBridge User Guide .
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article