Skip to content
New issue

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

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

Already on GitHub? # to your account

does this still work #2

Open
gregnetau opened this issue Mar 3, 2022 · 1 comment
Open

does this still work #2

gregnetau opened this issue Mar 3, 2022 · 1 comment

Comments

@gregnetau
Copy link

Hello & thanks for your work on this module. I've given it a go to test deployment notifications for our 4 codepipeline jobs however sadly we never get any notifications.

When i try and manually test a notification from Lambda, i get the following error:

ERROR Invoke Error {"errorType":"TypeError","errorMessage":"Cannot read property 'action' of undefined","stack":["TypeError: Cannot read property 'action' of undefined"," at processEvent (/var/task/handler.js:11:20)"," at Runtime.exports.handle [as handler] (/var/task/handler.js:21:3)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]}

Does this require more work?

@genzdev
Copy link
Owner

genzdev commented Mar 3, 2022

Hey @gregnetau, this module is fully functional, here is an example implementation:

module "cicd_web_discord" {
  source            = "github.com/genzdev/aws-codepipeline-discord-integration-terraform-module.git"
  PIPELINE_NAMES    = ["<valid_aws_codepipeline_resource_name>"]
  APP_NAME          = "<valid_aws_codepipeline_resource_name>"
  DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/<channel_webhook_string>"
  DISCORD_CHANNEL     = "your_bot_name"
  REGION            = "us-east-1"
}

From the error message you posted, I can't really tell what went wrong (since you did a manual test, please post the event payload that was sent to the lambda during the test).

Please post more information like:

  1. Your module implementation code
  2. Codepipeline resource AWS region vs Discord Module's specified AWS region.
  3. event parameter content received by the lambda's handler function from when a job was executed & you didn't receive a notification.
  4. Discord module's lambda runtime execution log (should be available in cloudwatch logs).

The more info you share the easier it will be for me to help you debug this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants