To determine the license type that's currently associated with your instance, run the following AWS CLI command. Replace INSTANCE_ID with the instance ID that you want to determine the license type for:
aws ec2 describe-instances --instance-ids INSTANCE_ID --query "Reservations[*].Instances[*].{InstanceId: InstanceId, PlatformDetails: PlatformDetails, UsageOperation: UsageOperation, UsageOperationUpdateTime: UsageOperationUpdateTime}"
UsageOperation is the billing information code that's associated with the license. Use this in the next step to specify the UsageOperation to convert from. For Windows Server BYOL with SQL Server BYOL, this is RunInstances:0800. For Windows Server as license included and SQL Server (any edition) as BYOL, this is RunInstances:0002.
To convert the license type of your SQL Server edition from BYOL to license included, run the following command. Replace INSTANCE_ARN with the Amazon Resource Name (ARN) of the instance that you want to convert. Replace the values for UsageOperation for the source and destination:
Convert from: Windows Server as BYOL with SQL Server (any edition) as BYOL
To: Windows Server as license included with SQL Server Web as license included
aws license-manager create-license-conversion-task-for-resource \
--resource-arn INSTANCE_ARN \
--source-license-context UsageOperation=RunInstances:0800 \
--destination-license-context UsageOperation=RunInstances:0202
Convert from: Windows Server as BYOL with SQL Server (any edition) as BYOL
To: Windows Server as license included with SQL Server Standard as license included
aws license-manager create-license-conversion-task-for-resource \
--resource-arn INSTANCE_ARN \
--source-license-context UsageOperation=RunInstances:0800 \
--destination-license-context UsageOperation=RunInstances:0006
Convert from: Windows Server as BYOL with SQL Server (any edition) as BYOL
To: Windows Server as license included with SQL Server Enterprise as license included
aws license-manager create-license-conversion-task-for-resource \
--resource-arn INSTANCE_ARN \
--source-license-context UsageOperation=RunInstances:0800 \
--destination-license-context UsageOperation=RunInstances:0102
Convert from: Windows Server as license included SQL Server (any edition) as BYOL
To: Windows Server as license included SQL Server Web as license included
aws license-manager create-license-conversion-task-for-resource \
--resource-arn INSTANCE_ARN \
--source-license-context UsageOperation=RunInstances:0002 \
--destination-license-context UsageOperation=RunInstances:0202
Convert from: Windows Server as license included SQL Server (any edition) as BYOL
To: Windows Server as license included SQL Server Standard as license included
aws license-manager create-license-conversion-task-for-resource \
--resource-arn INSTANCE_ARN \
--source-license-context UsageOperation=RunInstances:0002 \
--destination-license-context UsageOperation=RunInstances:0006
Convert from: Windows Server as license included SQL Server (any edition) as BYOL
To: Windows Server as license included SQL Server Enterprise as license included
aws license-manager create-license-conversion-task-for-resource \
--resource-arn INSTANCE_ARN \
--source-license-context UsageOperation=RunInstances:0002 \
--destination-license-context UsageOperation=RunInstances:0102