Spot Event Plugin - AWS Permissions

Spot Event Plugin

AWS Permissions Setup

Amazon Machine Images

Spot Fleet Requests

Security Credentials Configuration

Spot Fleet Configuration

Spot Event Configuration Options

Spot Event Configuration Utility

Deadline Connectivity Configuration

VPC Endpoints Configuration

Multiple Region Support

Overview

When working with AWS you can manage access by creating policies and attaching them to IAM identities or AWS resources.

Within the Spot Event Plugin we require the following roles:

See also

You can learn more about IAM Permissions on the AWS IAM Website.

Spot Credentials

This IAM User or IAM Role is used by the RCS or Pulse when they execute the Spot Event Plugin. These Spot credentials are used by the Spot Event Plugin and contain the permissions necessary to create, maintain and modify the Spot Fleets and optionally those necessary to deploy the Resource Tracker.

You can grant the required permissions by attaching the following AWS managed IAM policies to your IAM user:

These credentials will be used when configuring Deadline.

Creating the Spot Credentials IAM User

To create the Spot Credentials IAM user:

  1. Sign in to the AWS Console.

  2. Click on Services at the top of the AWS Console, and then click on IAM under “Security, Identity and Compliance”.

  3. On the “IAM” panel that appears, select Users, and then click the Add user button.

    ../_images/events_spot_iam_user_creation_1.png
  4. In the “Add user” panel that appears:

    • For the User name, enter DeadlineSpotEventPluginAdmin (or any name of your choosing).

    • For Access type, choose Programmatic access.

  5. Click the Next: Permissions button to continue.

    ../_images/events_spot_iam_user_creation_2.png
  6. Search for the AWSThinkboxDeadlineSpotEventPluginAdminPolicy and AWSThinkboxDeadlineResourceTrackerAdminPolicy policies in the search box, and check both of them in the list below.

  7. Click the Next: Tags button to continue.

    ../_images/events_spot_iam_user_creation_3.png
  8. You can add tags with additional data to the user, but they are not required.

  9. Click the Next: Review button to continue.

    ../_images/events_spot_iam_user_creation_4.png
  10. Verify that the information is correct, and click Create user.

    ../_images/events_spot_iam_user_creation_5.png
  11. Once the user is created you’ll see a confirmation screen. Here you can get your Access key and Secret access key, which you’ll need to enter in the “Security Credentials” field of the Configure Event Plugin dialog.

Warning

Once you navigate away from the confirmation screen, you will be unable to access the Secret Key.

Warning

This secret access key can be used to access your AWS account. It is important that you keep it stored securely. Please refer AWS Guidelines for standard best practices for management of AWS access keys.

Note

For further security, consider modifying these IAM policies with an IP address condition on each policy statement. The IP addresses for this connection should be for any machines that will run the Spot Event Plugin, either the RCS or Pulse instances. Place this text after the “Resource” entry in each of the statements in the policies.

"Condition": {
    "IpAddress" : {
        "aws:SourceIp" : ["<public_ip_address>"]
    }
}

This way, only API calls from the specified IP address will be accepted by AWS.

Spot Fleet IAM Instance Profile

This IAM role is used by the Workers that are started by the Spot Fleet Requests. This role is used to give the Workers permissions to terminate themselves, determine what Group they are part of, and report their status to the Resource Tracker (if in use).

You can assign the required permissions by attaching the following AWS-managed IAM policy to an IAM role. We require that the name of this role begins with “DeadlineSpot”:

Warning

As of Deadline 10.1.8, our default Spot Credentials IAM policy only allows IAM instance profiles with IAM role names that begin with DeadlineSpot.

Creating the IAM Instance Profile

To create the IAM role for your IAM instance profile:

  1. Sign in to the AWS Console

  2. Click on Services at the top of the AWS Console, and then click on IAM under “Security, Identity and Compliance”.

  3. On the “IAM” panel that appears, click Roles, and then click the Create role button.

    ../_images/events_spot_instance_role_creation_1.png
  4. In the “Create role” panel that appears, choose the following:

    • Under Select type of trusted entity, choose AWS service.

    • Under Choose a use case, choose EC2.

  5. Click the Next: Permissions button to continue.

    ../_images/events_spot_instance_role_creation_2.png
  6. Search for AWSThinkboxDeadlineSpotEventPluginWorkerPolicy in the search box, and check it in the list below.

  7. Click the Next: Tags button to continue.

    ../_images/events_spot_instance_role_creation_3.png
  8. You can add tags with additional data to the role, but they are not required.

  9. Click the Next: Review button to continue.

    ../_images/events_spot_instance_role_creation_4.png
  10. In the Role name field, enter DeadlineSpotWorker. You can choose a different name for this role, however, the name must begin with “DeadlineSpot” in order to work with our default Spot Credentials IAM policies.

  11. Verify that the information is correct, and click Create role.

  12. Choose this role as the “IAM instance profile” in your Spot Fleet Request.

IAM Fleet Role

This IAM role is used directly by the Spot Fleet. It gives the Spot Fleet the permissions needed to start, stop, and tag instances.

By default, a role will automatically be created for your account called aws-ec2-spot-fleet-tagging-role which contains all of the permissions that are needed.

Resource Tracker Role

This IAM role is used by Deadline Resource Tracker so that it is able to access the AWS resources that it creates in your account.

This IAM role must have the following settings:

Creating the Resource Tracker IAM Role

To create the Resource Tracker IAM role:

  1. Sign in to the AWS Console.

  2. Click on Services at the top of the AWS Console, and then click on IAM under “Security, Identity and Compliance”.

  3. On the “IAM” panel that appears, click Roles, and then click the Create Role button.

    ../_images/resource_tracker_iam_role_creation_1.png
  4. In the “Create role” panel that appears, choose the following:

    • Under Select type of trusted entity, choose AWS service.

    • Under Choose a use case, choose Lambda.

  5. Click the Next: Permissions button to continue.

    ../_images/resource_tracker_iam_role_creation_2.png
  6. Search for AWSThinkboxDeadlineResourceTrackerAccessPolicy in the search box, and check it in the list below.

  7. Click the Next: Tags button to continue.

    ../_images/resource_tracker_iam_role_creation_3.png
  8. You can add tags with additional data to the role, but they are not required.

  9. Click the Next: Review button to continue.

    ../_images/resource_tracker_iam_role_creation_4.png
  10. In the Role name field, enter DeadlineResourceTrackerAccessRole.

  11. Verify that the information is correct, and click the Create role button.