Skip to content

AWS Support of CloudEvents #435

Closed
Closed
@timbray

Description

@timbray

Hi. We're working on a bunch of event-related stuff at AWS with a view to releases in 2019. It has been internally proposed that we "Support CloudEvents" and this seems to me like a good idea. No promises, but my opinion is that if we could find a plausible way to do it, there is a high likelihood that we would.

Important This is not an official communication, this is Tim looking for options I can use internally.

Background

We already have an AWS Event envelope that is widely used across AWS chiefly through the "CloudWatch Events" service. There's no formal schema or anything but it's documented here.

The required top-level fields are:

  • version: (Corresponds to CloudEvents specversion)
  • detail-type: (type)
  • source: (source)
  • id: (id)
  • time: (time)
  • detail: (data)

Fields in AWS Events not in CloudEvents: region, account, resources.

Fields in CloudEvents not in AWS Events: datacontenttype (So far we're all-JSON all the time.)

Problems

  1. There are already huge numbers of AWS Events per second flowing through our system and there's no API, the only documentation is of the bits on the wire. And, there are a huge number of AWS customers who are making use of this service. Therefore there is no reasonable prospect of us changing field names.
  2. CloudEvents isn't finished, but we want to ship production software in 2019. In theory, the working group could do a wholesale redesign of the attributes at any time. Can any organization plausibly claim to "Support CloudEvents" at this stage in history? It's not obvious to me how.

Appeal for input

Before I dive any deeper, I'd welcome general comments along the lines of "No, just wait till CloudEvents is finished", or "That is a really bad idea because X" for some value of X, or "You can effectively support CloudEvents by doing A, B, and C." Thanks in advance.

Some notes about possibilities

  1. CloudEvents could consider freezing the field names. I.e. adopt some sort of policy that whereas new attributes may be added, there's a commitment not to change the names of the ones that exist.
    1.1. And if you wanted to try making AWS an offer it couldn't refuse, consider changing the field names to match ours. We could add support for the extra CloudEvents fields and our extras could be extensions. There are some semantic incompatibilities (e.g. our "source" field looks like a relative URI reference) but probably there are workarounds. (OK, long shot).
  2. Make sure all the CloudEvents SDKs include getters (I don't think setters?) for all the specified attributes. That way, if someone like us has CloudEvents-like constructs but with incompatible names, we could implement the SDK and then claim we're compatible because you can always use the CloudEvents SDK to access the attributes. Is this sane?
  3. At the very least we could ship libraries that transcode between AWS Events and CloudEvents. Would that be enough to make users happy?

Activity

cneijenhuis

cneijenhuis commented on Jun 15, 2019

@cneijenhuis
Contributor

Sorry, I already wanted to draft a reply last week. I hope it helps.

CloudEvents isn't finished, but we want to ship production software in 2019. In theory, the working group could do a wholesale redesign of the attributes at any time. Can any organization plausibly claim to "Support CloudEvents" at this stage in history? It's not obvious to me how.

Well, an organization can claim to support CloudEvents at a specific version. E.g. Azure supports 0.1 currently.

CloudEvents could consider freezing the field names. I.e. adopt some sort of policy that whereas new attributes may be added, there's a commitment not to change the names of the ones that exist.

The policy (semver) is hidden in here: https://github.com/cloudevents/spec/blob/master/GOVERNANCE.md#release-process-and-versioning (Took me a while to find the place as well 😉)
1.0 will do what you ask for.

Fields in AWS Events not in CloudEvents: region, account, resources.

I'd argue that in CloudEvents lingo, they should be part of the source.
E.g. the (ce-)source is /region/account/resource/(aws-)source

At the very least we could ship libraries that transcode between AWS Events and CloudEvents. Would that be enough to make users happy?

I'd think that would be a good first step. Even better if the transcoding can be enabled at service level (i.e. I can ask S3 to release CloudEvents instead of AWS Events. BTW: This would also be a good place to do the versioning. I could ask S3 to do CE 1.0, 0.3 or (at some point...) 2.0.


If I'm getting you correctly, when you talk about AWS support for CloudEvents, you talk about the events that AWS produces. This is certainly important.
However, at least as important (to me) is that the eventing/messaging products that AWS has natively support CloudEvents.
E.g. for SNS it'd be great if I could filter on CloudEvents attributes (at least the standard ones such as source and types)
It would also be great if SNS supports the HTTP transport binding for publishing and receiving events.

Anyway, AWS producing CloudEvents would already be a great first step!

jordo1138

jordo1138 commented on Jul 13, 2019

@jordo1138

Eventbridge yeah? Looks like a platform that ought to support the spec, at least, users would be looking for it at some point

cneijenhuis

cneijenhuis commented on Jul 15, 2019

@cneijenhuis
Contributor

@jordo1138 Came here to say the same thing 😉

@timbray Do you have plans to support CloudEvents at EventBridge soon-ish? If not/if later, is it ok if I go ahead and create a proprietary transport?

timbray

timbray commented on Jul 17, 2019

@timbray
Author

As for a proprietary transport, the AWS CloudWatch Events format is already documented on that page, and EventBridge is continuing to use it, so I think we're covered. As I said at the top of this thread, I'd like to figure out a good way for AWS to be in the community, and I'm happy the group is converging on a stable 1.0, which will make it easier.

timbray

timbray commented on Jul 17, 2019

@timbray
Author

Hey @cneijenhuis , thanks for the note. I believe pretty strongly that once 1.0 gets announced, if it gets any adoption, it'll become difficult to extend and change and further version. I speak from experience as one who is running $BIG_NUMBER events/second through a bus and has $BIG_NUMBER of customers processing them. Nobody wants to do any versioning on this stuff once it's running. Note to self: Ping @clemensv to figure out if Azure's going to migrate from 0.1 to 1.0. If they're not, it might make more sense for us to stick with 0.1.

Interesting points about the value of "source"; at first glance I think I might agree.

cneijenhuis

cneijenhuis commented on Jul 18, 2019

@cneijenhuis
Contributor

@timbray I tend to agree on the versioning.

With Clemens on vacation - I think he mentioned on a call that Azure is planning to support 1.0. I don't know if they'll migrate, or if they'll support both side-by-side for some time.

As for a proprietary transport, the AWS CloudWatch Events format is already documented on that page

Are you referring to https://github.com/cloudevents/spec/blob/master/adapters/aws-s3.md ?

I'll try to find some time to get some hands-on experience with EventBridge at the end of next week (independently of CloudEvents). My gut-feeling is that what we've defined as an adapter in https://github.com/cloudevents/spec/blob/master/adapters/aws-s3.md works for AWS-produced CloudWatch Event -> CloudEvent, but doesn't scale to Any CloudEvent -> CloudWatch Event -> CloudEvent (with the original and the "transported" CloudEvent being unchanged)... but maybe I'm simply looking at the wrong file?

timbray

timbray commented on Jul 18, 2019

@timbray
Author
cneijenhuis

cneijenhuis commented on Jul 19, 2019

@cneijenhuis
Contributor

Thanks! That doesn't define a mapping from/to CloudEvents, though - which is what I'd be interested in, but I may just be too impatient 😉

to-masz

to-masz commented on Aug 26, 2019

@to-masz

@timbray I would like to highlight what @cneijenhuis said about AWS support - it would be good to define how to use CloudEvents with AWS services like SNS/SQS.

  1. whether you prefer to add support for HTTP transport binding (https://github.com/cloudevents/spec/blob/master/http-transport-binding.md#314-examples), e.g. as dedicated SNS endpoint to publish messages in that form and then to support it for HTTP endpoint delivery
  2. or just write down SNS transport binding, e.g. similar to https://github.com/cloudevents/spec/blob/master/kafka-transport-binding.md#325-example
duglin

duglin commented on Sep 5, 2019

@duglin
Collaborator

@timbray is there anything we need to do on this one? Should we close it?

16 remaining items

embano1

embano1 commented on Jun 1, 2023

@embano1
Member

I've reopened the issue, but I'm wondering what the action would be for the CE group. This feels more like an AWS issue than a CE issue at this point. Unless there's some collaboration we need to help kick-off??

Thx. ACK, I might get back to you at some point with some advice, but currently there's no AI on the CE side. Let's keep this open for some time and close if there's no further interactions from user(s).

j-fulbright

j-fulbright commented on Mar 5, 2024

@j-fulbright

Now that CE is officially "graduated", maybe this can be looked at again

embano1

embano1 commented on Mar 5, 2024

@embano1
Member

Now that CE is officially "graduated", maybe this can be looked at again

@j-fulbright a small step, but we're moving into the right direction: https://aws.amazon.com/about-aws/whats-new/2024/02/amazon-eventbridge-api-destinations-content-type-header-customization/

Happy to discuss the topic in the greater AWS (EventBridge) scheme. Feel free to connect.

duglin

duglin commented on Mar 20, 2024

@duglin
Collaborator

AWS EventBridge now supports CE: https://aws.amazon.com/about-aws/whats-new/2024/02/amazon-eventbridge-api-destinations-content-type-header-customization/

I'm going to propose that we close this issue on tomorrow's call... if anyone objects please speak up here or on the call

embano1

embano1 commented on Mar 20, 2024

@embano1
Member

FWIW, we also wrote a blog post to explain the current integration possibilities: https://aws.amazon.com/blogs/compute/sending-and-receiving-cloudevents-with-amazon-eventbridge/

timbray

timbray commented on Mar 20, 2024

@timbray
Author

Hey Michael,

Under "Publishing CloudEvents using Amazon EventBridge", is the value of the data.dataschema field really right? Why go through the console?

embano1

embano1 commented on Mar 20, 2024

@embano1
Member

Hey Michael,

Hi Tim, great to see you around!

Under "Publishing CloudEvents using Amazon EventBridge", is the value of the data.dataschema field really right? Why go through the console?

Good catch! Let me file with the author and get this fixed!

duglin

duglin commented on Mar 21, 2024

@duglin
Collaborator

@timbray just FYI:
image

timbray

timbray commented on Mar 21, 2024

@timbray
Author

@duglin Um sorry, I see you were trying to comment on my blog. For some reason, my anti-spam system decided erroneously that you were a Bad Person, and when it does that it retreats behind a cloud of almost-plausible error messages - refresh https://www.tbray.org/atompub/ouch a few times to see the effect. Amazingly effective at deterring spammers. My apologies on behalf of my anti-spam system; its memory is only 15 minutes long, so if you try again you'll probably get through.

duglin

duglin commented on Mar 21, 2024

@duglin
Collaborator

Agreed to CWNA on the 3/21 call

duglin

duglin commented on Mar 21, 2024

@duglin
Collaborator

@duglin Um sorry, I see you were trying to comment on my blog. For some reason, my anti-spam system decided erroneously that you were a Bad Person, and when it does that it retreats behind a cloud of almost-plausible error messages - refresh https://www.tbray.org/atompub/ouch a few times to see the effect. Amazingly effective at deterring spammers. My apologies on behalf of my anti-spam system; its memory is only 15 minutes long, so if you try again you'll probably get through.

I do enjoy reading them - still doesn't like me:
image

any way to know why? I'm leaving "web address" blank

timbray

timbray commented on Mar 21, 2024

@timbray
Author

@duglin This is probably not of general interest but I would like to figure out what's going wrong. Maybe shoot me an email, same handle at gmail, and I can ask a couple questions?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @timbray@moltar@to-masz@duglin@cneijenhuis

        Issue actions

          AWS Support of CloudEvents · Issue #435 · cloudevents/spec