Using roles to configure and launch products in AWS Marketplace
AWS Marketplace uses AWS Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role that is linked directly to AWS Marketplace. Service-linked roles are predefined by AWS Marketplace and include all the permissions that the service requires to call other AWS services on your behalf.
A service-linked role makes setting up AWS Marketplace easier because you don’t have to manually add the necessary permissions. AWS Marketplace defines the permissions of its service-linked roles, and unless defined otherwise, only AWS Marketplace can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.
For information about other services that support service-linked roles, see AWS services that work with IAM and look for the services that have Yes in the Service-linked roles column. Choose a Yes with a link to view the service-linked role documentation for that service.
Service-linked role permissions for AWS Marketplace
AWS Marketplace uses the service-linked role named AWSServiceRoleForMarketplaceDeployment to allow AWS Marketplace to manage deployment-related parameters, which are stored as secrets in AWS Secrets Manager, on your behalf. These secrets can be referenced by sellers in AWS CloudFormation templates, which you can launch when configuring products that have Quick Launch enabled in AWS Marketplace.
The AWSServiceRoleForMarketplaceDeployment service-linked role trusts the following services to assume the role:
-
deployment.marketplace.amazonaws.com
Use the role permissions policy named AWSMarketplaceDeploymentServiceRolePolicy to allow AWS Marketplace to complete the actions on your resources.
Note
For more information about AWS Marketplace managed policies, see AWS managed policies for AWS Marketplace buyers.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ManageMarketplaceDeploymentSecrets", "Effect": "Allow", "Action": [ "secretsmanager:CreateSecret", "secretsmanager:PutSecretValue", "secretsmanager:DescribeSecret", "secretsmanager:DeleteSecret", "secretsmanager:RemoveRegionsFromReplication" ], "Resource": [ "arn:aws:secretsmanager:*:*:secret:marketplace-deployment*!*" ], "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }, { "Sid": "ListSecrets", "Effect": "Allow", "Action": [ "secretsmanager:ListSecrets" ], "Resource": [ "*" ] }, { "Sid": "TagMarketplaceDeploymentSecrets", "Effect": "Allow", "Action": [ "secretsmanager:TagResource" ], "Resource": "arn:aws:secretsmanager:*:*:secret:marketplace-deployment!*", "Condition": { "Null": { "aws:RequestTag/expirationDate": "false" }, "ForAllValues:StringEquals": { "aws:TagKeys": [ "expirationDate" ] }, "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } } ] }
You must configure permissions to allow your users, groups, or roles to create, edit, or delete a service-linked role. For more information, see Service-linked role permissions in the IAM User Guide.
Creating a service-linked role for AWS Marketplace
Setting up the service-linked role is a one-time action that provides the permissions for all products that have Quick Launch enabled, as long as the role exists.
When you configure a product that has Quick Launch enabled, AWS Marketplace will detect whether you have the required service-linked role created for your account. If the role is missing, a prompt to enable AWS Marketplace deployment parameters integration displays, which includes an Enable integration button. AWS Marketplace creates the service-linked role for you when you select this button.
Important
This service-linked role will appear in your account if you've previously configured a product that has Quick Launch enabled. For more information, see A new role appeared in my AWS account.
If you delete this service-linked role and need to create it again, you can use the same process to re-create the role in your account. When you open the Configuration page for any product that has Quick Launch enabled, you'll see the Enable integration button, which you can choose again to re-create the service-linked role.
You can also use the IAM console to create a service-linked role with the
AWS Marketplace - Deployment Management use case. In the
AWS CLI or the AWS API, create a service-linked role with the
deployment.marketplace.amazonaws.com
service name. For more
information, see Creating a service-linked role in the
IAM User Guide. If you delete this service-linked role,
you can use this same process to create the role again.
Editing a service-linked role for AWS Marketplace
AWS Marketplace does not allow you to edit the service-linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see Editing a service-linked role in the IAM User Guide.
Deleting a service-linked role for AWS Marketplace
If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must clean up the resources for your service-linked role before you can manually delete it.
Note
If the service is using the role when you try to delete it, then the deletion might fail. If that happens, wait for a few minutes and try the operation again.
To delete AWS Marketplace resources used by the
deployment.marketplace.amazonaws.com
service, you must delete all
Marketplace Deployment-related secrets from SecretsManager. You can find the
relevant secrets by:
-
Searching for secrets that are managed by
marketplace-deployment
. -
Searching for secrets with the tag key
aws:secretsmanager:owningService
and valuemarketplace-deployment
. -
Searching for secrets where the secret name is prefixed with
marketplace-deployment!
.
To delete the service-linked role using IAM
Use the IAM console, the AWS CLI, or the AWS API to delete the AWSServiceRoleForMarketplaceDeployment service-linked role. For more information, see Deleting a service-linked role in the IAM User Guide.
Supported Regions for AWS Marketplace service-linked roles
AWS Marketplace supports using service-linked roles in all of the Regions where the service is available. For more information, see AWS Marketplace Regions and Endpoints.