Skip to content
v2.277.0

Experimental

@aws-cdk/aws-gamelift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ScriptProps Struct ​

Properties for a new realtime server script.

Example ​

ts
declare const bucket: s3.Bucket;
new gamelift.Script(this, 'Script', {
  content: gamelift.Content.fromBucket(bucket, "sample-asset-key")
});
python
# bucket: s3.Bucket

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

Script.Builder.create(this, "Script")
        .content(Content.fromBucket(bucket, "sample-asset-key"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.GameLift.Alpha
Bucket bucket;

new Script(this, "Script", new ScriptProps {
    Content = Content.FromBucket(bucket, "sample-asset-key")
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2
var bucket Bucket

gamelift.NewScript(this, jsii.String("Script"), &ScriptProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

Properties ​

contentContentcontentContentcontentContentContentContentContentContent required #
The game content.
roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole #
The IAM role assumed by GameLift to access server script in S3.

Default: a role will be created with default permissions.

notes

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" }] }

scriptNameoptionalstringscript_nameoptionalstrscriptNameoptionalStringScriptNameoptionalstringScriptNameoptional*string #
Name of this realtime server script.

Default: No name

scriptVersionoptionalstringscript_versionoptionalstrscriptVersionoptionalStringScriptVersionoptionalstringScriptVersionoptional*string #
Version of this realtime server script.

Default: No version