Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Log Stream first instead of trying to get next sequence token #9

Open
amekkawi opened this issue May 6, 2017 · 0 comments
Open

Comments

@amekkawi
Copy link
Owner

amekkawi commented May 6, 2017

Related to #8, it may be better to take a different approach to handling the initial setup before pushing log events to a log stream.

Right now cwlogs-writable does this:

  1. Describe the Log Stream to get the next sequence token
  2. If it doesn't exist, create the Log Stream and go back to step 1

This means 2 DescribeLogStreams requests are sent for Log Streams that do not yet exist, which should be the case if you're using unique enough Log Stream names.

Instead it may be better to do this:

  1. Attempt to create the Log Stream, ignoring failure
  2. Describe the Log Stream to get the next sequence token (unless the create log stream response includes the token)
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

No branches or pull requests

1 participant