Skip to content

Configuration and Deployment

Nathaniel Beckstead edited this page Jul 22, 2020 · 2 revisions

AWS CLI

The Makefile runs several aws-cli commands. Terraform will need access to AWS credentials. Refer to the CLI installation docs.

Lambda functions

The zip packages for all Lambda functions are located in an S3 bucket named s3eker-lambda-store. Since bucket names must be unique, this will need to be changed in the infra/variables.tf Terraform file. The bucket needs to be created manually. The Terraform creates the functions and will error if the code does not exist.

Deployment

After the bucket is created, the command make pack can be used to package the functions and upload them to S3. It will fail to update the nonexistent Lambda functions, but that's okay. Each function is uploaded to the path function-name/function-name.zip.

Slack notifications

An AWS Secrets Manager secret name s3ekerSlackWebhook is used to store the Slack webhook. Create a new app on the Slack API website and give it the Incoming Webhooks functionality. Create a webhook and add it to a channel. Create a new secret in AWS as type Other type of secrets and paste the webhook as plaintext.

Terraform

All other infrastructure can be created using terraform apply.

Test

The make test command will publish a message with an open bucket to the SNS topic. This should result in a Slack notification. Before running, change the topic ARN to your SNS topic.

Clone this wiki locally