Home > front end >  Is it absolutely necessary to explicitely mention region while building SsmClient using aws sdk for
Is it absolutely necessary to explicitely mention region while building SsmClient using aws sdk for

Time:01-20

So basically I want to know what will if we don't mention the region or if mention the region incorrectly

SsmClient ssmClient = SsmClient.builder()
                .region(region)
                .build();

I was expecting that if region is not set then it should not throw any error and will search all regions for the ssm parameter

CodePudding user response:

It's not necessary if you have the region set somewhere else, like in an environment variable. You have to specify a region somehow though. The AWS SDK does not search all regions automatically when you try to reference a resource without a region specified.

  • Related