ACloudGuru / serverless-plugin-aws-alerts

A Serverless Framework plugin that creates CloudWatch alarms for functions.
MIT License
531 stars 151 forks source link

Email notification endpoint still working? #113

Closed johnykes closed 3 years ago

johnykes commented 4 years ago

This is a (Bug Report/Question)

Description

I started using this and I'm not sure if the email notification endpoint is outdated or I'm just missing something in my configuration.

For bug reports:

custom: pythonRequirements: dockerizePip: false

region: ${file(./config/config-${self:provider.stage}.json):aws_region_name}

lambda_env: 
    aws_region_name: ${file(./config/config-${self:provider.stage}.json):environment_variables.aws_region_name}
    slack_channel_id: ${file(./config/config-${self:provider.stage}.json):environment_variables.slack_channel_id}
    slack_channel_name: ${file(./config/config-${self:provider.stage}.json):environment_variables.slack_channel_name}
    gcp_table_id: ${file(./config/config-${self:provider.stage}.json):environment_variables.gcp_table_id}
    gcp_dataset_id: ${file(./config/config-${self:provider.stage}.json):environment_variables.gcp_dataset_id}
    gcp_project_id: ${file(./config/config-${self:provider.stage}.json):environment_variables.gcp_project_id}
    ses_email_url: ${file(./config/config-${self:provider.stage}.json):environment_variables.ses_email_url}
    notifications_email_endpoint: ${file(./config/config-${self:provider.stage}.json):environment_variables.notifications_email_endpoint}

alerts:
    dashboards: true
    nameTemplate: $[functionName]-$[metricName]-Alarm
    topics:
        alarm: ${self:service}-${opt:stage, 'dev'}-alerts-alarm
        #ok: ${self:service}-${opt:stage, 'dev'}-alerts-ok
        #insufficientData: ${self:service}-${opt:stage, 'dev'}-alerts-insufficientData
        notifications:
            - protocol: email
              endpoint: ${self:custom.lambda_env.notifications_email_endpoint}
    alarms:
        - functionThrottles
        - functionErrors
        - functionInvocations
        - functionDuration

provider: name: aws runtime: python3.7 stage: ${opt:stage, 'dev'}

region: ${self:custom.region}

iamRoleStatements:
    - Effect: 'Allow'
      Action:
        - "sqs:SendMessage"
        - "ssm:GetParameter"
      Resource: '*'

functions: forward: handler: functions/forward/forward.lambda_handler environment: sqs_url: Ref: SlackOtrsQueue events:

resources: Resources: SlackOtrsQueue: Type: "AWS::SQS::Queue" Properties: QueueName: "slack-otrs-queue.fifo" FifoQueue: true ContentBasedDeduplication: true

plugins:

* What stacktrace or error message from your provider did you see?
Is this the stacktrace?

Serverless: Generated requirements from /wrk/requirements.txt in /wrk/.serverless/requirements.txt... Serverless: Installing requirements from /root/.cache/serverless-python-requirements/b9e3ef1c8852be858b29175d517828ebd482743e740dff9398ba19d5f04bbe7f_slspyc/requirements.txt ... Serverless: Using download cache directory /root/.cache/serverless-python-requirements/downloadCacheslspyc Serverless: Running ... Serverless: Packaging service... Serverless: Excluding development dependencies... Serverless: Injecting required Python packages to package... Serverless: Uploading CloudFormation file to S3... Serverless: Uploading artifacts... Serverless: Uploading service slack-otrs.zip file to S3 (13.89 MB)... Serverless: Validating template... Serverless: Updating Stack... Serverless: Checking Stack update progress... .......................... Serverless: Stack update finished... Service Information service: slack-otrs stage: dev region: eu-west-1 stack: slack-otrs-dev resources: 36 api keys: None endpoints: ANY - https://.execute-api.eu-west-1.amazonaws.com/dev/forward ANY - https://.execute-api.eu-west-1.amazonaws.com/dev/welcome_message functions: forward: slack-otrs-dev-forward send-ticket: slack-otrs-dev-send-ticket welcome-message: slack-otrs-dev-welcome-message layers: None Serverless: Removing old service artifacts from S3... Serverless: Run the "serverless" command to setup monitoring, troubleshooting and testing.



## Additional Data

* ***Serverless Framework Version***: 1.61.3
* ***Stack Trace***: Is this the output of "make deploy"? If so, there are no errors/warnings.
* ***Provider Error messages***: no error
adikari commented 3 years ago

Yes. It's still working. I have just tested it. It created an SNS subscription for me.