Skip to content

Instantly share code, notes, and snippets.

@shimo164
Created October 23, 2021 01:31
Show Gist options
  • Save shimo164/37055310050fb1d3683ddaeb40e248c1 to your computer and use it in GitHub Desktop.
Save shimo164/37055310050fb1d3683ddaeb40e248c1 to your computer and use it in GitHub Desktop.
Lambda function for custom widget on CloudWatch Dashboard
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
@shimo164
Copy link
Author

To public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment