- Newest
- Most votes
- Most comments
You should associate the compute platform where you run your code with an AWS IAM role. For example, if you're running your code on an EC2 instance, associate the IAM role with an EC2 instance profile, and attach the instance profile to your EC2 instance. If your code is running in a Lambda function, as another example, configure the IAM role as the Lambda function's execution role.
Configured this way, when you run code on your EC2 instance or in your Lambda function, without specifying any credentials, and call ResolveCustomer or any other AWS API, the underlying AWS SDK for .NET library will automatically discover that it's running on top of an AWS compute platform. It will then transparently obtain temporary credentials from the AWS-provided platform and execute the API call with temporary credentials belonging to the IAM role.
In this case, the IAM role and the compute platform must reside in the seller account, and the IAM permissions policies that you attach to the role must allow the appropriate permissions, including aws-marketplace:ResolveCustomer from your question. An example policy statement is in this documentation section: https://docs.aws.amazon.com/marketplace/latest/userguide/iam-user-policy-for-aws-marketplace-actions.html#iam-user-policy-for-saas-products
The IAM role is not tied to a person, and it only has the permissions that it's explicitly granted by applicable permissions policies. The word "account" refers to the AWS account where your resources reside, not to the credentials under which certain code runs. This is different from Microsoft Active Directory Domain Services (AD DS), for example, where "account" is typically used to refer to the credentials used to authenticate as a user, computer, or service. The credentials associated with an AWS IAM role are always temporary and randomly generated by the AWS platform (STS or Auth Runtime Service), not statically specified in the style of a service account password in classical Microsoft AD DS.
Relevant content
asked 2 years ago
asked 3 years ago
