question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(codepipeline): Invalid request when setting notification with Chatbot as target

See original GitHub issue

Cannot create CodeStarNotification from CodePipeline when using Chatbot as target.

Reproduction Steps

Cannot exactly provide full working code but that snippet should be enough to describe approach I’ve taken:

slack_channel = chatbot.SlackChannelConfiguration.from_slack_channel_configuration_arn(
    self,
    'AyDeployment',
    cdk.Arn.format(
        cdk.ArnComponents(
            service='chatbot',
            resource='chat-configuration/slack-channel',
            resource_name='SOME_CHANNEL',
        ),
        self,
    ),
)

# pipeline is cdk.Pipeline
# pipeline.code_pipeline is codepipeline.Pipeline
pipeline.code_pipeline.notify_on(
    'NotifyOnDeployment',
    slack_channel,
    events=[
        cp.PipelineNotificationEvents.PIPELINE_EXECUTION_STARTED,
        cp.PipelineNotificationEvents.PIPELINE_EXECUTION_FAILED,
        cp.PipelineNotificationEvents.PIPELINE_EXECUTION_SUCCEEDED,
    ],
)

What did you expect to happen?

Correctly configured notification.

What actually happened?

8:46:50 AM | CREATE_FAILED        | AWS::CodeStarNotifications::NotificationRule | NotifyOnDeploymentE5ED89E4
Resource handler returned message: "Invalid request provided: AWS::CodeStarNotifications::NotificationRule" (Reques
tToken: 9c7badbc-8365-ebb1-f3f9-a055cc3be81e, HandlerErrorCode: InvalidRequest)

Environment

  • CDK CLI Version : 1.121.0
  • Framework Version: ?
  • Node.js Version 14.17.4:
  • OS : MacOS BigSur
  • **Python (Version): 3.9.6 **

Other

  • Tried to directly created a notification using codestarnotifications.NotificationRule but it failed with same error.
  • Tried to set up a channel directly, not import it via ARN, but it failed too
  • Managed to create said notification manually in the web console

This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
skinny85commented, Oct 5, 2021

Glad you figured it out @kornicameister!

1reaction
skinny85commented, Oct 1, 2021

Hey @kornicameister,

thanks for opening the issue. Can you show me the resulting template that you get from synthesizing your code? You’ll find it in the cdk.out directory of your project.

Thanks, Adam

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS::CodeStarNotifications::NotificationRule
Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as AWS Chatbot...
Read more >
CDK Unable to Add CodeStarNotification to CodePipeline
It gives CREATE_FAILED error with message Resource handler returned message: "Invalid request provided: AWS::CodeStarNotifications:: ...
Read more >
Find Answers to AWS Questions about AWS CodeStar
For this, I have created AWS CodePipeline that will deploy this app to ECS ... HandlerErrorCode: InvalidRequest) ``` The topic and chatbot are...
Read more >
CodeStarNotifications — Boto3 Docs 1.26.34 documentation
The rule specifies the events you want notifications about and the targets (such as Chatbot topics or Chatbot clients configured for Slack) where...
Read more >
aws-deployment-framework/admin-guide.md at master
eu-west-1 config: main-notification-endpoint: - type: email target: ... Please note: You can not have AWS CodePipeline deployment pipelines deploy into ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found