Closed lyricnz closed 3 months ago
Problem is that getAwsConfig() doesn't have the configuration file as context, so can't use it. Need to fix it further back.
I think the SQS/SNS clients should explicitly use the context-region, rather than relying on the behaviour of the SDK (and a variable that exists only in a Lambda context).
protected async writeSQS() {
const config = getAwsConfig(this.context?.region); // <====
...
Added the explicit region to https://github.com/Innablr/revolver/pull/345
@alutman-innablr @abukharov does this seem safe/correct? When running in Lambda, $AWS_REGION is provided which matches the Lambda deployment, but this is not the case when running locally (and maybe should not be relied upon?).
This appears to be because when running locally without $AWS_REGION defined, SNS/SQS clients do not use /default/settings/region. S3 does not fail like this because it has an explicit region setting.