aws-solutions/distributed-load-testing-on-aws

Not able to start multi-region test for regions newer than 2019

Closed this issue · 2 comments

Describe the bug
Error from the other region DLTRegionalFargateDLTCloudWatchLogsGroup:

download failed: s3://load-test-stack-dlttestrunnerstoragedltscenariosbu-3rtzettjjwdy/test-scenarios/8GbeMjMlll-ap-southeast-4.json to ./test.json An error occurred (IllegalLocationConstraintException) when calling the GetObject operation: The ap-southeast-2 location constraint is incompatible for the region specific endpoint this request was sent to.

Looks like issue is on below code that is not specifying the region when copying.
https://github.com/aws-solutions/distributed-load-testing-on-aws/blob/main/deployment/ecr/distributed-load-testing-on-aws-load-tester/load-test.sh#L25

To Reproduce
1 - Add the ecs:TagResource permission to the regional policy created under DLTLambdaFunctionDLTTestLambdaTaskR role.
2 - Execute a test on the new region.

Expected behavior
Test should work from another region

Please complete the following information about the solution:

  • Version: [e.g. v1.1.0]
    3.2.5
  • Region: [e.g. us-east-1]
    ap-southeast-4
  • Was the solution modified from the version published on this repository?
    Yes, only added the ecs:tag permission
  • If the answer to the previous question was yes, are the changes available on GitHub?
    No, issue opened by another user
  • Have you checked your service quotas for the services this solution uses?
    Yes
  • Were there any errors in the CloudWatch Logs?
    Yes

Additional context

This is a very unique case. Usually are happening for newer regions. I will look into it and get back to you on this.

Found that issue relates to not including --region on aws s3 cp commands from the load-test.sh script.

Options are to either update awscli to v2 or to use --region command.

This impacts only regions released after March 20, 2019.

Also tested by injecting the cp command in the entrypoint of the task definition and it worked but forgot that you also need to add in the end of the script for exporing the results. Only workaround I see is to rebuild the image and update the load-test.sh script.

More details:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingRouting.html#Redirects