AWS code-library documentation change
Summary
Added code example for AWS Lambda triggered by EventBridge scheduled event with CloudWatch Logs output. Updated service reference from Cognito Identity Provider to Cognito Identity.
Security assessment
Change adds standard Lambda/EventBridge integration example without addressing vulnerabilities. Permission grant mentioned is part of normal service interaction setup.
Diff
diff --git a/code-library/latest/ug/python_3_cloudwatch-logs_code_examples.md index ffe827cb4..1356f7a42 100644 --- a/code-library/latest/ug/python_3_cloudwatch-logs_code_examples.md +++ b/code-library/latest/ug/python_3_cloudwatch-logs_code_examples.md @@ -602,0 +603,37 @@ This module processes CloudWatch queries exceeding 10,000 results. +The following code example shows how to create an AWS Lambda function invoked by an Amazon EventBridge scheduled event. + +**SDK for Python (Boto3)** + + +This example shows how to register an AWS Lambda function as the target of a scheduled Amazon EventBridge event. The Lambda handler writes a friendly message and the full event data to Amazon CloudWatch Logs for later retrieval. + + * Deploys a Lambda function. + + * Creates an EventBridge scheduled event and makes the Lambda function the target. + + * Grants permission to let EventBridge invoke the Lambda function. + + * Prints the latest data from CloudWatch Logs to show the result of the scheduled invocations. + + * Cleans up all resources created during the demo. + + + + +This example is best viewed on GitHub. For complete source code and instructions on how to set up and run, see the full example on [GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/lambda#readme). + +###### Services used in this example + + * CloudWatch Logs + + * DynamoDB + + * EventBridge + + * Lambda + + * Amazon SNS + + + + @@ -611 +648 @@ CloudWatch -Amazon Cognito Identity Provider +Amazon Cognito Identity