Created
October 23, 2021 01:31
-
-
Save shimo164/37055310050fb1d3683ddaeb40e248c1 to your computer and use it in GitHub Desktop.
Lambda function for custom widget on CloudWatch Dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
def lambda_handler(event, context): | |
client = boto3.client("elasticbeanstalk") | |
response = client.describe_environment_health( | |
EnvironmentName="Myebapp-env", AttributeNames=["HealthStatus"] | |
) | |
output = ( | |
"""<font size="56 px" color="#444444">""" | |
+ response["HealthStatus"] | |
+ """</font>""" | |
) | |
return output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To public