How GameSparks works with IAM - Amazon GameSparks

Amazon GameSparks is currently in preview. Changes might be made to this service and to this documentation. We don’t recommend using this service for production workloads.

How GameSparks works with IAM

GameSparks uses AWS Identity and Access Management (IAM) roles to grant permissions to:

  • Users, allowing them to access and work with GameSparks games and stages.

  • Stages, allowing them to perform some of their core functions.

Identity-based policies

Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Creating IAM policies in the AWS Identity and Access Management User Guide.

With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can’t specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the AWS Identity and Access Management User Guide.

For examples of GameSparks identity-based policies, see Identity-based policy examples for GameSparks.

Policy actions

The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don’t have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions.

Include actions in a policy to grant permissions to perform the associated operation.

Policy actions in GameSparks use the following prefix before the action:

gamesparks

To specify multiple actions in a single statement, separate them with commas.

"Action": [ "gamesparks:DescribeGame", "gamesparks:ExportGameDocument" ]

For a list of GameSparks policy actions, see Actions defined by Amazon GameSparks in the Service Authorization Reference.

Policy resources

The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions.

For actions that don’t support resource-level permissions, such as listing operations, use a wildcard character (*) to indicate that the statement applies to all resources.

"Resource": "*"

For a list of resource types and their ARNs, see Resources defined by Amazon GameSparks in the Service Authorization Reference. For a list of the actions that you can specify for the ARN of each resource, see Actions defined by Amazon GameSparks in the Service Authorization Reference.

Policy condition keys

The optional Condition element (or Condition block) specifies conditions in which a statement is in effect. You can create conditional expressions that use condition operators, such as equals or less than, to match the condition in the policy with values in the request.

If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement’s permissions are granted.

You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: Variables and tags in the AWS Identity and Access Management User Guide.

AWS supports global condition keys and service-specific condition keys. For a list of all AWS global condition keys, see AWS global condition context keys in the AWS Identity and Access Management User Guide. For a list of GameSparks condition keys, see Condition keys for GameSparks in the Service Authorization Reference.

To learn which actions and resources you can use with a condition key, see Actions defined by GameSparks in the Service Authorization Reference.

Attribute-based access control (ABAC)

Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then you design ABAC policies to allow operations when the principal’s tag matches the tag on the resource that they are trying to access.

ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome.

To control access based on tags, you provide tag information in the Condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys.

For more information about ABAC, see What is ABAC for AWS? in the AWS Identity and Access Management User Guide.

For a tutorial with steps for setting up ABAC, see IAM tutorial: Define permissions to access AWS resources based on tags.

Cross-service principal permissions

When you use an IAM user or role to perform actions in AWS, you are considered a principal. Policies grant permissions to a principal. When you use some services, you might perform an action that initiates another action in a different service. In this case, you must have permissions to perform both actions.

To see whether an action requires additional dependent actions in a policy, see Actions, resources, and condition keys for GameSparks in the Service Authorization Reference.

Service roles (stage roles)

To perform core functions, GameSparks uses service roles as stage roles (one for each stage). Stage roles provide access only within your account and cannot be used to grant access to services in other accounts. An IAM administrator can create, modify, and delete a stage role from within IAM.

For more information about stage roles in GameSparks, see GameSparks stage roles.

For general information about service roles, see Creating a role to delegate permissions to an AWS service in the AWS Identity and Access Management User Guide.

Warning

Changing the permissions for a service role might break GameSparks functionality. Edit service roles only when GameSparks provides guidance to do so.

IAM features that are not used in GameSparks

The following IAM features are not used in GameSparks:

  • ACLs support

  • AWS managed policies

  • Policy conditions

  • Principal permissions (FAS tokens)

  • Resource-based policies

  • Service-linked roles

  • Temporary security credentials

Learn more about IAM

For more information about IAM, see the following topics in the IAM documentation: