awslabs / aws-greengrass-group-setup

File-driven creation of an entire AWS Greengrass group
Apache License 2.0
54 stars 23 forks source link

Group Commands > Create Function Definition doesn't honor region #8

Closed ShaunEdiger closed 6 years ago

ShaunEdiger commented 6 years ago

Steps to reproduce:

  1. Configure AWS credentials with something other than us-west-2 (e.g. us-east-1).
  2. 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)

brettf commented 6 years ago

Should be fixed with commit bf6268c00d545887c3bc8fbe7081aef94ec03455