Configure AWS credentials with something other than us-west-2 (e.g. us-east-1).
Create a GreenGrass Group with at least one lambda function (some code path executes GroupCommand.create) and make sure the specified region doesn't match your AWS config.
Expected result:
Lambda function lookups should be correctly scoped to the region specified as parameters.
Actual result:
Lambda function lookups aren't performed in the region specified as parameters; the default specified in AWS credentials is used.
Suggested fix:
cmd.py
GroupCommands._create_function_definition
Change this line –
aws = boto3.client('lambda')
– to this –
aws = boto3.client('lambda', region_name=region)
Steps to reproduce:
Expected result:
Lambda function lookups should be correctly scoped to the region specified as parameters.
Actual result:
Lambda function lookups aren't performed in the region specified as parameters; the default specified in AWS credentials is used.
Suggested fix:
cmd.py GroupCommands._create_function_definition
Change this line –
aws = boto3.client('lambda')
– to this –aws = boto3.client('lambda', region_name=region)