View a markdown version of this page

Operational Runbook - AWS Prescriptive Guidance

Operational Runbook

This section provides partition-independent operational commands for deploying, validating, and revoking the framework.

Deploy the Framework

# Detect partition, account, and region AWS_PARTITION=$(aws sts get-caller-identity --query 'Arn' --output text | cut -d: -f2) ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text) REGION=$(aws configure get region) # Generate ExternalId EXTERNAL_ID=$(uuidgen) # Deploy CloudFormation stack aws cloudformation deploy \ --template-file iac/cloudformation/dx-info-sharing.yaml \ --stack-name dx-info-sharing \ --parameter-overrides \ ESPAccountId=<ACCOUNT_NUMBER> \ ExternalId=$EXTERNAL_ID \ --capabilities CAPABILITY_NAMED_IAM # Retrieve outputs aws cloudformation describe-stacks \ --stack-name dx-info-sharing \ --query 'Stacks[0].Outputs' --output table # Tag DX resources (partition-independent ARN) aws directconnect tag-resource \ --resource-arn arn:${AWS_PARTITION}:directconnect:${REGION}:${ACCOUNT_ID}:dxcon/dxcon-xxx \ --tags key=DXInfoSharing,value=enabled \ key=AccountPOC,value=owner@customer.com \ key=TechnicalPOC,value=netadmin@customer.com \ key=NOCContact,value=noc@customer.com \ key=Criticality,value=MissionEssential

Validate Deployment

# Verify IAM role aws iam get-role --role-name DXNetworkOperatorRole aws iam list-attached-role-policies --role-name DXNetworkOperatorRole # Verify governance rules (only if Config governance was deployed separately) aws configservice describe-config-rules --output table \ --query "ConfigRules[?contains(ConfigRuleName, 'dx-info-sharing')]"

Role Assumption Validation — ExternalId Enforcement Modes

The following commands are executed from the WSP/ESP account. Replace CUSTOMER_ACCOUNT_ID with the customer account ID hosting the DXNetworkOperatorRole.

Note

This example uses jq to parse JSON output. If jq is not available, equivalent AWS CLI --query expressions may be used.

When ExternalId enforcement is enabled (CLI/SDK only; Console Switch Role will fail):

AWS_PARTITION=$(aws sts get-caller-identity --query 'Arn' --output text | cut -d: -f2) CUSTOMER_ACCOUNT_ID=<customer-account-id> ROLE_ARN=arn:${AWS_PARTITION}:iam::${CUSTOMER_ACCOUNT_ID}:role/DXNetworkOperatorRole CREDS=$(aws sts assume-role \ --role-arn $ROLE_ARN \ --role-session-name dx-validation \ --external-id <ExternalId> \ --query 'Credentials' --output json) export AWS_ACCESS_KEY_ID=$(echo $CREDS | jq -r '.AccessKeyId') export AWS_SECRET_ACCESS_KEY=$(echo $CREDS | jq -r '.SecretAccessKey') export AWS_SESSION_TOKEN=$(echo $CREDS | jq -r '.SessionToken')

When ExternalId enforcement is removed (CLI/SDK and Console Switch Role both supported):

AWS_PARTITION=$(aws sts get-caller-identity --query 'Arn' --output text | cut -d: -f2) CUSTOMER_ACCOUNT_ID=<customer-account-id> ROLE_ARN=arn:${AWS_PARTITION}:iam::${CUSTOMER_ACCOUNT_ID}:role/DXNetworkOperatorRole CREDS=$(aws sts assume-role \ --role-arn $ROLE_ARN \ --role-session-name dx-validation \ --query 'Credentials' --output json) export AWS_ACCESS_KEY_ID=$(echo $CREDS | jq -r '.AccessKeyId') export AWS_SECRET_ACCESS_KEY=$(echo $CREDS | jq -r '.SecretAccessKey') export AWS_SESSION_TOKEN=$(echo $CREDS | jq -r '.SessionToken')

After assuming the role using either mode, validate read access:

# Validate DX read access aws directconnect describe-connections --max-results 5 # Validate CloudWatch read access (query scoped to AWS/DX) aws cloudwatch list-metrics --namespace AWS/DX --max-items 5

This confirms that the role can retrieve Direct Connect configuration and metrics as expected. Execute governance validation only if AWS Config or alternative compliance mechanisms were deployed separately.

Revocation Procedures

This section provides partition-independent operational commands for each revocation level. Operators should execute only the levels appropriate to the situation, proceeding from least to most disruptive.

# Detect partition, account, and region AWS_PARTITION=$(aws sts get-caller-identity --query 'Arn' --output text | cut -d: -f2) ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text) REGION=$(aws configure get region)

Scope Reduction

Remove sharing tags from Direct Connect resources. The WSP/ESP can still assume the role and query describe APIs and CloudWatch metrics, but tag:GetResources returns no operational metadata. Does not invalidate issued STS credentials.

# Remove sharing tags from DX resources aws directconnect untag-resource \ --resource-arn arn:${AWS_PARTITION}:directconnect:${REGION}:${ACCOUNT_ID}:dxcon/dxcon-xxx \ --tag-keys DXInfoSharing AccountPOC TechnicalPOC NOCContact Criticality

Session Revocation

Invalidate all in-flight STS credentials. This is AWS's primary documented mechanism for immediate credential revocation. It attaches the AWSRevokeOlderSessions inline policy, which uses the aws:TokenIssueTime condition key to deny all permissions to credentials issued before the specified timestamp. New sessions assumed after the revocation remain functional. Takes effect within seconds.

# Invalidate all in-flight credentials REVOCATION_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") aws iam put-role-policy \ --role-name DXNetworkOperatorRole \ --policy-name AWSRevokeOlderSessions \ --policy-document "{ \"Version\": \"2012-10-17\", \"Statement\": [{ \"Effect\": \"Deny\", \"Action\": [\"*\"], \"Resource\": [\"*\"], \"Condition\": { \"DateLessThan\": { \"aws:TokenIssueTime\": \"${REVOCATION_DATE}\" } } }] }"

Role Disablement

Prevent new role assumptions while preserving the role for potential re-enablement. Modify the trust policy to deny all principals. Does not invalidate already-issued credentials; combine with session revocation for complete effect. AWS documents this as the recommended approach for disabling a role without deleting it.

# Prevent new role assumptions by modifying trust policy aws iam update-assume-role-policy \ --role-name DXNetworkOperatorRole \ --policy-document "{ \"Version\": \"2012-10-17\", \"Statement\": [{ \"Sid\": \"DenyAll\", \"Effect\": \"Deny\", \"Principal\": {\"AWS\": \"*\"}, \"Action\": \"sts:AssumeRole\" }] }" # Verify disablement aws iam get-role --role-name DXNetworkOperatorRole \ --query 'Role.AssumeRolePolicyDocument' --output json

Role Deletion

Permanent removal. Appropriate only when the trust relationship is permanently ended. AWS recommends considering disablement before deletion. Requires redeployment of the CloudFormation stack to restore.

# Remove inline revocation policy (if attached) aws iam delete-role-policy --role-name DXNetworkOperatorRole \ --policy-name AWSRevokeOlderSessions # Detach managed policy aws iam detach-role-policy --role-name DXNetworkOperatorRole \ --policy-arn arn:${AWS_PARTITION}:iam::${ACCOUNT_ID}:policy/DXNetworkOperatorPolicy # Delete role aws iam delete-role --role-name DXNetworkOperatorRole # Verify deletion aws iam get-role --role-name DXNetworkOperatorRole # Expected: NoSuchEntity error

After role deletion, review CloudTrail logs for unauthorized activity during the 90 days preceding termination, follow organizational incident response procedures, and determine whether to redeploy the framework.