Unable to add multiple AWS accounts with their respective regions

Problem

You can't add multiple AWS accounts with their respective regions to the New Relic Lambda Extension.

Solution

The newrelic-lambda CLI should be run once per region, with the --aws-region parameter. Use the same linked account name, and the tool will detect that the account link has been created already. The secret needs to be created in each region.

Similarly, several AWS accounts can be linked to a New Relic account. Give each account a different linked account name. The --aws-profile argument to the CLI tool will select the named profile. The tool uses the same configuration as the AWS CLI.