

# Amazon Web Services Marketplace and Amazon Organizations
<a name="services-that-can-integrate-marketplace"></a>

Amazon Web Services Marketplace is a curated digital catalog that you can use to find, buy, deploy, and manage third-party software, data, and services that you need to build solutions and run your businesses.

Amazon Web Services Marketplace creates and manages licenses using Amazon License Manager for your purchases in Amazon Web Services Marketplace. When you share (grant access to) your licenses with other accounts in your organization, Amazon Web Services Marketplace creates and manages new licenses for those accounts. 

For more information, see [Service-linked roles for Amazon Web Services Marketplace](https://docs.amazonaws.cn/marketplace/latest/buyerguide/buyer-using-service-linked-roles.html) in the *Amazon Web Services Marketplace Buyer Guide*.

Use the following information to help you integrate Amazon Web Services Marketplace with Amazon Organizations.



## Service-linked roles created when you enable integration
<a name="integrate-enable-slr-marketplace"></a>

The following [service-linked role](https://docs.amazonaws.cn/IAM/latest/UserGuide/using-service-linked-roles.html) is automatically created in your organization's management account when you enable trusted access. This role allows Amazon Web Services Marketplace to perform supported operations within your organization's accounts in your organization.

You can delete or modify this role only if you disable trusted access between Amazon Web Services Marketplace and Organizations, or if you remove the member account from the organization.
+ `AWSServiceRoleForMarketplaceLicenseManagement`

## Service principals used by the service-linked roles
<a name="integrate-enable-svcprin-marketplace"></a>

The service-linked role in the previous section can be assumed only by the service principals authorized by the trust relationships defined for the role. The service-linked roles used by Amazon Web Services Marketplace grant access to the following service principals:
+ `license-management.marketplace.amazonaws.com`

## Enabling trusted access with Amazon Web Services Marketplace
<a name="integrate-enable-ta-marketplace"></a>

For information about the permissions needed to enable trusted access, see [Permissions required to enable trusted access](orgs_integrate_services.md#orgs_trusted_access_perms).

You can enable trusted access using either the Amazon Web Services Marketplace console or the Amazon Organizations console.

**Important**  
We strongly recommend that whenever possible, you use the Amazon Web Services Marketplace console or tools to enable integration with Organizations. This lets Amazon Web Services Marketplace perform any configuration that it requires, such as creating resources needed by the service. Proceed with these steps only if you can’t enable integration using the tools provided by Amazon Web Services Marketplace. For more information, see [this note](orgs_integrate_services.md#important-note-about-integration).   
If you enable trusted access by using the Amazon Web Services Marketplace console or tools then you don’t need to complete these steps.

**To enable trusted access using the Amazon Web Services Marketplace console**  
See [Creating a service-linked role for Amazon Web Services Marketplace](https://docs.amazonaws.cn/marketplace/latest/buyerguide/buyer-using-service-linked-roles.html#buyer-creating-service-linked-role) in the *Amazon Web Services Marketplace Buyer Guide*.

You can enable trusted access by using either the Amazon Organizations console, by running a Amazon CLI command, or by calling an API operation in one of the Amazon SDKs.

------
#### [ Amazon Web Services Management Console ]

**To enable trusted service access using the Organizations console**

1. Sign in to the [Amazon Organizations console](https://console.amazonaws.cn/organizations/v2). You must sign in as an IAM user, assume an IAM role, or sign in as the root user ([not recommended](https://docs.amazonaws.cn/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) in the organization’s management account.

1. In the navigation pane, choose **Services**.

1. Choose **Amazon Web Services Marketplace** in the list of services.

1. Choose **Enable trusted access**.

1. In the **Enable trusted access for Amazon Web Services Marketplace** dialog box, type **enable** to confirm, and then choose **Enable trusted access**.

1. If you are the administrator of only Amazon Organizations, tell the administrator of Amazon Web Services Marketplace that they can now enable that service to work with Amazon Organizations from the service console .

------
#### [ Amazon CLI, Amazon API ]

**To enable trusted service access using the OrganizationsCLI/SDK**  
Use the following Amazon CLI commands or API operations to enable trusted service access:
+ Amazon CLI: [enable-aws-service-access](https://docs.amazonaws.cn/cli/latest/reference/organizations/enable-aws-service-access.html)

  Run the following command to enable Amazon Web Services Marketplace as a trusted service with Organizations.

  ```
  $ aws organizations enable-aws-service-access \ 
      --service-principal license-management.marketplace.amazonaws.com
  ```

  This command produces no output when successful.
+ Amazon API: [EnableAWSServiceAccess](https://docs.amazonaws.cn/organizations/latest/APIReference/API_EnableAWSServiceAccess.html)

------

## Disabling trusted access with Amazon Web Services Marketplace
<a name="integrate-disable-ta-marketplace"></a>

For information about the permissions needed to enable trusted access, see [Permissions required to enable trusted access](orgs_integrate_services.md#orgs_trusted_access_perms).

You can only enable trusted access using the Organizations tools.

You can disable trusted access by running a Organizations Amazon CLI command, or by calling an Organizations API operation in one of the Amazon SDKs.

------
#### [ Amazon CLI, Amazon API ]

**To disable trusted service access using the Organizations CLI/SDK**  
Use the following Amazon CLI commands or API operations to disable trusted service access:
+ Amazon CLI: [disable-aws-service-access](https://docs.amazonaws.cn/cli/latest/reference/organizations/disable-aws-service-access.html)

  Run the following command to disable Amazon Web Services Marketplace as a trusted service with Organizations.

  ```
  $ aws organizations disable-aws-service-access \
      --service-principal license-management.marketplace.amazonaws.com
  ```

  This command produces no output when successful.
+ Amazon API: [DisableAWSServiceAccess](https://docs.amazonaws.cn/organizations/latest/APIReference/API_DisableAWSServiceAccess.html)

------