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.

(pipelines): ManualApprovalStep should support SNS notifications

See original GitHub issue

Description

pipelines.ManualApprovalStep should be able to send an SNS notification to a user when their approval is requested.

Use Case

I’m migrating an old pipelines.CdkPipeline to pipelines.CodePipeline. The previous pipeline is using codepipeline_actions.ManualApprovalAction which supports the above functionality, but the parallel pipelines.ManualApprovalStep does not.

Proposed Solution

pipelines.ManualApprovalStep exposes an SNS notification topic property for providing this configuration.

Other information

As a workaround, one could implement a custom Step that exposes the codepipeline_actions.ManualApprovalAction for the pipelines.CodePipeline version.

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:13
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yvthepiefcommented, Oct 20, 2022

I’ve implemented it via Arbitrary CodePipeline Action/Step. Little blog on it can be found here: https://yvovanzee.nl/cdk-pipeline-manual-approval-step-with-sns-notification

code used is: ` @jsii.implements(pipelines.ICodePipelineActionFactory) class ManualApprovalWithSNSStep(pipelines.Step): “”" Create an Arbitrary CodePipeline step to enable SNS with manual approval https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.pipelines/README.html#arbitrary-codepipeline-actions “”"

def __init__(self, id_, topic: aws_sns.ITopic):
    super().__init__(id_)

    self.topic = topic

@jsii.member(jsii_name="produceAction")
def produce_action(
    self,
    stage: aws_codepipeline.IStage,
    options: pipelines.ProduceActionOptions,
) -> pipelines.CodePipelineActionFactoryResult:
    stage.add_action(
        aws_codepipeline_actions.ManualApprovalAction(
            action_name=options.action_name,
            additional_information="please approve",
            run_order=options.run_order,
            notification_topic=self.topic,
        )
    )

    return pipelines.CodePipelineActionFactoryResult(run_orders_consumed=1)

`

0reactions
DharmSonariyacommented, Nov 29, 2022

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

CDK Pipeline manual approval step with SNS notification
Between our UAT and Production accounts, a manual approval is implemented, so all code changes need to be approved before going in to...
Read more >
Add a manual approval action to a pipeline in CodePipeline
If you want to use Amazon SNS to send notifications when an approval action is ready for review, you must first complete the...
Read more >
Integration: AWS CodePipeline Approval - marbot
You need to set up an Amazon SNS topic for this integration! With AWS CodePipeline Approvals, you can add a manual approval step...
Read more >
Sending Slack alerts to approve CodePipeline deployments
Our deployment pipeline also happens to deploy the same artefacts ... The approval CodePipeline stage supports notifying an SNS topic (a way ...
Read more >
Tag Archives: Amazon SNS - Noise
When the pipeline is run successfully, you will receive another email with ... Amazon Simple Notification Service (Amazon SNS) now supports ...
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