(codepipeline): Invalid request when setting notification with Chatbot as target
See original GitHub issueCannot 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:
- Created 2 years ago
- Comments:10 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad you figured it out @kornicameister!
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