-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration and Deployment
The Makefile runs several aws-cli commands. Terraform will need access to AWS credentials. Refer to the CLI installation docs.
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.
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
.
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.
All other infrastructure can be created using terraform apply
.
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.