- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Recommended option is to create different accounts for the different environments. If you use a single account, each environment should have its own Event Bus in EventBridge. PROD functions will create the rule on the PROD bus and STG functions will create the rule on the STG bus. The functions that send events to the event bus will use an environment variable with the ARN of the bus.
I am assuming you are using the same Account ID for both environments. This may explain your experience.
If that is the case, you would have to further filter the rule by the ARN of the channel. Essentially you would have something like so:
{
"source": ["aws.medialive"],
"detail-type": ["MediaLive Channel State Change"]
"detail": {
"channel_arn": ["<staging-channel-arn>"]
}
}
and
{
"source": ["aws.medialive"],
"detail-type": ["MediaLive Channel State Change"]
"detail": {
"channel_arn": ["<production-channel-arn>"]
}
}
You can find the schema for this event here -> https://us-east-2.console.aws.amazon.com/events/home?region=us-east-2#/registries/aws.events/schemas/aws.medialive%40MediaLiveChannelStateChange/version/1
Hi bro, Because I will create many channels. Channel is not static, each environment will create when the client requests so can't specify channel ARN.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 10 Monaten
- AWS OFFICIALAktualisiert vor 8 Monaten
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 9 Monaten
Hi Bro, Please let me know, with event same: { "source": ["aws.medialive"], "detail-type": ["MediaLive Channel State Change"] } How to config with eventbus. Thank you
The events will be the same in both buses, but you write them to different buses. As you can see in the PutEvents API, there is a field there for the event bus name. This will be different for the different environments.