ScriptProps

class aws_cdk.aws_gamelift_alpha.ScriptProps(*, content, role=None, script_name=None, script_version=None)

Bases: object

(experimental) Properties for a new realtime server script.

Parameters:
  • content (Content) – (experimental) The game content.

  • role (Optional[IRole]) – (experimental) The IAM role assumed by GameLift to access server script in S3. If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions to have Read access to a specific key content into a specific S3 bucket. Below an example of required permission: { “Version”: “2012-10-17”, “Statement”: [{ “Effect”: “Allow”, “Action”: [ “s3:GetObject”, “s3:GetObjectVersion” ], “Resource”: “arn:aws:s3:::bucket-name/object-name” }] } Default: - a role will be created with default permissions.

  • script_name (Optional[str]) – (experimental) Name of this realtime server script. Default: No name

  • script_version (Optional[str]) – (experimental) Version of this realtime server script. Default: No version

Stability:

experimental

ExampleMetadata:

infused

Example:

# bucket: s3.Bucket

gamelift.Script(self, "Script",
    content=gamelift.Content.from_bucket(bucket, "sample-asset-key")
)

Attributes

content

(experimental) The game content.

Stability:

experimental

role

(experimental) The IAM role assumed by GameLift to access server script in S3.

If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions to have Read access to a specific key content into a specific S3 bucket. Below an example of required permission: { “Version”: “2012-10-17”, “Statement”: [{ “Effect”: “Allow”, “Action”: [ “s3:GetObject”, “s3:GetObjectVersion” ], “Resource”: “arn:aws:s3:::bucket-name/object-name” }] }

Default:
  • a role will be created with default permissions.

See:

https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc

Stability:

experimental

script_name

(experimental) Name of this realtime server script.

Default:

No name

Stability:

experimental

script_version

(experimental) Version of this realtime server script.

Default:

No version

Stability:

experimental