Required permissions for Spot placement score
By default, IAM identities (users, roles, or groups) don't have permission to use
Spot placement score. To allow IAM identities to use Spot placement score, you
must create an IAM policy that grants permission to use the
ec2:GetSpotPlacementScores
EC2 API action. You then attach the policy
to the IAM identities that require this permission.
The following is an example IAM policy that grants permission to use the
ec2:GetSpotPlacementScores
EC2 API action.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ec2:GetSpotPlacementScores", "Resource": "*" } ] }
For information about editing an IAM policy, see Editing IAM policies in the IAM User Guide.
To provide access, add permissions to your users, groups, or roles:
-
Users and groups in AWS IAM Identity Center:
Create a permission set. Follow the instructions in Create a permission set in the AWS IAM Identity Center User Guide.
-
Users managed in IAM through an identity provider:
Create a role for identity federation. Follow the instructions in Create a role for a third-party identity provider (federation) in the IAM User Guide.
-
IAM users:
-
Create a role that your user can assume. Follow the instructions in Create a role for an IAM user in the IAM User Guide.
-
(Not recommended) Attach a policy directly to a user or add a user to a user group. Follow the instructions in Adding permissions to a user (console) in the IAM User Guide.
-