{"id":31026,"date":"2026-03-31T16:53:19","date_gmt":"2026-03-31T11:23:19","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=31026"},"modified":"2026-04-01T16:32:11","modified_gmt":"2026-04-01T11:02:11","slug":"step-by-step-amazon-nova-act-tutorial-part-2-automating-ec2-cpu-checks-using-bedrock-and-lambda","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2026\/03\/31\/step-by-step-amazon-nova-act-tutorial-part-2-automating-ec2-cpu-checks-using-bedrock-and-lambda\/","title":{"rendered":"Step-by-Step Amazon Nova Act Tutorial Part 2: Automating EC2 CPU Checks Using Bedrock And Lambda"},"content":{"rendered":"<h2>Objective of This SOP<\/h2>\n<p>By following this SOP, you will create a <strong>basic action-oriented AI workflow<\/strong> using <a href=\"https:\/\/opstree.com\/blog\/2026\/02\/24\/amazon-nova-act-explained\/\" target=\"_blank\" rel=\"noopener\"><strong>Amazon Nova Act<\/strong><\/a> that:<\/p>\n<ul>\n<li>Reads CPU usage<\/li>\n<li>Checks a condition (CPU &gt; 80%)<\/li>\n<li>Executes an action using AWS Lambda<\/li>\n<li>Returns a result<\/li>\n<\/ul>\n<p>This is the <strong>foundation<\/strong> of Nova Act\u2013style AI.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Before starting, ensure you have:<\/p>\n<ul>\n<li>An AWS account<\/li>\n<li>Access to AWS Console<\/li>\n<li>Region set to <strong>us-east-1<\/strong><\/li>\n<li>Create the <a href=\"https:\/\/opstree.com\/blog\/2021\/11\/30\/ec2-store-overview-difference-b-w-aws-ebs-and-instance-store\/\" target=\"_blank\" rel=\"noopener\">EC2 instance<\/a> and use this instance id for lambda<\/li>\n<li>Basic familiarity with AWS navigation<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2>STEP 1: Log in to AWS Console<\/h2>\n<ol>\n<li>Open browser<\/li>\n<li>Go to: <a href=\"https:\/\/console.aws.amazon.com\" target=\"_blank\" rel=\"noopener\">https:\/\/console.aws.amazon.com<\/a><\/li>\n<li>Log in with your AWS credentials<\/li>\n<li>Set region (top-right) to <strong>us-east-1<\/strong><\/li>\n<\/ol>\n<h2>STEP 2: Enable Amazon Bedrock (AI Intelligence)<\/h2>\n<p><strong>Purpose:<\/strong><\/p>\n<p>This provides the \u201cthinking capability\u201d for the AI.<\/p>\n<h3>Steps:<\/h3>\n<ol>\n<li>In AWS search bar, type <strong>Bedrock<\/strong><\/li>\n<li>Open <a href=\"https:\/\/opstree.com\/blog\/2024\/06\/10\/how-amazon-bedrock-helps-you-leverage-generative-ai\/\" target=\"_blank\" rel=\"noopener\"><strong>Amazon Bedrock<\/strong><\/a><\/li>\n<li>From left menu, click <strong>Model access<\/strong><\/li>\n<li>Auto Enable:<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31027 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1024x454.png\" alt=\"\" width=\"840\" height=\"372\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1024x454.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-300x133.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-768x341.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1536x681.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1200x532.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-9.png 1871w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>5. Go from left menu, click <strong>Model Catalog<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31028 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1024x460.png\" alt=\"\" width=\"840\" height=\"377\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1024x460.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-300x135.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-768x345.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1536x690.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1200x539.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-10.png 1910w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>6. Click on <strong>Nova 2 Lite<\/strong><\/p>\n<p>Click on the yellow button: <strong>Open in Playground<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31029 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11-1024x469.png\" alt=\"\" width=\"840\" height=\"385\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11-1024x469.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11-300x137.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11-768x352.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11-1536x704.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11-1200x550.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-11.png 1908w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>7. Type the message \u201chello\u201d to test whether Nova 2 Lite is working or not.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31030 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12-1024x462.png\" alt=\"\" width=\"840\" height=\"379\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12-1024x462.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12-300x135.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12-768x346.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12-1536x693.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12-1200x541.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-12.png 1914w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>It\u2019s Working.<\/p>\n<h2>STEP 3: Create IAM Role (Permissions for Actions)<\/h2>\n<p><strong>Purpose:<\/strong><\/p>\n<p>Nova Act and lambda requires permission to interact with <a href=\"https:\/\/opstree.com\/aws-consulting-services\/\" target=\"_blank\" rel=\"noopener\">AWS Services<\/a>.<\/p>\n<ol>\n<li>Search for <strong>IAM<\/strong><\/li>\n<li>Click <strong>Roles<\/strong> \u2192 <strong>Create role<\/strong><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31031 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13-1024x360.png\" alt=\"\" width=\"840\" height=\"295\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13-1024x360.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13-300x106.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13-768x270.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13-1536x540.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13-1200x422.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-13.png 1905w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>3. Select:<\/p>\n<ul>\n<li>Trusted entity: <strong>AWS service<\/strong><\/li>\n<li>Use case: <strong>Lambda<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31032 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14-1024x454.png\" alt=\"\" width=\"840\" height=\"372\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14-1024x454.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14-300x133.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14-768x340.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14-1536x681.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14-1200x532.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-14.png 1902w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>4. Click <strong>Next<\/strong><\/p>\n<h3>Add Permissions:<\/h3>\n<ul>\n<li><code>AWSLambdaBasicExecutionRole<\/code><\/li>\n<li><code>CloudWatchReadOnlyAccess<\/code><\/li>\n<li>cloudwatch+ec2<\/li>\n<\/ul>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Effect\": \"Allow\",\r\n      \"Action\": [\r\n        \"cloudwatch:GetMetricData\",\r\n        \"cloudwatch:GetMetricStatistics\",\r\n        \"cloudwatch:ListMetrics\",\r\n        \"ec2:DescribeInstances\",\r\n        \"ec2:RebootInstances\"\r\n      ],\r\n      \"Resource\": \"*\"\r\n    }\r\n  ]\r\n}\r\n<\/pre>\n<p>Role name:<\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">lambda-execution<\/pre>\n<p>Click <strong>Create role<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31033 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15-1024x456.png\" alt=\"\" width=\"840\" height=\"374\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15-1024x456.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15-300x133.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15-768x342.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15-1536x683.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15-1200x534.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-15.png 1881w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>AI now has permission to perform actions.<\/p>\n<h2><strong>STEP 4 \u2013 Open the Lambda Console<\/strong><\/h2>\n<ul>\n<li>In the AWS Console search bar, type <strong>Lambda<\/strong><\/li>\n<li>Click on <strong>Lambda<\/strong><\/li>\n<li>Click <strong>Create function<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31034 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16-1024x388.png\" alt=\"\" width=\"840\" height=\"318\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16-1024x388.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16-300x114.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16-768x291.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16-1536x583.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16-1200x455.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-16.png 1919w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h3>Function Create Settings<\/h3>\n<p>Select <strong>exactly<\/strong> the following options:<\/p>\n<p><strong>Function name:<\/strong> get_cpu_utilization<\/p>\n<p><strong>Runtime:<\/strong><\/p>\n<p>Python 3.12<\/p>\n<p><strong>Execution role:<\/strong><\/p>\n<p>Use an existing role<\/p>\n<p><strong>Role name: lambda-execution<\/strong><\/p>\n<p>Now click on <strong>Create function<\/strong>.<\/p>\n<p>Wait for a few seconds while the function is being created.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31035 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17-1024x465.png\" alt=\"\" width=\"840\" height=\"381\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17-1024x465.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17-300x136.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17-768x349.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17-1536x698.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17-1200x545.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-17.png 1874w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><strong>When Lambda Opens \u2013 Go to the Code Tab<\/strong><\/p>\n<p>As soon as the Lambda function opens, you will see the <strong>Code<\/strong> tab.<\/p>\n<p>There will be some default code already present.<\/p>\n<p>Delete the default code completely<\/p>\n<p><strong>Copy\u2013paste the full code below:<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">import json\r\nimport boto3\r\nfrom datetime import datetime, timedelta, timezone\r\n\r\ncw = boto3.client(\"cloudwatch\")\r\n\r\ndef _extract_from_bedrock_event(event):\r\n    \"\"\"\r\n    Bedrock Agent action-group (OpenAPI schema) sends:\r\n    event[\"requestBody\"][\"content\"][\"application\/json\"][\"properties\"]\r\n    \"\"\"\r\n    instance_id = None\r\n    minutes = 5\r\n\r\n    rb = (\r\n        event.get(\"requestBody\", {})\r\n        .get(\"content\", {})\r\n        .get(\"application\/json\", {})\r\n        .get(\"properties\", [])\r\n    )\r\n\r\n    for p in rb:\r\n        if p.get(\"name\") == \"instanceId\":\r\n            instance_id = p.get(\"value\")\r\n\r\n        if p.get(\"name\") == \"minutes\" and p.get(\"value\") is not None:\r\n            try:\r\n                minutes = int(p.get(\"value\"))\r\n            except:\r\n                pass\r\n\r\n    return instance_id, minutes\r\n\r\n\r\ndef lambda_handler(event, context):\r\n\r\n    # Handle BOTH: Bedrock Agent event + manual Lambda test event\r\n    if event.get(\"messageVersion\") == \"1.0\":\r\n        instance_id, minutes = _extract_from_bedrock_event(event)\r\n    else:\r\n        instance_id = event.get(\"instanceId\")\r\n        minutes = int(event.get(\"minutes\", 5))\r\n\r\n    # Compute CPU\r\n    cpu_avg = None\r\n    datapoints = 0\r\n\r\n    if instance_id:\r\n        end = datetime.now(timezone.utc)\r\n        start = end - timedelta(minutes=minutes)\r\n\r\n        resp = cw.get_metric_statistics(\r\n            Namespace=\"AWS\/EC2\",\r\n            MetricName=\"CPUUtilization\",\r\n            Dimensions=[{\"Name\": \"InstanceId\", \"Value\": instance_id}],\r\n            StartTime=start,\r\n            EndTime=end,\r\n            Period=60,\r\n            Statistics=[\"Average\"],\r\n        )\r\n\r\n        dps = sorted(resp.get(\"Datapoints\", []), key=lambda x: x[\"Timestamp\"])\r\n        datapoints = len(dps)\r\n        cpu_avg = round(dps[-1][\"Average\"], 2) if dps else None\r\n\r\n    result = {\r\n        \"instanceId\": instance_id or \"\",\r\n        \"windowMinutes\": minutes,\r\n        \"cpuAvgPercent\": cpu_avg,\r\n        \"datapoints\": datapoints,\r\n    }\r\n\r\n    # Bedrock Agent response format\r\n    if event.get(\"messageVersion\") == \"1.0\":\r\n        return {\r\n            \"messageVersion\": \"1.0\",\r\n            \"response\": {\r\n                \"actionGroup\": event.get(\"actionGroup\"),\r\n                \"apiPath\": event.get(\"apiPath\"),\r\n                \"httpMethod\": event.get(\"httpMethod\"),\r\n                \"httpStatusCode\": 200,\r\n                \"responseBody\": {\r\n                    \"application\/json\": {\r\n                        \"body\": json.dumps(result)\r\n                    }\r\n                },\r\n            },\r\n            \"sessionAttributes\": event.get(\"sessionAttributes\", {}),\r\n            \"promptSessionAttributes\": event.get(\"promptSessionAttributes\", {}),\r\n        }\r\n\r\n    # Manual test output\r\n    return result\r\n<\/pre>\n<h2>Do NOT Forget to Click the Deploy Button<\/h2>\n<p>After pasting the code:<\/p>\n<p>Click the <strong>Deploy<\/strong> button (top right)<\/p>\n<p>If you see <strong>\u201cSuccessfully deployed\u201d<\/strong> \u2192 Perfect<\/p>\n<h2>Lambda Test<\/h2>\n<p>Now we verify whether the Lambda function is working.<\/p>\n<ul>\n<li>Click the <strong>Test<\/strong> tab on the Lambda page<\/li>\n<li>Click <strong>Create new test event<\/strong><\/li>\n<\/ul>\n<p><strong>Event name:<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">cpu-test<\/pre>\n<p>Paste this <strong>exact JSON<\/strong> into the Event JSON:<\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">{\r\n  \"instanceId\": \"i-05b89d8172f7e0d20\",\r\n  \"minutes\": 5\r\n}<\/pre>\n<p>Click <strong>Save<\/strong><\/p>\n<p>Now click the <strong>Test<\/strong> button<\/p>\n<h2>Expected Output (If You See This \u2192 PASS )<\/h2>\n<p>Your output should look like this:<\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">Response:\r\n{\r\n  \"instanceId\": \"i-05b89d8172f7e0d20\",\r\n  \"windowMinutes\": 5,\r\n  \"cpuAvgPercent\": 0.11,\r\n  \"datapoints\": 1\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31036 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18-1024x455.png\" alt=\"\" width=\"840\" height=\"373\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18-1024x455.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18-300x133.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18-768x341.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18-1536x683.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18-1200x533.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-18.png 1883w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><strong>Congratulations! Your <a href=\"https:\/\/opstree.com\/blog\/2024\/07\/16\/lambda-function-setup-guide-for-security-group-event-notifications-in-slack\/\" target=\"_blank\" rel=\"noopener\">Lambda function<\/a> is working perfectly.<\/strong><\/p>\n<h2><strong>STEP 5\u2013<\/strong> Now go back to <strong>Bedrock<\/strong>.<\/h2>\n<ul>\n<li>Look at the <strong>left sidebar<\/strong><\/li>\n<li>Scroll down a bit<\/li>\n<li>You\u2019ll find a section called <strong>Build<\/strong><\/li>\n<\/ul>\n<p>Inside <strong>Build<\/strong>, click on <strong>Agents<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31037 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19-1024x470.png\" alt=\"\" width=\"840\" height=\"386\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19-1024x470.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19-300x138.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19-768x352.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19-1536x704.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19-1200x550.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-19.png 1908w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h3>Create Agent<\/h3>\n<p>The <strong>Agents<\/strong> page will open.<\/p>\n<p>On the <strong>top right<\/strong>, you will see the <strong>Create agent<\/strong> button.<\/p>\n<p>Click on <strong>Create agent<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31038 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20-1024x366.png\" alt=\"\" width=\"840\" height=\"300\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20-1024x366.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20-300x107.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20-768x275.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20-1536x550.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20-1200x429.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-20.png 1900w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h3>Enter Agent Details<\/h3>\n<p>A form will appear.<\/p>\n<p>Fill in <strong>exactly<\/strong> the following:<\/p>\n<p><strong>Agent name:<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">cpu-monitor-agent<\/pre>\n<p><strong>Description:<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">This agent checks CPU usage and takes action if it is high.<\/pre>\n<p>Click <strong>Create<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31039\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/Screenshot-2026-02-11-124027.png\" alt=\"\" width=\"840\" height=\"640\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/Screenshot-2026-02-11-124027.png 654w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/Screenshot-2026-02-11-124027-300x228.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><strong>The next page will open<\/strong><\/p>\n<p>You will now be on the <strong>Agent Builder<\/strong> page<\/p>\n<p><strong>Select the Foundation Model<\/strong><\/p>\n<p>Now you need to select a model (this will be the AI\u2019s brain).<\/p>\n<p>Remove the checkmark on the option that says \u2018optimized for Bedrock Agents\u2019, then search for the Nova 2 Lite model<\/p>\n<p>Choose <strong>Nova 2 lite text model<\/strong> from the list<\/p>\n<p>Do <strong>NOT<\/strong> select Nova Sonic (voice model)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31040\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-21.png\" alt=\"\" width=\"840\" height=\"724\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-21.png 765w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-21-300x258.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31041\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-22.png\" alt=\"\" width=\"840\" height=\"725\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-22.png 759w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-22-300x259.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Click <strong>Apply<\/strong><\/p>\n<h3>Paste Instructions<\/h3>\n<p>Here we define the agent\u2019s behavior.<\/p>\n<p>Paste <strong>exactly<\/strong> this into the Instructions box:<\/p>\n<pre><code>\u201cYou are a CPU monitoring assistant. Use the tool GetCpuUtilization to fetch CPU average for last 5 minutes. If CPU average &gt; 85%, recommend restart. Otherwise recommend monitoring. Always ask for instanceId if missing.\u201d\r\n<\/code><\/pre>\n<h3>Additional Setting \u2013 <strong>User Input<\/strong><\/h3>\n<p>In the <strong>Agent Builder<\/strong>, find the section:<\/p>\n<p><strong>User Input<\/strong><\/p>\n<p>Currently, it will be:<\/p>\n<p><strong>Disabled<\/strong><\/p>\n<h3>Enable User Input<\/h3>\n<p>Select:<\/p>\n<p><strong>Enabled<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31042 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23-1024x454.png\" alt=\"\" width=\"840\" height=\"372\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23-1024x454.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23-300x133.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23-768x340.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23-1536x681.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23-1200x532.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-23.png 1837w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Click <strong>Save<\/strong><\/p>\n<h2>STEP 6 \u2013 Add an Action Group<\/h2>\n<p>You will now see the <strong>Action Groups<\/strong> screen.<\/p>\n<p>Click <strong>Add action group<\/strong><\/p>\n<p>Fill in:<\/p>\n<p><strong>Action group name:<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">cpuMetrics<\/pre>\n<p><strong>Action type:<\/strong><\/p>\n<p>Select <strong>Define with API schemas<\/strong><\/p>\n<h3>Select the Lambda Function<\/h3>\n<p>Now choose your Lambda function.<\/p>\n<p>Select the Lambda you created earlier<\/p>\n<p>(example: <strong>get_cpu_utilization<\/strong>)<\/p>\n<p>If the Lambda already exists:<\/p>\n<p>Select it<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31043 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25-1024x454.png\" alt=\"\" width=\"840\" height=\"372\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25-1024x454.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25-300x133.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25-768x340.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25-1536x681.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25-1200x532.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-25.png 1893w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h3><strong>Action group schema<\/strong><\/h3>\n<p>click Define via in-line schema editor<\/p>\n<p><strong>OpenAPI schema<\/strong><\/p>\n<p><strong>Copy\u2013paste the full code below:<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">openapi: 3.0.1\r\ninfo:\r\n  title: cpuMetrics\r\n  version: 1.0.0\r\n\r\npaths:\r\n  \/getCpuUtilization:\r\n    post:\r\n      operationId: GetCpuUtilization\r\n      description: Get average CPU utilization for an EC2 instance over a time window.\r\n\r\n      requestBody:\r\n        required: true\r\n        content:\r\n          application\/json:\r\n            schema:\r\n              type: object\r\n              required:\r\n                - instanceId\r\n              properties:\r\n                instanceId:\r\n                  type: string\r\n                minutes:\r\n                  type: integer\r\n                  default: 5\r\n\r\n      responses:\r\n        \"200\":\r\n          description: OK\r\n          content:\r\n            application\/json:\r\n              schema:\r\n                type: object\r\n                properties:\r\n                  instanceId:\r\n                    type: string\r\n                  windowMinutes:\r\n                    type: integer\r\n                  cpuAvgPercent:\r\n                    type: number\r\n                    nullable: true\r\n                  datapoints:\r\n                    type: integer<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31044 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-26-1024x548.png\" alt=\"\" width=\"840\" height=\"450\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-26-1024x548.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-26-300x161.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-26-768x411.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-26-1200x642.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-26.png 1510w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31045 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27-1024x483.png\" alt=\"\" width=\"840\" height=\"396\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27-1024x483.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27-768x362.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27-1536x725.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27-1200x566.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-27.png 1886w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Click <strong>Save<\/strong> After saving:<\/p>\n<p>The <strong>Prepare<\/strong> button will become clickable<\/p>\n<p>Then click <strong>Prepare<\/strong><\/p>\n<h2>STEP 7 \u2013 Open the Lambda Console<\/h2>\n<p>In the AWS search bar:<\/p>\n<p><strong>Lambda<\/strong><\/p>\n<p>Click it.<\/p>\n<h3>Select Your Lambda Function<\/h3>\n<p>Choose:<\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">get_cpu_utilization<\/pre>\n<p>Open it.<\/p>\n<h3>Go to the Configuration Tab<\/h3>\n<p>On the Lambda screen, you will see these tabs:<\/p>\n<p>Code<\/p>\n<p>Test<\/p>\n<p>Monitor<\/p>\n<p><strong>Configuration<\/strong><\/p>\n<p>Click <strong>Configuration<\/strong>.<\/p>\n<h3>Open the Permissions Section<\/h3>\n<p>Scroll down<\/p>\n<p><strong>Permissions<\/strong><\/p>\n<p>Click it.<\/p>\n<h3>Resource-based Policy<\/h3>\n<p>You will see a button:<\/p>\n<p><strong>Add permissions<\/strong><\/p>\n<p>Click it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31047 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28-1024x465.png\" alt=\"\" width=\"840\" height=\"381\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28-1024x465.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28-300x136.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28-768x349.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28-1536x697.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28-1200x545.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-28.png 1903w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h3>Fill in EXACTLY<\/h3>\n<p><strong>Statement ID<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">AllowBedrockInvoke<\/pre>\n<p><strong>Principal<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">bedrock.amazonaws.com\r\n<\/pre>\n<p><strong>Action<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">lambda:InvokeFunction\r\n<\/pre>\n<p><strong>ARN<\/strong><\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">\"arn:aws:bedrock:us-east-1:613602870156:agent\/*\"<\/pre>\n<p>Click <strong>Save<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31048 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-30-1024x843.png\" alt=\"\" width=\"840\" height=\"692\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-30-1024x843.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-30-300x247.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-30-768x633.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-30.png 1066w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h2>STEP 8 \u2013 Then next go to Role<\/h2>\n<p>And in Bedrock, in the Agent Builder<\/p>\n<p><strong>Select the Agent resource role that is visible by going to the <a href=\"https:\/\/opstree.com\/blog\/2023\/10\/10\/exploring-the-power-of-iam-roles-anywhere\/\" target=\"_blank\" rel=\"noopener\">IAM roles<\/a> section : choose<\/strong><\/p>\n<h3>AmazonBedrockExecutionRoleForAgents_FF41143KBXU<\/h3>\n<h3>Add Permissions:<\/h3>\n<ul>\n<li><strong>AmazonBedrockAgentInferenceProfilesCrossRegionPolicy_L9ZHEFYE8FI<\/strong><\/li>\n<\/ul>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Sid\": \"AmazonBedrockAgentInferenceProfilesCrossRegionPolicyProd\",\r\n      \"Effect\": \"Allow\",\r\n      \"Action\": [\r\n        \"bedrock:InvokeModel\",\r\n        \"bedrock:InvokeModelWithResponseStream\",\r\n        \"bedrock:GetInferenceProfile\",\r\n        \"bedrock:GetFoundationModel\"\r\n      ],\r\n      \"Resource\": [\r\n        \"arn:aws:bedrock:us-east-1:613602870156:inference-profile\/global.amazon.nova-2-lite-v1:0\",\r\n        \"arn:aws:bedrock:*::foundation-model\/global.amazon.nova-2-lite-v1:0\"\r\n      ]\r\n    }\r\n  ]\r\n}<\/pre>\n<ul>\n<li>AllowLambdaInvoke<\/li>\n<\/ul>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Effect\": \"Allow\",\r\n      \"Action\": \"lambda:InvokeFunction\",\r\n      \"Resource\": \"arn:aws:lambda:us-east-1:613602870156:function:get_cpu_utilization\"\r\n    }\r\n  ]\r\n}<\/pre>\n<ul>\n<li>BedRock<\/li>\n<\/ul>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Sid\": \"AllowInvokeNova\",\r\n      \"Effect\": \"Allow\",\r\n      \"Action\": [\r\n        \"bedrock:InvokeModel\",\r\n        \"bedrock:InvokeModelWithResponseStream\"\r\n      ],\r\n      \"Resource\": \"*\"\r\n    }\r\n  ]\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31049 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31-1024x452.png\" alt=\"\" width=\"840\" height=\"371\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31-1024x452.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31-300x132.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31-768x339.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31-1536x678.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31-1200x530.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-31.png 1875w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h2>STEP 9 \u2013 Test the Agent<\/h2>\n<p>Open the agent<\/p>\n<p>Go to the <strong>Test<\/strong> tab In the input box, type:<\/p>\n<pre style=\"background: #0f172a; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; max-width: 100%;\">{\r\n  \"instanceId\": \"i-05b89d8172f7e0d20\",\r\n  \"minutes\": 60\r\n}<\/pre>\n<p>Click <strong>Run<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31050 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32-1024x440.png\" alt=\"\" width=\"840\" height=\"361\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32-1024x440.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32-300x129.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32-768x330.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32-1536x659.png 1536w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32-1200x515.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-32.png 1917w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h2>EXPECTED OUTPUT (If You See This \u2192 SUCCESS )<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31051\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-33.png\" alt=\"\" width=\"840\" height=\"1564\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-33.png 433w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/image-33-161x300.png 161w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><strong>Congratulations!<\/strong><\/p>\n<ul>\n<li>You are now:<\/li>\n<li>Taking decisions using AI<\/li>\n<li>Triggering Lambda using AI<\/li>\n<li>Successfully implementing a real Nova Act pattern<\/li>\n<\/ul>\n<h2>Related Searches<\/h2>\n<header class=\"entry-header\">\n<ul>\n<li><a href=\"https:\/\/opstree.com\/blog\/2026\/02\/17\/secure-website-hosting-aws-s3-cloudfront-oac\/\" target=\"_blank\" rel=\"noopener\">Secure, Serverless And Private: Hosting Static Sites with AWS S3 And CloudFront OAC<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/2026\/01\/13\/aws-migration-service-complete-guide\/\" target=\"_blank\" rel=\"noopener\">Complete Guide to Server Migration Using AWS Application Migration Service<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/2025\/11\/20\/aws-aiops-the-future-of-intelligent-and-autonomous-it-operations\/\">AWS AIOps: The Future of Intelligent and Autonomous IT Operations<\/a><\/li>\n<\/ul>\n<h2>Related Solutions<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/opstree.com\/aws-partner\/\" target=\"_blank\" rel=\"noopener\">AWS Advanced Consulting Partner<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/middleware-database-and-data-engineering\/\" target=\"_blank\" rel=\"noopener\">Data Engineering Solutions<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/generative-ai-solutions\/\" target=\"_blank\" rel=\"noopener\">Custom Generative AI Solutions<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/header>\n<p><!-- notionvc: 64d4e558-a197-41fe-b660-fa70b0688845 --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Objective of This SOP By following this SOP, you will create a basic action-oriented AI workflow using Amazon Nova Act that: Reads CPU usage Checks a condition (CPU &gt; 80%) Executes an action using AWS Lambda Returns a result This is the foundation of Nova Act\u2013style AI. Prerequisites Before starting, ensure you have: An AWS &hellip; <a href=\"https:\/\/opstree.com\/blog\/2026\/03\/31\/step-by-step-amazon-nova-act-tutorial-part-2-automating-ec2-cpu-checks-using-bedrock-and-lambda\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Step-by-Step Amazon Nova Act Tutorial Part 2: Automating EC2 CPU Checks Using Bedrock And Lambda&#8221;<\/span><\/a><\/p>\n","protected":false},"author":244582722,"featured_media":31054,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[36349927],"tags":[768739355,768739503,768739618,303515361,768739561,392947966,343865],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/03\/Untitled-design-14.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-84q","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/31026"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/244582722"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=31026"}],"version-history":[{"count":6,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/31026\/revisions"}],"predecessor-version":[{"id":31058,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/31026\/revisions\/31058"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/31054"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=31026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=31026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=31026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}