Use External Notifier in AWS with SNS - amazon-web-services

I am using AWS with Codedeploy and Codepipeline, with Git to push our PHP codes and I want to use Discord or any free service to Notify our Pipeline status

EventBridge service provide codepipeline notification. Trigger it to SNS for email notification or lambda function for custom action
Available EventBridge event for codepipeline:
https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html
Telegram notification python example (you can try other application API)
https://levelup.gitconnected.com/simple-telegram-bot-with-python-and-aws-lambda-5eab1066b466

Related

How to send SSM (Agent) status notification to SNS within AWS

My question is
Is there any other way to monitor the SSM status and send the event notification to SNS instead of configuring the SNS Topic from the executor by providing NotificationConfig ?
I encounter a scenario where within our staging environment, there is an SNS top with a subscription that can always receive the SSM(systems manager) status notification, and it will trigger a lambda function to send notifications to our Slack App. Was done by our previous colleague.
However, within our production environment, I can't set up such a topic that can always receive the SSM status notification.
Within the staging, the SSM agent is triggered through a python lambda function. It sends commands with the PowerShell script without configuring the NotificationConfig argument. I wonder how this event is sent to the SNS topic.
I follow AWS' documentation which assigns the SNS Topic to the executor of the command. I know this way. (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-rc-send.html)
Many Thanks.
You can capture any AWS event using EventBridge.

I want to trigger gitlab-ci pipeline, whenever there is an object put in AWS S3 bucket

I am looking for a way to trigger my gitlab ci pipeline whenever there is a object (with specific name) is added in S3 bucket.
I am new with AWS lambda, can someone please help
You can use s3 event notifications and deliver these events to other AWS services, including AWS Lambda or SQS queues.
Leveraging these event notifications, you could send the event directly to a lambda function that subscribes to putobject events and parses the event content structure to determine if an object of the specific name was created and use the create pipeline API to trigger pipelines on GitLab.
Architecture overview:

Send notification mail using Cloudformation template when Codebuild is failing

I am having an existing Cloudformation template to create a Codebuild, and I want to send a notification mail by updating the template when make a Codebuild fails. How to make a change in such a way ?
I'm completely new to Cloudformation, and it would be better if I get some inputs regarding the same. Thanks!
You can create a SNS topic in AWS for the notifications regarding the codebuild/codepipeline triggers. you can also manage what will trigger the SNS to send the email ( such as build fail/success, etc).
Please refer this AWS document for your reference:
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html
If I understood your question correctly. You want to update the cloud formation template if the build fails on codebuild.
You can get notified from codebuild by creating a notification rule on build failures.It will send messages to SNS. This message can be consumed with lambda to update the cloud formation template. There are many
ways as notification to SNS can be consumed.
More information here

Can I publish to SQS in scheduled Amazon CloudWatch Event?

The answer to this post states that Amazon Simple Notification Service (SNS) topic can be triggered by Amazon CloudWatch Events schedule without utilizing an AWS Lambda function:
Scheduled rest requests from aws
Is there an ability to automatically publish to SQS when a scheduled Amazon CloudWatch Event occurs without using lambda? Can I set this up by means of Cloud Formation template?
This functionality is supported.
See: https://aws.amazon.com/ru/about-aws/whats-new/2016/03/cloudwatch-events-now-supports-amazon-sqs-queue-targets/
The example of Cloud Formation template:
https://stackoverflow.com/a/52029876/4251336

Freshdesk integration with AWS lambda

Is that possible if the user create a ticket in freshdesk that needs to be trigger the AWS lambda function.
That shouldn't be that hard. I would like to recommend using the following architecture
FreshDesk Ticket Trigger
FreshDesk Ticket Trigger Handler Published Message to SNS Topic
AWS Lambda Configured to SNS Topic as Event Source
AWS Lambda Code Accepts the SNS topic message (as Input) and performs the necessary processing
The advantages of using SNS rather directly calling Lambda are
Reducing the exposure of AWS API to only SNS topic and completely sealing rest of the API (IAM Privileges)
Possibility of Fan-Out Architecture [Multiple Lambda Functions can listen to the same SNS topic - near zero configuration]
For anyone landing on this topic.
It's possible with Freshdesk Marketplace app. With onTicketCreate product event, any actions can be written to execute with a Serverless function. It's completely run in Freshworks platform cloud.
If required, it can call your AWS Lambda.