SLS_ACCOUNT_ID and related env var overrides only work for http event types and not schedule events. The AccountID is an identifier that would be useful for testing cross-account Cloudwatch events triggered by rate or cron schedules.
This logic appears to live at src/events/schedule/ScheduleEvent.js, but my feeble attempts to get this working myself have thus far failed. I though it would be as simple as adding a check for the variable and importing env (see sample below), but so far have come up empty-handed, with the auto-generated id still being used.
Feature Request
SLS_ACCOUNT_ID
and related env var overrides only work for http event types and not schedule events. The AccountID is an identifier that would be useful for testing cross-account Cloudwatch events triggered by rate or cron schedules.This logic appears to live at
src/events/schedule/ScheduleEvent.js
, but my feeble attempts to get this working myself have thus far failed. I though it would be as simple as adding a check for the variable and importing env (see sample below), but so far have come up empty-handed, with the auto-generated id still being used.Sample Code
Expected behavior/code
The presence of
env.SLS_ACCOUNT_ID
should be used asaccount
rather thancreateUniqueId()
Additional context/Screenshots