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

Add support to run script on AWS Lambda #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Add support to run script on AWS Lambda #1

wants to merge 11 commits into from

Conversation

spenczar
Copy link
Collaborator

This is a big commit, centered around running dontspendtoomuch.py on Lambda. One part of it is writing Terraform to define infrastructure. That terraform file shouldn't live in this repo for long; it should move into the central scimma/aws-dev repository for a consistent state management strategy. But for now, here is fine.

Another part of it is work to create Lambda-style build artifacts. That's all done inside Make. The idea is just that we need to ship up a zip archive with the script and all of its dependencies.

Finally, there are some little changes to dontspendtoomuch.py. An entrypoint for lambda invocations is added, and a barebones send-to-slack function is added. That function doesn't do any formatting so it's not very useful just yet.

As of this commit, I have tfstate files stored locally. I am not sure it's worth setting up state management since we'll be moving the .tf file over to a different repo where that work is already done.

This is a big commit, centered around running dontspendtoomuch.py on
Lambda. One part of it is writing Terraform to define infrastructure.
That terraform file shouldn't live in this repo for long; it should
move into the central scimma/aws-dev repository for a consistent state
management strategy. But for now, here is fine.

Another part of it is work to create Lambda-style build artifacts.
That's all done inside Make. The idea is just that we need to ship up
a zip archive with the script and all of its dependencies.

Finally, there are some little changes to dontspendtoomuch.py. An
entrypoint for lambda invocations is added, and a barebones
send-to-slack function is added. That function doesn't do any
formatting so it's not very useful just yet.

As of this commit, I have tfstate files stored locally. I am not sure
it's worth setting up state management since we'll be moving the .tf
file over to a different repo where that work is already done.
allowed_account_ids = ["585193511743"]
}

resource "aws_secretsmanager_secret" "slack_hook_url" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: i had to create the slack webhook by hand, and inserted it into the AWS console by hand.

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.

2 participants