Increase the container resources - Distributed Load Testing on AWS

Increase the container resources

To increase the number of users currently supported, increase the container resources. This allows you to increase the CPUs and memory to handle the increase in concurrent users.

Create a new task definition revision

  1. Sign in to the Amazon Elastic Container Service console.

  2. In the left navigation menu, select Task Definitions.

  3. Select the checkbox next to the task definition that corresponds to this solution. For example, <stackName>-EcsTaskDefinition-<system-generated-random-Hash>.

  4. Choose Create new revision.

  5. On the Create new revision page, take the following actions:

    1. Under Task size, modify the Task memory and the Task CPU.

    2. Under Container Definitions, review the Hard/Soft memory limits. If this limit is lower than your desired memory, choose the container.

    3. In the Edit container dialog box, go to Memory Limits and update the Hard Limit to your desired memory.

    4. Choose Update.

  6. On the Create new revision page, choose Create.

  7. After the task definition is successfully created, record the name of the new task definition. This name includes the version number, for example: <stackName>-EcsTaskDefinition-<system-generated-random-Hash>:<system-generated-versionNumber>.

Update the AWS Lambda environment variable

  1. Navigate to the AWS Lambda console.

  2. Select the task-runner Lambda function associated with this solution. For example, <stackName>-TaskRunner-<system-generated-random-Hash>.

  3. On the task-runner Lambda function page, select the Configuration tab.

  4. From the left navigation pane, select Environment Variables.

  5. Choose Edit.

  6. Update the TASK_DEFINITION environment variable with the task definition revision that you recorded in Create a new task definition revision, step 7.

  7. Choose Save.