Skip to content

fix: remove undefined reference to this.region#166

Closed
zlalvani wants to merge 1 commit into
CoorpAcademy:masterfrom
zlalvani:fix-sqs-region-reference
Closed

fix: remove undefined reference to this.region#166
zlalvani wants to merge 1 commit into
CoorpAcademy:masterfrom
zlalvani:fix-sqs-region-reference

Conversation

@zlalvani

Copy link
Copy Markdown

In packages/serverless-offline-sqs/src/sqs.js, there is an undefined reference to this.region that causes the awsRegion parameter to not be passed to lambda invocations.

For context, I am using a parsing library that considers awsRegion to be a required field.

@GonzaloSaad

Copy link
Copy Markdown

Hello! Can we merge this! It would be good to have this live!

silouone added a commit that referenced this pull request Jun 19, 2026
…ueName fixes

- Serverless v4 logger migration (src/log.js shim threaded into the SQS emulator).
- Fix undefined this.region -> this.options.region so emitted events carry awsRegion. Re-implements #166 (thanks @zlalvani).
- Make SQS deleteMessageBatch entry Ids unique within a batch (index-based, <=80 chars). Re-implements #253 (thanks @flipscholtz).
- Add custom.serverless-offline-sqs.queueName override (non-mutating; strips arn so it wins for arn-bearing shapes). Re-implements #211 (thanks @mfamilia).
- Backward compatible with serverless v3. Adds docker-free unit tests. v8.1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
silouone added a commit that referenced this pull request Jun 19, 2026
…nt-def fixes

- Serverless v4 logger migration (src/log.js shim threaded in; handler errors are now logged instead of silently swallowed).
- Fix undefined this.region -> this.options.region so emitted events carry awsRegion. Re-implements #166 (thanks @zlalvani).
- Replace the infinite silent handler retry with a bounded, logged retry (default maximumRetryAttempts=10, mirrors dynamodb-streams). Re-implements #100 (thanks @dolsem).
- Await this.lambda.create(...). Re-implements #249 (thanks @gabsong).
- Fix kinesis-event-definition omit list (tableName -> streamName copy-paste bug).
- Backward compatible with serverless v3. Adds docker-free unit tests. v7.1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
silouone added a commit that referenced this pull request Jun 19, 2026
…no-streams fixes

- Serverless v4 logger migration (src/log.js shim threaded in; handler errors are now logged).
- Fix undefined this.region -> this.options.region so emitted events carry awsRegion. Re-implements #166 (thanks @zlalvani).
- Throw a clear 'Table <name> does not have streams enabled' error instead of failing cryptically. Re-implements #98 (thanks @dolsem).
- Rename the copy-pasted KinesisEvent class to DynamodbStreamsEvent.
- Backward compatible with serverless v3. Adds docker-free unit tests. v7.1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@silouone

Copy link
Copy Markdown
Member

Thanks so much @zlalvani for catching that this.region was undefined and that the emitted events therefore carried no awsRegion — exactly right. We've now implemented this in #265 (on master now, released shortly in the next release of serverless-offline-sqs), so I'm closing this in favor of that PR. Really appreciate the fix 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants