

# Share a self-managed license in License Manager
<a name="share-license-configuration"></a>

You can use Amazon Resource Access Manager to share your self-managed licenses with any Amazon account or through Amazon Organizations. For more information, see [Sharing your Amazon resources](https://docs.amazonaws.cn/ram/latest/userguide/getting-started-sharing.html) in the *Amazon RAM User Guide*.

## Share a self-managed license with your Amazon Organization
<a name="share-license-configuration-with-org"></a>

**Prerequisites**  
To complete this procedure, you must link your Amazon Organization with License Manager. For more information, see [Managed license settings in License Manager](settings-managed-licenses.md).

**Share your license**  
To share a self-managed license with your Amazon Organization, follow these steps:

1. Open the License Manager console at [https://console.amazonaws.cn/license-manager/](https://console.amazonaws.cn/license-manager/).

1. In the left navigation pane, choose **Self-managed licenses**.

1. Select the self-managed license.

1. Choose **Share with Amazon organization accounts** from the **Actions** menu.

## Supported accounts quota
<a name="share-license-configuration-quotas"></a>

If you enabled license sharing in Amazon License Manager before October 14, 2023, your quota for the maximum number of accounts that License Manager supports within your organization will be less than the new default maximum. You can increase this quota by using API operations for Amazon RAM that are provided in the following section. For more information about the default quotas in License Manager, see [Quotas for working with licenses](https://docs.amazonaws.cn/general/latest/gr/licensemanager.html#limits_license-manager) in the *Amazon Web Services General Reference guide*.

### Prerequisites
<a name="share-license-configuration-quotas-prerequisites"></a>

To complete the following procedure, you must sign in as a principal in the organization's management account that has the following permissions:
+ `ram:EnableSharingWithAwsOrganization`
+ `iam:CreateServiceLinkedRole`
+ `organizations:enableAWSServiceAccess`
+ `organizations:DescribeOrganization`

### Increasing the supported accounts quota
<a name="share-license-configuration-quotas-increase"></a>

The following procedure will increase your current quota for `Number of accounts per organization for License Manager` to the current default maximum.

**To increase the supported accounts quota for License Manager**

1. Use the [https://docs.amazonaws.cn/cli/latest/reference/organizations/describe-organization.html](https://docs.amazonaws.cn/cli/latest/reference/organizations/describe-organization.html) Amazon CLI command to determine your organization’s ARN by using the operation:

   ```
   aws organizations describe-organization
   
   {
   	"Organization": {
   		"Id": "o-abcde12345",
   		"Arn": "arn:aws:organizations::111122223333:organization/o-abcde12345",
   		"FeatureSet": "ALL",
   		"MasterAccountArn": "arn:aws:organizations::111122223333:account/o-abcde12345/111122223333",
   		"MasterAccountId": "111122223333",
   		"MasterAccountEmail": "name+orgsidentifier@example.com",
   		"AvailablePolicyTypes": [
   				{
   					"Type": "SERVICE_CONTROL_POLICY",
   					"Status": "ENABLED"
   				}
   		]
   	}
   }
   ```

1. Use the [https://docs.amazonaws.cn/cli/latest/reference/ram/get-resource-shares.html](https://docs.amazonaws.cn/cli/latest/reference/ram/get-resource-shares.html) Amazon CLI command to determine your organization’s ARN by using the operation:

   ```
   aws ram  get-resource-shares --resource-owner SELF --tag-filters tagKey=Service,tagValues=LicenseManager --region {{us-east-1}}
   
   {
   	"resourceShares": [
   		{
   				"resourceShareArn": "arn:aws:ram:us-east-1:111122223333:resource-share/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
   				"name": "licenseManagerResourceShare-111122223333",
   				"owningAccountId": "111122223333",
   				"allowExternalPrincipals": true,
   				"status": "ACTIVE",
   				"tags": [
   					{
   						"key": "Service",
   						"value": "LicenseManager"
   					}
   				],
   				"creationTime": "2023-10-04T12:52:10.021000-07:00",
   				"lastUpdatedTime": "2023-10-04T12:52:10.021000-07:00",
   				"featureSet": "STANDARD"
   		}
   	]
   }
   ```

1. Use the [https://docs.amazonaws.cn/cli/latest/reference/ram/enable-sharing-with-aws-organization.html](https://docs.amazonaws.cn/cli/latest/reference/ram/enable-sharing-with-aws-organization.html) Amazon CLI command to enable resource sharing with Amazon RAM:

   ```
   aws ram enable-sharing-with-aws-organization
   
   {
   	"returnValue": true
   }
   ```

   You can use the [https://docs.amazonaws.cn/cli/latest/reference/organizations/list-aws-service-access-for-organization.html](https://docs.amazonaws.cn/cli/latest/reference/organizations/list-aws-service-access-for-organization.html) Amazon CLI command to verify that Organizations lists service principals are enabled for License Manager and Amazon RAM:

   ```
   aws organizations list-aws-service-access-for-organization
   
   {
   	"EnabledServicePrincipals": [
   		{
   				"ServicePrincipal": "license-manager.amazonaws.com",
   				"DateEnabled": "2023-10-04T12:50:59.814000-07:00"
   		},
   		{
   				"ServicePrincipal": "license-manager.member-account.amazonaws.com",
   				"DateEnabled": "2023-10-04T12:50:59.565000-07:00"
   		},
   		{
   				"ServicePrincipal": "ram.amazonaws.com",
   				"DateEnabled": "2023-10-04T13:06:34.771000-07:00"
   		}
   	]
   }
   ```
**Important**  
 It can take up to six hours for Amazon RAM to finish this operation for your organization. This process must complete before you can proceed.

1. Use the [https://docs.amazonaws.cn/cli/latest/reference/ram/associate-resource-share.html](https://docs.amazonaws.cn/cli/latest/reference/ram/associate-resource-share.html) Amazon CLI command to associate your License Manager resources share with your organization:

   ```
   aws ram associate-resource-share --resource-share-arn arn:aws:ram:{{us-east-1}}:{{111122223333}}:resource-share/{{a1b2c3d4-5678-90ab-cdef-EXAMPLE11111}} --principals arn:aws:organizations::{{111122223333}}:organization/{{o-abcde12345}} --region {{us-east-1}}
   
   {
   	"resourceShareAssociations": [
   		{
   				"resourceShareArn": "arn:aws:ram:us-east-1:111122223333:resource-share/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
   				"associatedEntity": "arn:aws:organizations::111122223333:organization/o-abcde12345",
   				"associationType": "PRINCIPAL",
   				"status": "ASSOCIATING",
   				"external": false
   		}
   	]
   }
   ```

   You can use the [https://docs.amazonaws.cn/cli/latest/reference/ram/get-resource-share-associations.html](https://docs.amazonaws.cn/cli/latest/reference/ram/get-resource-share-associations.html) Amazon CLI command to validate that the resource share association's `status` is `ASSOCIATED`:

   ```
   aws ram get-resource-share-associations --association-type "PRINCIPAL" --principal arn:aws:organizations::{{111122223333}}:organization/{{o-abcde12345}}--resource-share-arns arn:aws:ram:{{us-east-1}}:{{111122223333}}:resource-share/{{a1b2c3d4-5678-90ab-cdef-EXAMPLE11111}} --region {{us-east-1}}
   				
   {
   	"resourceShareAssociations": [
   		{
   				"resourceShareArn": "arn:aws:ram:us-east-1:111122223333:resource-share/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
   				"resourceShareName": "licenseManagerResourceShare-111122223333",
   				"associatedEntity": "arn:aws:organizations::111122223333:organization/o-abcde12345",
   				"associationType": "PRINCIPAL",
   				"status": "ASSOCIATED",
   				"creationTime": "2023-10-04T13:12:33.422000-07:00",
   				"lastUpdatedTime": "2023-10-04T13:12:34.663000-07:00",
   				"external": false
   		}
   	]
   }
   ```