base2services / aws-lambda-http-check Goto Github PK
View Code? Open in Web Editor NEWLambda function to check http endpoint wrapped in serverless project
License: MIT License
Lambda function to check http endpoint wrapped in serverless project
License: MIT License
the function apparently fails when the response is a binary object not plain text
From Cloudwatch logs:
Failed to connect to https://akorg205.tunedglobal.com/testassets/tuned.jpg
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Use-Case: Someone manually puts an endpoint into some sort of maintenance mode so instead of return a 200 it now returns a 302.
Right now this triggers a status code metric to change for 0 to 1. It would be nice to be able to specify a grace period for this temporary status code.
Another option would be to output a different metric value when the temporary status code is being returned.
This would then be able to not trigger alarms unless the temporary status code remains in-place for greater than grace period
In case of authorization headers needing to be sent to HTTP(s) endpoint - they should be stored in secret store, rather than passed unencrypted as payload to lambda function. Suggestion is that if any value in payload is in following forms
aws:smps("path")
aws:sm("store.key")
They should be replaced with actual secret value from AWS System Manager Parameter Store (first form), or AWS Secrets Manager (2nd form).
I'm getting the following error
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
...
Serverless: Stack create finished...
Serverless Error ---------------------------------------
Stack 'aws-python3-dev' does not exist
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 12.18.1
Framework Version: 2.10.0 (standalone)
Plugin Version: 4.1.1
SDK Version: 2.3.2
Components Version: 3.3.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.