Skip to content

Conversation

@gravesm
Copy link

@gravesm gravesm commented Aug 2, 2018

This adds a Lambda handler function. There are a few assumptions being
made here. This assumes the Lambda will be triggered by a CloudWatch
event and that the event will pass a JSON structure that indicates the
type of feed to generate. The function is configured through environment
variables. Env vars that contain sensitive information should be added
to an AWS Secrets object.

I'm making some guesses here as to how the event data and secrets get
passed to the Lambda. The documentation suggests it's possible to pass
JSON in both cases, but it's not entirely clear. Some adjustment may be
required after attempting to run this in AWS.

This adds a Lambda handler function. There are a few assumptions being
made here. This assumes the Lambda will be triggered by a CloudWatch
event and that the event will pass a JSON structure that indicates the
type of feed to generate. The function is configured through environment
variables. Env vars that contain sensitive information should be added
to an AWS Secrets object.

I'm making some guesses here as to how the event data and secrets get
passed to the Lambda. The documentation suggests it's possible to pass
JSON in both cases, but it's not entirely clear. Some adjustment may be
required after attempting to run this in AWS.
@gravesm gravesm requested review from JPrevost and hakbailey August 2, 2018 19:42
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'd probably run this in a lambda before merging as a sanity check, but I'm also cool with changes after the fact if it's easier.

carbon/app.py Outdated
return cfg


class Lambda:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a great class name as it isn't what it is or does, but instead is the context in which you might run it. I also don't have a better name so I'm not blocking on this, just kinda suggesting a pause to confirm it works okay for you in context and then either change or not ;)

@gravesm
Copy link
Author

gravesm commented Aug 2, 2018

Figuring out how to get this packaged into a lambda with the proprietary oracle library is going to be a PITA. I figured I'd do this part first, then sort out the packaging part.

@JPrevost
Copy link
Member

JPrevost commented Aug 2, 2018

👍

Use a name that better reflects what the class does.
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 to new class name. I lol'd in a good way.

@gravesm gravesm merged commit 7592cf1 into master Aug 3, 2018
@gravesm gravesm deleted the lambda branch August 3, 2018 14:24
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