Issue
I do not want to hardcode region id and pass region name as String from command line. Is there a way to do that? Hardcoding:
Region s3Region = Region.getRegion(Regions.US_EAST_1);
Non Hardcoded but not working:
Region s3Region = Region.getRegion(Regions.fromName(awsRegion));
Solution
Answering the question that I think you mean to ask:
If you have an Amazon region name like, for example, "us-east-1" then you can easily convert it to a RegionEndpoint:
RegionEndpoint endpoint = Amazon.RegionEndpoint.GetBySystemName("us-east-1");
Answered By - Ray Fischer Answer Checked By - Pedro (WPSolving Volunteer)