<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Neil Clark</title>
    <description>The latest articles on DEV Community by Neil Clark (@neilclark83).</description>
    <link>https://dev.to/neilclark83</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1433348%2F6b15c5ca-ccdf-4d07-818f-84db93d07dec.jpg</url>
      <title>DEV Community: Neil Clark</title>
      <link>https://dev.to/neilclark83</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/neilclark83"/>
    <language>en</language>
    <item>
      <title>Event-Driven Architecture - Image Analysis</title>
      <dc:creator>Neil Clark</dc:creator>
      <pubDate>Fri, 07 Feb 2025 14:53:54 +0000</pubDate>
      <link>https://dev.to/aws-builders/event-driven-architecture-image-analysis-2eib</link>
      <guid>https://dev.to/aws-builders/event-driven-architecture-image-analysis-2eib</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbl9d3q4blkvugyy7zce.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbl9d3q4blkvugyy7zce.jpeg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Welcome Back!!&lt;/p&gt;

&lt;p&gt;We are spoiled with the available services across AWS and most of them we can play with for free or for a limited cost if you are willing to invest some money.  I have been guilty of shying away from trying to cover more complex subjects because i struggle where there is any coding involved.&lt;/p&gt;

&lt;p&gt;However with Amazon Q Developer this has really helped me with this element where I struggle.  Now don't get me wrong Q Developer is not a silver bullet to all your problems and during the creation of this blog I came very close a few times to finding something else to write about because it wouldn't give me working solutions from the off.  &lt;/p&gt;

&lt;p&gt;A lesson I have learnt creating this blog is to break down what you are trying to achieve into its simplest forms to start with and then iterate as you go to get more advanced elements.  It is easier to iterate on top of a simple working example to get to where you want to be.&lt;/p&gt;

&lt;p&gt;This blog is going to explore a simple event driven architecture to analyse images uploaded to an S3 bucket using Amazon Rekogniton. Upon an image being uploaded to S3, EventBridge will trigger a Lambda function that calls the Rekognition API to analyse the Image and provide Labels that are at least 95% confidence rating, and then add these to the S3 Object as meta data.&lt;/p&gt;

&lt;p&gt;The final architecture will look like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuvfj9x6rpwcq5eb9mlma.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuvfj9x6rpwcq5eb9mlma.PNG" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now as I mentioned earlier, I was a bit naive when I started this blog,  I thought to myself this should be easy I just need an S3 Bucket,  an EventBridge Trigger and a Lambda Function (plus some IAM and Bucket polices).  So I configured an S3 Bucket,  an EventBridge trigger, then I asked Q Developer to write me a lambda function that took the input from an EventBridge Event (Bucket Name, Object Name), started Amazon Recognition and analysed the image and passed labels back to Lambda to apply to the S3 Object as meta data.  &lt;/p&gt;

&lt;p&gt;Wow watch Q Developer go.... spitting out Python code and instructions...  I was thinking i'll be done in no time at all... LOL!!!  yeah thats not how this went,  I implemented the lambda code and instructions from Q Developer and it failed,  I spent a lot of time troubleshooting and got to the point where the Lambda would run but nothing really happened it just ran and ended... Too much time later I scrapped it all and went and did something else to let my brain reset.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start from a working point!
&lt;/h2&gt;

&lt;p&gt;So after a break I decided to start again, but this time I looked for an AWS tutorial that was similar to what I was trying to achieve and I found this one&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/rekognition/latest/dg/lambda-s3-tutorial-python.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/rekognition/latest/dg/lambda-s3-tutorial-python.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tutorial takes you through setting up and S3 Bucket,  a Lambda function to call the Rekognition detect Labels function and a Client Python code to provide the S3 bucket and object name and invoke the Lambda function and receive back all the labels Rekognition detected. &lt;/p&gt;

&lt;p&gt;After the initial implementation,  it didnt run,  and the only reason was due to me not updating the name of the lambda function in my client code and I hadnt created an aws cli profile to allow the python code to run and login to my AWS account..  Once I corrected this BAM!!!  it worked..&lt;/p&gt;

&lt;p&gt;I used this picture of my Dog Cooper&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyx4k4we365baov0715ax.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyx4k4we365baov0715ax.jpg" alt="Image description" width="760" height="1687"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and the process returned this extract of labels&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Analyzing image in S3 bucket:
{'body': '{"Labels": [{"Name": "Soil", "Confidence": 99.9998779296875, '
         '"Instances": [], "Parents": [], "Aliases": [], "Categories": '        
         '[{"Name": "Nature and Outdoors"}]}, {"Name": "Animal", "Confidence": '
         '99.24742889404297, "Instances": [], "Parents": [], "Aliases": [], '   
         '"Categories": [{"Name": "Animals and Pets"}]}, {"Name": "Canine", '   
         '"Confidence": 99.24742889404297, "Instances": [], "Parents": '        
         '[{"Name": "Animal"}, {"Name": "Mammal"}], "Aliases": [], '
         '"Categories": [{"Name": "Animals and Pets"}]}, {"Name": "Dog", '      
         '"Confidence": 99.24742889404297, "Instances": [{"BoundingBox": '      
         '{"Width": 0.23906654119491577, "Height": 0.12388644367456436, '       
         '"Left": 0.45508497953414917, "Top": 0.3805483877658844}, '
         '"Confidence": 99.24742889404297}], "Parents": [{"Name": "Animal"}, '
         '{"Name": "Canine"}, {"Name": "Mammal"}, {"Name": "Pet"}], "Aliases": '
         '[], "Categories": [{"Name": "Animals and Pets"}]}, {"Name": '
         '"Mammal", "Confidence": 99.24742889404297, "Instances": [], '
         '"Parents": [{"Name": "Animal"}], "Aliases": [], "Categories": '
         '[{"Name": "Animals and Pets"}]}, {"Name": "Pet", "Confidence": '
         '99.24742889404297, "Instances": [], "Parents": [{"Name": "Animal"}], '
         '"Aliases": [], "Categories": [{"Name": "Animals and Pets"}]}, '
         '{"Name": "Puppy", "Confidence": 99.22718048095703, "Instances": [], '
         '"Parents": [{"Name": "Animal"}, {"Name": "Canine"}, {"Name": "Dog"}, '
         '{"Name": "Mammal"}, {"Name": "Pet"}], "Aliases": [], "Categories": '
         '[{"Name": "Animals and Pets"}]}, {"Name": "Nature", "Confidence": '
         '98.79219055175781, "Instances": [], "Parents": [{"Name": '
         '"Outdoors"}], "Aliases": [], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}, {"Name": "Outdoors", "Confidence": 98.79219055175781, '
         '"Instances": [], "Parents": [], "Aliases": [], "Categories": '
         '[{"Name": "Nature and Outdoors"}]}, {"Name": "Sky", "Confidence": '
         '98.79219055175781, "Instances": [], "Parents": [{"Name": "Nature"}, '
         '{"Name": "Outdoors"}], "Aliases": [], "Categories": [{"Name": '
         '"Nature and Outdoors"}]}, {"Name": "Rock", "Confidence": '
         '98.52386474609375, "Instances": [], "Parents": [], "Aliases": [], '
         '"Categories": [{"Name": "Nature and Outdoors"}]}, {"Name": "Field", '
         '"Confidence": 98.21697998046875, "Instances": [], "Parents": [], '
         '"Aliases": [], "Categories": [{"Name": "Nature and Outdoors"}]}, '
         '{"Name": "Grassland", "Confidence": 98.21697998046875, "Instances": '
         '[], "Parents": [{"Name": "Field"}, {"Name": "Nature"}, {"Name": '
         '"Outdoors"}], "Aliases": [], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}, {"Name": "Land", "Confidence": 98.10195922851562, '
         '"Instances": [], "Parents": [{"Name": "Nature"}, {"Name": '
         '"Outdoors"}], "Aliases": [], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}, {"Name": "Person", "Confidence": 97.86608123779297, '
         '"Instances": [{"BoundingBox": {"Width": 0.02859390340745449, '
         '"Height": 0.04032939299941063, "Left": 0.22646482288837433, "Top": '
         '0.15954364836215973}, "Confidence": 97.86608123779297}], "Parents": '
         '[], "Aliases": [{"Name": "Human"}], "Categories": [{"Name": "Person '
         'Description"}]}, {"Name": "Plant", "Confidence": 95.07865142822266, '
         '"Instances": [], "Parents": [], "Aliases": [], "Categories": '
         '[{"Name": "Plants and Flowers"}]}, {"Name": "Vegetation", '
         '"Confidence": 95.07865142822266, "Instances": [], "Parents": '
         '[{"Name": "Plant"}], "Aliases": [], "Categories": [{"Name": "Nature '
         'and Outdoors"}]}, {"Name": "Grass", "Confidence": 94.17696380615234, '
         '"Instances": [], "Parents": [{"Name": "Plant"}], "Aliases": [], '
         '"Categories": [{"Name": "Plants and Flowers"}]}, {"Name": "Hound", '
         '"Confidence": 92.6964111328125, "Instances": [], "Parents": '
         '[{"Name": "Animal"}, {"Name": "Canine"}, {"Name": "Dog"}, {"Name": '
         '"Mammal"}, {"Name": "Pet"}], "Aliases": [], "Categories": [{"Name": '
         '"Animals and Pets"}]}, {"Name": "Ball", "Confidence": '
         '83.73759460449219, "Instances": [], "Parents": [], "Aliases": [], '
         '"Categories": [{"Name": "Sports"}]}, {"Name": "Sport", "Confidence": '
         '83.73759460449219, "Instances": [], "Parents": [], "Aliases": '
         '[{"Name": "Sports"}], "Categories": [{"Name": "Sports"}]}, {"Name": '
         '"Tennis", "Confidence": 83.73759460449219, "Instances": [], '
         '"Parents": [{"Name": "Sport"}], "Aliases": [], "Categories": '
         '[{"Name": "Sports"}]}, {"Name": "Tennis Ball", "Confidence": '
         '83.73759460449219, "Instances": [], "Parents": [{"Name": "Ball"}, '
         '{"Name": "Sport"}, {"Name": "Tennis"}], "Aliases": [], "Categories": '
         '[{"Name": "Sports"}]}, {"Name": "Road", "Confidence": '
         '79.90119934082031, "Instances": [], "Parents": [], "Aliases": [], '
         '"Categories": [{"Name": "Transport and Logistics"}]}, {"Name": '
         '"Tree", "Confidence": 79.13050079345703, "Instances": [], "Parents": '
         '[{"Name": "Plant"}], "Aliases": [], "Categories": [{"Name": "Nature '
         'and Outdoors"}]}, {"Name": "Wilderness", "Confidence": '
         '61.0156364440918, "Instances": [], "Parents": [{"Name": "Nature"}, '
         '{"Name": "Outdoors"}], "Aliases": [], "Categories": [{"Name": '
         '"Nature and Outdoors"}]}, {"Name": "Landscape", "Confidence": '
         '57.71144104003906, "Instances": [], "Parents": [{"Name": "Nature"}, '
         '{"Name": "Outdoors"}], "Aliases": [], "Categories": [{"Name": '
         '"Nature and Outdoors"}]}, {"Name": "Ground", "Confidence": '
         '57.36166763305664, "Instances": [], "Parents": [], "Aliases": [], '
         '"Categories": [{"Name": "Nature and Outdoors"}]}, {"Name": "Ice", '
         '"Confidence": 56.176082611083984, "Instances": [], "Parents": [], '
         '"Aliases": [], "Categories": [{"Name": "Nature and Outdoors"}]}, '
         '{"Name": "Cloud", "Confidence": 55.94695281982422, "Instances": [], '
         '"Parents": [{"Name": "Nature"}, {"Name": "Outdoors"}, {"Name": '
         '"Sky"}], "Aliases": [], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}, {"Name": "Gravel", "Confidence": 55.84575653076172, '
         '"Instances": [], "Parents": [{"Name": "Road"}], "Aliases": [{"Name": '
         '"Dirt Road"}], "Categories": [{"Name": "Materials"}]}, {"Name": '
         '"Water", "Confidence": 55.7204475402832, "Instances": [], "Parents": '
         '[], "Aliases": [], "Categories": [{"Name": "Nature and Outdoors"}]}, '
         '{"Name": "Pebble", "Confidence": 55.63995361328125, "Instances": [], '
         '"Parents": [], "Aliases": [], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}, {"Name": "Face", "Confidence": 55.62419128417969, '
         '"Instances": [], "Parents": [{"Name": "Head"}, {"Name": "Person"}], '
         '"Aliases": [], "Categories": [{"Name": "Person Description"}]}, '
         '{"Name": "Head", "Confidence": 55.62419128417969, "Instances": [], '
         '"Parents": [{"Name": "Person"}], "Aliases": [], "Categories": '
         '[{"Name": "Person Description"}]}, {"Name": "Photography", '
         '"Confidence": 55.62419128417969, "Instances": [], "Parents": [], '
         '"Aliases": [{"Name": "Photo"}], "Categories": [{"Name": "Hobbies and '
         'Interests"}]}, {"Name": "Portrait", "Confidence": 55.62419128417969, '
         '"Instances": [], "Parents": [{"Name": "Face"}, {"Name": "Head"}, '
         '{"Name": "Person"}, {"Name": "Photography"}], "Aliases": [], '
         '"Categories": [{"Name": "Hobbies and Interests"}]}, {"Name": "Snow", '
         '"Confidence": 55.35792541503906, "Instances": [], "Parents": '
         '[{"Name": "Nature"}, {"Name": "Outdoors"}], "Aliases": [], '
         '"Categories": [{"Name": "Nature and Outdoors"}]}, {"Name": '
         '"Weather", "Confidence": 55.241214752197266, "Instances": [], '
         '"Parents": [{"Name": "Nature"}, {"Name": "Outdoors"}], "Aliases": '
         '[], "Categories": [{"Name": "Nature and Outdoors"}]}, {"Name": '
         '"Grove", "Confidence": 55.16259002685547, "Instances": [], '
         '"Parents": [{"Name": "Land"}, {"Name": "Nature"}, {"Name": '
         '"Outdoors"}, {"Name": "Plant"}, {"Name": "Tree"}, {"Name": '
         '"Vegetation"}, {"Name": "Woodland"}], "Aliases": [], "Categories": '
         '[{"Name": "Plants and Flowers"}]}, {"Name": "Woodland", '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Aliases": [{"Name": "Forest"}], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}], "LabelModelVersion": "3.0", "ResponseMetadata": '
         '{"RequestId": "0e2ee3f5-113d-489f-b922-f8568c023dc8", '
         '"HTTPStatusCode": 200, "HTTPHeaders": {"x-amzn-requestid": '
         '"0e2ee3f5-113d-489f-b922-f8568c023dc8", "content-type": '
         '"application/x-amz-json-1.1", "content-length": "7061", "date": '
         '"Thu, 06 Feb 2025 17:14:20 GMT"}, "RetryAttempts": 0}}',
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Aliases": [{"Name": "Forest"}], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}], "LabelModelVersion": "3.0", "ResponseMetadata": '
         '{"RequestId": "0e2ee3f5-113d-489f-b922-f8568c023dc8", '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Aliases": [{"Name": "Forest"}], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}], "LabelModelVersion": "3.0", "ResponseMetadata": '
         '{"RequestId": "0e2ee3f5-113d-489f-b922-f8568c023dc8", '
         '"HTTPStatusCode": 200, "HTTPHeaders": {"x-amzn-requestid": '
         '"0e2ee3f5-113d-489f-b922-f8568c023dc8", "content-type": '
         '"application/x-amz-json-1.1", "content-length": "7061", "date": '
         '"Thu, 06 Feb 2025 17:14:20 GMT"}, "RetryAttempts": 0}}',
 'statusCode': 200}
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Aliases": [{"Name": "Forest"}], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}], "LabelModelVersion": "3.0", "ResponseMetadata": '
         '{"RequestId": "0e2ee3f5-113d-489f-b922-f8568c023dc8", '
         '"HTTPStatusCode": 200, "HTTPHeaders": {"x-amzn-requestid": '
         '"0e2ee3f5-113d-489f-b922-f8568c023dc8", "content-type": '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Aliases": [{"Name": "Forest"}], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}], "LabelModelVersion": "3.0", "ResponseMetadata": '
         '{"RequestId": "0e2ee3f5-113d-489f-b922-f8568c023dc8", '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '"Confidence": 55.16259002685547, "Instances": [], "Parents": '
         '[{"Name": "Land"}, {"Name": "Nature"}, {"Name": "Outdoors"}, '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '{"Name": "Plant"}, {"Name": "Tree"}, {"Name": "Vegetation"}], '
         '"Aliases": [{"Name": "Forest"}], "Categories": [{"Name": "Nature and '
         'Outdoors"}]}], "LabelModelVersion": "3.0", "ResponseMetadata": '
         '{"RequestId": "0e2ee3f5-113d-489f-b922-f8568c023dc8", '
         '"HTTPStatusCode": 200, "HTTPHeaders": {"x-amzn-requestid": '
         '"0e2ee3f5-113d-489f-b922-f8568c023dc8", "content-type": '
         '"application/x-amz-json-1.1", "content-length": "7061", "date": '
         '"Thu, 06 Feb 2025 17:14:20 GMT"}, "RetryAttempts": 0}}',
 'statusCode': 200}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great we have now got something working!!&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Iterate...
&lt;/h2&gt;

&lt;p&gt;So with the Lambda function working,  I copied it back into VScode and asked Q Developer if it could modify the function so that it could take the Bucket and Object name from an EventBridge Event... so off it went and spit out modified function code.&lt;/p&gt;

&lt;p&gt;So next I added the EventBridge Rule to track when object creation occurred in my S3 bucket and to trigger the Lambda function.  &lt;/p&gt;

&lt;p&gt;So with this in place I uploaded a new image to my S3 bucket this time i used a different image,  this was of a lovely Mercedes AMG from when I recently attend a training event at Mercedes Benz World.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs135b014lz5mlx9kihee.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs135b014lz5mlx9kihee.jpg" alt="Image description" width="800" height="1776"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EventBridge triggered Lambda but it threw some errors... Oh no here we go again..  &lt;/p&gt;

&lt;p&gt;I copied the errors from CloudWatch and told Q Developer that these errors were occurring with the Lambda code,  it immediately came back with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The error occurs because the event structure you're receiving contains nested dictionaries for the bucket and object information, but Rekognition expects simple strings.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It proceeded to spit out a new modified version of the Lambda function to fix these errors,  so I dropped the new code into the Lambda function and deployed it,  deleted the image object I had previously uploaded and uploaded it again.&lt;/p&gt;

&lt;p&gt;IT WORKED!!!  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtd576l3t0vbhwb64op0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtd576l3t0vbhwb64op0.PNG" alt="Image description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see from the above image,  Rekognition Labels have been returned...  Woooo we are part way there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Iterate again...
&lt;/h2&gt;

&lt;p&gt;So as you saw earlier Rekognition returns a lot of labels with varying degrees of confidence.  With the ultimate end goal to add these labels to the S3 Object as metadata we probably don't want all of the labels, so I asked Q developer again,  could the Lambda function be modified to only return labels that had a confidence rating above 95,  so off it goes and within 30 secs it has created modified function code.  &lt;/p&gt;

&lt;p&gt;So I then updated the Lambda function and deployed it,  and ran through the process of removing the image object and uploading again,  this time it ran perfectly with no issues (Q Developer is getting better as we go) and as you can see from the below it is returning labels as requested.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkyzlfozawj6zj6xxgp14.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkyzlfozawj6zj6xxgp14.PNG" alt="Image description" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we are cooking...&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Iterate one more time...
&lt;/h2&gt;

&lt;p&gt;So now we have this sorted we are going to change the code one more time,  so back to Q Developer,  so this time,  I asked Q Developer to modify the Lambda function to take the returned labels from Rekognition and update the S3 Objects metadata with the labels that have been found.  So like a good assistant Q Developer spits out updated function code with the new requirements in.  So I update the Lambda function once more and also modify the Lambda execution role to allow Put functions,  once this is complete I then went through the process of removing the image object and uploading again and again everything ran perfectly with no issues and the object metadata was updated as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ph32n7l2s4rzkt99hpp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ph32n7l2s4rzkt99hpp.PNG" alt="Image description" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So there you have it
&lt;/h2&gt;

&lt;p&gt;So we got there in the end with the heavy lifting being done by Q Developer,  but I hope this shows you two things,  1) You don't have to be great at everything to be able to have a go at using some of the other more advanced services especially with Q Developer getting better and better overtime (when I first used Q Developer is wasn't great..) and 2) Breaking down solutions in to manageable bites and getting things working and linking them together as you go is a great way to solve issues and break down the barriers that might stop you from giving it a go.&lt;/p&gt;

&lt;p&gt;I hope this inspires you to go and have a play with AWS and services you may not touch normally.&lt;/p&gt;

&lt;p&gt;I have dropped the working Lambda Python codes into a &lt;a href="https://github.com/NeilClark007/image_analysis" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; for you to grab and try if you wish,  please just keep in mind you may need to update names in the code if you have called functions different names etc,  but use them, try them,  use Q Developer to help you if they dont work...&lt;/p&gt;

&lt;p&gt;Until next time enjoy playing with AWS!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Neil works for Telefonica Tech UK helping guide their customers who are considering or using AWS for their production work loads, He also works across Telefonica Tech UK's business units helping develop offerings and solutions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>eventdriven</category>
      <category>lambda</category>
      <category>awsrekognition</category>
    </item>
    <item>
      <title>What does securing your AWS Environment look like in 2025?</title>
      <dc:creator>Neil Clark</dc:creator>
      <pubDate>Fri, 17 Jan 2025 21:50:59 +0000</pubDate>
      <link>https://dev.to/aws-builders/what-does-securing-your-aws-environment-look-like-in-2025-517e</link>
      <guid>https://dev.to/aws-builders/what-does-securing-your-aws-environment-look-like-in-2025-517e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvd2e3xjn0ng0yr5l9h3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvd2e3xjn0ng0yr5l9h3.png" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you look across todays digital landscape it is more critical than ever to ensure that our Cloud environments are secured against bad actors both externally and internally&lt;/p&gt;

&lt;p&gt;Wait you say... Internal bad actors, surely this is not a thing? &lt;/p&gt;

&lt;p&gt;Well most companies in the present day spend time and money vetting their staff (especially in the UK, I’m not sure on the rest of the world), via supplied references, BPSS checks,  potentially even as far as UK Government Security vetting if the systems they are working on require it.  This is about as much due diligence you can do, however we have all made questionable decisions in our lives and unfortunately, when a person is under duress, disgruntled etc there is no telling what they may do, so we need to ensure that we protect internally as much as we can.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Basics
&lt;/h2&gt;

&lt;p&gt;1 - &lt;em&gt;Develop a comprehensive security plan&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before diving into specific practices it is essential to have a well-defined security plan.  Your plan should outline things like your security goals, identified potential risks and establish protocols for incident response.  Once you have this in place you can dive into specific security policies and configurations standards for AWS Infrastructure, AWS Services and your applications.&lt;/p&gt;

&lt;p&gt;2 - &lt;em&gt;Identity &amp;amp; Access Management&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Identity &amp;amp; Access Management (IAM) is the backbone of AWS Security so implementing strong IAM policies and configurations will mean you are 90% there.&lt;/p&gt;

&lt;p&gt;So when we talk about IAM what areas do we want to look at?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Secure your Root accounts - Enable MFA, remove programmatic access, use strong passwords and be ultra strict with who has access and what access they have.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Principle of least privilege - This should be front and center of every permissions policy,  that we only grant users or apps/services the permissions they need to perform their tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MFA..MFA...MFA - Ensure through policies that all users need to have MFA enabled to be able to do anything in the account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM Roles and Policies - IAM Roles should be used for applications and services so no hard coded credentials are used,  combined with this, IAM policies with permissions defined using the principle of least privilege.  We can also use permissions boundary policies to set the limits of what levels of privilege cane be added to IAM roles (especially useful for developer accounts).  Reviewing Roles and Policies regularly is recommended to ensure Roles are still needed and policies are still protecting as needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regular Audits - This is often over looked,  I know I have mentioned it previously but it is hugely important that you regularly review configured users and IAM roles and assigned IAM policies to ensure that they are still in use and that policies grant the needed permissions only.  IAM policies need to be regularly reviewed to ensure that they are assigned to users or roles and if they aren’t carry out some housekeeping and remove them.  Maybe this is something you can automate using the AWS CLI and Python or maybe Lambda,  maybe someone has already done this... if you have comment a link to help others out.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3 - &lt;em&gt;Data Encryption at Rest and In Transit&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Data at Rest - There are very few AWS Storage services that are not encrypted by default these days,  up until very recently... I think (my memory is not as good as it used to be) S3 and EBS were the only services that weren't encrypted by default,  however AWS updated S3 in 2023 to ensure all newly created buckets were encrypted by default, which leaves EBS as the only service that is not encrypted by default and requires the user to enable it.  So AWS have got you covered there, for all your Data at Rest,  you just need to remember to turn it on...  and you can always use AWS Systems Manager and AWS Config to check services they need manual enablement of encryption and alert you and take action if needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Encryption in Transit - Making sure all your communications between Applications and AWS Services seems like common sense,  however it can be tempting especially when your AWS elements are all in the same VPC and subnets to neglect encryption in transit,  however within AWS although things may appear they are all together it is very unlikely and your traffic will be using an internal network to talk,  so making sure traffic is encrypted is essentially. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Key Management Service - Utilising AWS Key Management Service (KMS) can be key to a successful implementation of encrypting data at rest,  it allows for you to create and manage keys via AWS,  you can bring your own cryptographic material,  or if you need something really special you can even setup a Cloud HSM if you have specific requirements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4 - &lt;em&gt;Monitoring and responding to threats&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Visibility is key - If you are blind to events that are going on in your environment then you cannot act.  At the very least you need to have AWS Cloud Trail enabled and CloudWatch setup,  CloudTrail ensures you have visibility of actions going on within your AWS Accounts when AWS API's are being called.  CloudWatch gives the ability to see what is going on with your workloads and can ingest application logs if the CloudWatch Logs Agent is deployed.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detection of Threats - So we have observability but there is a huge amount of information go through, in fact I would wage that it is more information than a human could process effectively.  So what do you do,  well this is where we would use Guard Duty and AWS Security Hub.  With Guard Duty we can utilise powerful machine learning for intelligent threat detection for your AWS environment.  Guard Duty can be combined with AWS Security Hub to provide a centralised portal for security alerts and automated compliance checks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5 - &lt;em&gt;Let's Automate&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Configuration Tracking - so once you have got you environment configured  as it should be to best practices etc,  how do you know if something changes?  Well we have CloudTrail but this only tells you what commands have been executed..  This is where AWS Config comes in,  AWS Config tracks your configurations and has several functions that you can utilise,  the first is configuration tracking and alerting, so if a configuration changes you can get alerted to the changes so you can act,  however the second function you can pair it with is AWS Systems Manager (SSM) Automation, so that when a particular configuration is modified SSM can be triggered and take action to correct configurations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lambda is not just for serverless apps - Lambda is very versatile and can be used in an event driven way to automate responses to security threats.  A great use case for Lambda is isolating compromised instances or revoking access keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSM can do the hard work - keeping workloads up to date with the latest security patches can be tiresome however SSM Patch manager can lighten the load and ensure that your workloads are protected from the latest vulnerabilities, and with automation these can be scheduled at a time that is best for your business.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By implementing the above you can significantly enhance the security of your AWS environment.  Remember security is an ongoing process the requires continuous monitoring and improvement.  &lt;/p&gt;

&lt;p&gt;If you have any other gems you think others would benefit from drop them in the comments.   &lt;/p&gt;

&lt;p&gt;In my next blog we'll have a look at some environment enhancements that go beyond the basics to provide further security enhancements.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Neil works for Telefonica Tech UK helping guide their customers who are considering or using AWS for their production work loads, He also works across Telefonica Tech UK's business units helping develop offerings and solutions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Building Scalable Applications in AWS</title>
      <dc:creator>Neil Clark</dc:creator>
      <pubDate>Tue, 17 Dec 2024 19:54:37 +0000</pubDate>
      <link>https://dev.to/aws-builders/building-scalable-applications-in-aws-52a1</link>
      <guid>https://dev.to/aws-builders/building-scalable-applications-in-aws-52a1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadkci5fggru0lkl4ze95.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadkci5fggru0lkl4ze95.PNG" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview of Scalability in AWS
&lt;/h2&gt;

&lt;p&gt;In simple terms scalability refers to a system’s ability to handle increased loads by adding resources, this is crucial as is ensures that applications can maintain performance levels despite growing user demand.  So what does this mean in terms of AWS services?&lt;/p&gt;

&lt;p&gt;Scalability is broken into two variants:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vertical Scaling&lt;/li&gt;
&lt;li&gt;Horizontal Scaling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Vertical Scaling&lt;/em&gt;&lt;/strong&gt; - This is where we are adding more horsepower to an existing instance,  More CPU, More RAM,  this is achieved by changing the instance size or type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Horizontal Scaling&lt;/em&gt;&lt;/strong&gt; - This is where we are adding more of the same type of machine for world domination.. I mean increased capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Core Services for Scalability
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Amazon EC2&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Probably AWS's most used service EC2 provides on-demand compute capacity for servers deployed in the cloud.  EC2 instances come in a huge array of types and sizes to fill just about any need,  from burstable T3 instances to the recently announced u7inh Family with 1920 vCPUs and 32TB of RAM truly huge computing capacity in current times.&lt;/p&gt;

&lt;p&gt;So the instance families and the varying degrees of sizes within those families covers the vertical scaling element,  and we can horizontally scale those by adding additional instances... &lt;/p&gt;

&lt;p&gt;Well hold on are you saying add them manually??&lt;/p&gt;

&lt;p&gt;Yes I am...&lt;/p&gt;

&lt;p&gt;Ok... well is there a way to do this automatically &lt;/p&gt;

&lt;p&gt;Well of course there is...  this is called EC2 Auto Scaling&lt;/p&gt;

&lt;p&gt;Auto Scaling allows you to create auto scaling groups and as part of these groups you set parameters that control your minimum and maximum number of instances with a desired number for normal operations.  From this you can then set scaling events to determine when your scaling group grows or shrinks.  For example I have a group that has a minimum number of instances set for 2 and a maximum of 8,  my desired number is 3.  My scaling event is set to monitor EC2 instance CPU utilisation and when it  breaches 60% a new instance is added, and when the utilisation resolves itself instances numbers gradually reduce back to the desired number.&lt;/p&gt;

&lt;p&gt;Scaling Types are broken down into the following&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic scaling: Adapts capacity to actual loads to optimize resource utilization&lt;/li&gt;
&lt;li&gt;Predictive scaling: Uses workload forecasting to plan future capacity&lt;/li&gt;
&lt;li&gt;Scheduled scaling: Allows you to scale based on a schedule&lt;/li&gt;
&lt;li&gt;Fixed number of instances: Allows you to maintain a fixed number of instances&lt;/li&gt;
&lt;li&gt;Proactive scaling: Allows you to scale proactively&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Elastic Load balancing&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now here is a service that goes hand in hand with EC2 and auto scaling now while it is great to have the ability to automatically scale the number of instances needed to meet demand generally you would have to manually add them into you application or run scripts to get the most from them.  Elastic load balancers and auto scaling groups overcomes this issue.  When combining ELB's and auto scaling the ELB acts as the front end to your servers and when autoscaling is used this allows for new servers that are started to be registered with the ELB and they automatically become part of your application landscape until they are no longer required and scaling back starts where they are removed from the ELB and shutdown.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Amazon RDS&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon RDS this is Amazon's Managed Database Service supporting a wide variety of popular database engines.  Scaling RDS is really quite simple,  in a traditional setup your database node would handle both write and read  operations from your applications,  in an application where you have heavy read and write operations,  relying on a single node is not always the best option however it might be the only option due to the application.  In this instance RDS allows you to scale your RDS instance vertically both for the instance size and storage options, this means that there would be disruption during the scaling event which is not ideal and would mean planning this in during the least impactful time which for some apps could be never...  &lt;/p&gt;

&lt;p&gt;The other option that RDS offers is read replicas, this allows you to scale out the read operations for the database to multiple read replicas to remove the load from the primary database and freeing up capacity and adding durability to your application.  For situations where you need to keep scaling up as an option RDS should be deployed in a Multiple AZ setup,  when RDS is setup this way,  when you need to scale your primary nodes up,  the standby node is scaled up first with a failover then taking place from the primary and then the primary being scaled up also,  this would provide minimum downtime for your database.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Serverless Services
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;AWS Lambda&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS Lambda is a serverless compute service from AWS,  it allows you to run  code without provisioning any compute resources,  it is triggered by various supported AWS services and scales automatically based on the number of incoming requests from services.  A service that scales by default with no intervention required by the infrastructure team (unless you hit the concurrency limits)&lt;/p&gt;

&lt;p&gt;There are some best practices to help with scaling though..&lt;/p&gt;

&lt;p&gt;These are :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Optimize Function Code: Ensure your function code is efficient and minimizes execution time. This helps reduce the overall load and cost.&lt;/li&gt;
&lt;li&gt;Use Asynchronous Invocations: For non-blocking tasks, use asynchronous invocations to allow Lambda to handle more requests concurrently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Amazon API Gateway&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;API Gateway enables you to create, publish, maintain and monitor API's at any scale, this again is another Serverless managed service that requires no management of infrastructure.  &lt;/p&gt;

&lt;p&gt;As with AWS Lambda, API Gateway scales automatically with demand and again there are some recommendations to help it scale effectively..&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API Gateway Caching: Enable caching to store responses and reduce the load on your backend services. This can significantly improve performance and reduce latency for frequently accessed data&lt;/li&gt;
&lt;li&gt;Request Throttling: Set up throttling to limit the number of requests per second for each API key. This helps protect your backend services from being overwhelmed by too many requests1.&lt;/li&gt;
&lt;li&gt;Usage Plans: Create usage plans to enforce throttling and quota limits on individual API keys, ensuring fair usage and preventing abuse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;AWS Fargate&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS Fargate is a serverless compute engine for containers that works with Amazon ECS and EKS. It allows you to run containers without managing the underlying infrastructure. This means you can focus on building and running applications without worrying about the servers.&lt;/p&gt;

&lt;p&gt;Fargate scales automatically based on the resource requirements of your containers. When you define your task, you specify the CPU and memory requirements, and Fargate takes care of provisioning the right amount of resources. This ensures that your applications can handle varying loads without manual intervention.&lt;/p&gt;

&lt;p&gt;Fargate can auto scale using the below policies &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto Scaling Policies: Use Amazon ECS Service Auto Scaling to automatically adjust the number of running tasks based on demand.&lt;/li&gt;
&lt;li&gt;Target Tracking Policies: Adjust the task count to maintain a specified metric (e.g., CPU utilization).&lt;/li&gt;
&lt;li&gt;Step Scaling Policies: Add or remove tasks based on specific thresholds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Amazon DynamoDB&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. It is designed to handle high-traffic applications and can scale horizontally to accommodate growing workloads.&lt;/p&gt;

&lt;p&gt;DynamoDB automatically adjusts throughput capacity based on traffic patterns, ensuring that your application can handle sudden spikes in demand. It also offers features like Global Tables for multi-region replication and on-demand capacity mode for flexible scaling.&lt;/p&gt;

&lt;p&gt;DynamoDB can scale using the below policies&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto Scaling Policies: Use DynamoDB auto scaling to automatically adjust the provisioned throughput capacity based on actual traffic patterns. This ensures that your tables and global secondary indexes can handle sudden increases in traffic without throttling.&lt;/li&gt;
&lt;li&gt;Target Utilization: Set a target utilization percentage for your table's read and write capacity. Auto scaling will adjust the provisioned throughput to maintain this target, ensuring efficient use of resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Amazon S3&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon Simple Storage Service (S3) provides scalable object storage for a wide range of use cases. S3 is designed to store and retrieve any amount of data from anywhere on the web, making it ideal for backup, archiving, big data analytics, and more.&lt;/p&gt;

&lt;p&gt;S3 is a great service that can scale infinitely... ok well not infinitely it depends on AWS storage hardware having the capacity but let’s just say i don’t think AWS will be running out when people need it.&lt;/p&gt;

&lt;p&gt;This is just a whistle stop look at some AWS services and how they scale to allow your applications to scale for your users,  there are many more AWS services you can use to integrate with your applications and the theme is the same there too.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Neil works for Telefonica Tech UK helping guide their customers who are considering or using AWS for their production work loads, He also works across Telefonica Tech UK's business units helping develop offerings and solutions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>simplecloud</category>
    </item>
    <item>
      <title>AWS Cloud Network - How does an environment evolve over time</title>
      <dc:creator>Neil Clark</dc:creator>
      <pubDate>Tue, 12 Nov 2024 18:12:29 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-cloud-network-how-does-an-environment-evolve-overtime-32ik</link>
      <guid>https://dev.to/aws-builders/aws-cloud-network-how-does-an-environment-evolve-overtime-32ik</guid>
      <description>&lt;h2&gt;
  
  
  Expectations vs Reality
&lt;/h2&gt;

&lt;p&gt;Picture the scene: you're a budding Cloud Architect. You've completed a few AWS certifications and recently passed your Advanced Networking Specialty. At this point, you know AWS Cloud Networking and the best practices that come with it. You're then assigned to assist a customer with their AWS environment. In the excitement leading up to starting work, you envision large-scale Transit Gateway networks, funky BGP routing, multiple Direct Connect connections with site-to-site VPNs as a backup.&lt;/p&gt;

&lt;p&gt;The reality, when you get onboard, couldn't be further from the truth. In fact, it is often a "WTF" moment. This is not uncommon, and a customer's AWS Cloud Networking design/deployment will more often than not be dictated by how far along they are in their journey with AWS. It's sometimes easy to forget that Cloud deployments are not like traditional on-prem deployments. There likely wasn't a huge program of work to design and deploy an enterprise-scale environment in the Cloud. There are exceptions, of course, but it might surprise you that a lot of companies' foray into AWS was setting up a single account and using a company credit card to pay the bill.&lt;/p&gt;

&lt;p&gt;In this blog, I want to explore how a customer's hybrid networking environment may have evolved over time as they became more mature in their deployment in AWS. This is by no means what always happens but how things could evolve, at least in my head.&lt;/p&gt;

&lt;h2&gt;
  
  
  Yay lets use AWS..
&lt;/h2&gt;

&lt;p&gt;So let's take the first step and look at what an environment might look like when we are starting out. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6krfsbfg00sk1hgadc8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6krfsbfg00sk1hgadc8.PNG" alt="Basic first VPC" width="800" height="755"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above is about as simple as things get in terms of hosting an app in AWS: a single account, a single VPC with an Internet Gateway, some subnets to host instances, and a VPN Gateway to give connectivity back to on-prem to allow the app to talk back to other systems. As it stands, to host a single app, this architecture and hybrid connectivity would suffice despite what some might try to tell you.&lt;/p&gt;

&lt;p&gt;Okay, so this is our base. Now let's evolve the solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  WooHoo we love AWS lets expand..
&lt;/h2&gt;

&lt;p&gt;After successfully using AWS for a period, our fictitious organization has decided they want to expand their AWS environment. They want a few more Prod VPCs and have also decided to aid with putting apps in the Cloud by adding staging and testing VPCs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpt73i194gh0ztw5maijh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpt73i194gh0ztw5maijh.PNG" alt="Sucessful Expansion" width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have added the additional Prod VPCs and a Staging and Testing VPC. On the face of it, this is not too bad—still manageable but not the most elegant of solutions. It would still work, but as a former Network Architect, I would be raising alarms right about now about the future manageability of this environment.&lt;/p&gt;

&lt;p&gt;Okay, so let's push the network admins to breaking point. These apps are now deemed critical and need resilient connectivity and resiliency across regions...&lt;/p&gt;

&lt;h2&gt;
  
  
  Weerrrrpp Weeeerrrppp WARNING WARNING!!!
&lt;/h2&gt;

&lt;p&gt;The AWS deployment has been deemed so successful that the apps that run it are now critical to the organization. We need to evolve this to provide resilient hybrid connectivity and region resiliency... God help us!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp7adr8okse090jlxy74.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp7adr8okse090jlxy74.PNG" alt="Oh My God.." width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here it is in all its glory... Honestly, it looks like Peter Parker designed this. I think we can all agree this is now beyond manageable as a network service. So how do we solve this? Well, in this instance, we would now need to look at transit architectures. In all honesty, once you get to AWS holding critical apps, it's time to move to Direct Connect also. So let's morph this into a manageable network service again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ah... Thats better
&lt;/h2&gt;

&lt;p&gt;Wow, what a masterpiece! We have introduced Direct Connect to give us a reliable, stable connection with bandwidth speeds based on requirements. This is linked into a Direct Connect Gateway, which makes the Direct Connect connections available across regions. We have then deployed a Network VPC with a Transit Gateway for each region, as they are only regional resources. Finally, each VPC has a Transit Gateway Attachment to allow it to have access to the Direct Connects and back to the on-prem systems (subject to the correct routing, of course).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00tr4z63kdq6tvnt5c13.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00tr4z63kdq6tvnt5c13.PNG" alt="Ah a master piece" width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This architecture would allow the organization to grow steadily with a low overhead to manage as it progresses.&lt;/p&gt;

&lt;p&gt;However, there are some further additions and modifications that could be considered to further improve things. Let's look at some of those, as I am sure there are some veterans shouting at their screen that there are better options... lol&lt;/p&gt;

&lt;h2&gt;
  
  
  What else could be changed?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first thing I would consider is centralizing Ingress and Egress Internet. While there is no charge for Internet Gateways (IGWs), there is a per-hour charge for NAT Gateways (NAT GWs). If we take our setup with 10 VPCs and likely at least 2 NAT GWs per VPC, that is going to get expensive very quickly. Moving Ingress and Egress Internet centrally will cut down on this cost and also give you more scope for having security solutions to protect your environment, such as proxy servers, etc. Because let's be honest, if you have gotten to this point in your AWS journey, it is more than likely that someone from your security team has clocked your rapid success and now wants to slam on the anchors to make sure things are secure :-)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At this point in the journey, it would probably be time to start having conversations about adopting and deploying a Multi-Account Landing Zone setup through the use of Control Tower or maybe even a customized Enterprise Scale Landing Zone through a partner. This is where we would have multiple accounts set up, all with different responsibilities. For instance, in a simple standard Landing Zone, you would have a Management Account that is your bill-paying account, the root of your AWS Org, and central IAM control. Then we have Logging and Archive to centralize logs from all accounts, Security and Audit account where we would enable security tools to protect your AWS environment and workloads, and then you would have your workload accounts. In our setup, for each VPC (and its DR equivalent), we would look to migrate that into its own account and then link it up with the relevant services. Unfortunately, this subject is too much to cover in a single paragraph, so if you are interested in Landing Zones, have a read-up separately. This setup really brings better governance to your environment and ensures that we have clear separation of responsibilities in the environment.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this has been an enjoyable read, and I hope to do some further blogs on other AWS Networking subjects in the near future.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Neil works for Telefonica Tech UK helping guide their customers who are considering or using AWS for their production work loads, He also works across Telefonica Tech UK's business units helping develop offerings and solutions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>awsnetworking</category>
      <category>cloudnetworking</category>
      <category>aws</category>
      <category>awsclouddesign</category>
    </item>
    <item>
      <title>AWS Centralised Logging with Amazon OpenSearch</title>
      <dc:creator>Neil Clark</dc:creator>
      <pubDate>Fri, 09 Aug 2024 15:31:28 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-centrilised-logging-with-amazon-opensearch-3bna</link>
      <guid>https://dev.to/aws-builders/aws-centrilised-logging-with-amazon-opensearch-3bna</guid>
      <description>&lt;p&gt;When looking at any AWS Perscriptive guidance for deploying Multi Account Landing Zones, centralised logging is always a central pillar in an Well Architected envrionment.  &lt;/p&gt;

&lt;p&gt;A centralised Logging Account with all other accounts streaming logs to CloudWatch are the standard way of doing things.  &lt;/p&gt;

&lt;p&gt;While there is nothing wrong with doing this CloudWatch does have some short comings.  Another architectural pattern that can be used to provide enhanced capabilities is to centralise logs into Amazon Opensearch.&lt;/p&gt;

&lt;p&gt;There are some key benefits of using Opensearch:-&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fine-grained Data Access Control&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon OpenSearch Service allows you to limit access to data down to the field level and anonymize sensitive data based on user permissions. This is useful if you want to enable troubleshooting access without exposing sensitive information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Aggregating Logs Across Accounts and Regions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By streaming logs from multiple AWS accounts and Regions into a centralized Amazon OpenSearch Service cluster, you can analyze trends, issues, and perform analytics across your entire infrastructure in a single location.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Flexible Querying and Analytics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon OpenSearch Service provides a powerful search and analytics engine that goes beyond the capabilities of CloudWatch Logs. You can use advanced querying, aggregation, and visualization features to gain deeper insights from your log data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scalability and Performance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon OpenSearch Service is a fully managed service that can automatically scale to handle large volumes of log data and provide low-latency search and analytics capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Integration with Other AWS Services&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon OpenSearch Service integrates with a wide range of AWS services, such as Amazon S3, Amazon DynamoDB, and Amazon Kinesis Data Firehose, allowing you to consolidate data from multiple sources into a unified platform.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How do I build an OpenSearch Setup?
&lt;/h2&gt;

&lt;p&gt;I setup a very basic setup in my AWS account,  three VPC's, Two subnets per VPC, One Instance deployed into each subnet, and VPC Flow Logs created two three log groups. I then created a Amazon OpenSearch Domain.&lt;/p&gt;

&lt;p&gt;Below is a diagram of my simple setup&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hz09qp3bld9bjcbp0ou.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hz09qp3bld9bjcbp0ou.PNG" alt="Image description" width="800" height="580"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lets look at the setup of the OpenSearch Domain&lt;/p&gt;

&lt;p&gt;Create it with the minimum required&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4ur9v5f47kz5w0bjwpg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4ur9v5f47kz5w0bjwpg.PNG" alt="Image description" width="800" height="1143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwnk9vg80g17k7e65uf72.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwnk9vg80g17k7e65uf72.PNG" alt="Image description" width="800" height="1227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I set mine to public access,  feel free to play with VPC Access&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff76okzzw6lz45n62cgt5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff76okzzw6lz45n62cgt5.PNG" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is important,  make sure if you are doing public access you add a source IP address for your public home broadband address so you can access the OpenSearch Kibana Dashboard.  Also make sure that you add the IAM ARN of the Lambda function that is being used to transport logs from CLoudWatch to Opensearch,  and also make sure it has all the relevant permissions for CloudWatch and Opensearch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2svdglzoq8xqic5gc4cl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2svdglzoq8xqic5gc4cl.PNG" alt="Image description" width="800" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you can got to this point you can go ahead and create your domain. (this will take a while)&lt;/p&gt;

&lt;p&gt;Once your domain is active we need to create the subscription filters in CloudWatch.&lt;/p&gt;

&lt;p&gt;Select your log group and then select 'Actions' &amp;gt; 'Subscription Filters' &amp;gt; 'Create Amazon OpenSearch Service subscription filter'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0hwohmlojl6iqywspzq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0hwohmlojl6iqywspzq.PNG" alt="Image description" width="800" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;note yours may look slightly different and ask you to select a Lambda Role you may have to create one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0n7prvwy7k6ozh16g5v.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0n7prvwy7k6ozh16g5v.PNG" alt="Image description" width="800" height="1053"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have done this you need to create soe traffic.  I found the easiest way to do this was to just select all my instances and Stop them and then Start them again.&lt;/p&gt;

&lt;p&gt;I would wait 10-15 mins to allow logs to get to the OpenSeach Cluster&lt;/p&gt;

&lt;p&gt;The easiest way to check the logs are getting to OpenSearch is to click on your domain in OpenSearch and Click the indexes tab,  if you see an index with the prefix cwl...  they are getting there succesfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zgl0vutdem7ymxxldnj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zgl0vutdem7ymxxldnj.PNG" alt="Image description" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To Access the dashboad click on the Kibana URL link and this will take you in. &lt;/p&gt;

&lt;p&gt;Once in you will  be presented with the below screen,  you need to click 'Connect to your Elasticsearch index'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvk1yk0pe942a7f4umk44.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvk1yk0pe942a7f4umk44.PNG" alt="Image description" width="800" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you will then be asked to create an index pattern,  cwl-* is the best one to use to see all the CloudWatch data.  &lt;/p&gt;

&lt;p&gt;Once you have created the index pattern you will be able to see your data&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3hhyjmegybn415arpmy.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3hhyjmegybn415arpmy.PNG" alt="Image description" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From here you can start querying your logs using the filter options,  You can build dashboards to visualise the data.  &lt;/p&gt;

&lt;p&gt;Unfortunately I have not had much chance to play with Kibana but would encourage you to have a look at the differnt features it has.&lt;/p&gt;

&lt;p&gt;If you run into issues with getting your data into OpenSeach I would check your Lambda logs to see if there are any permissions issues with the execution role and also check the security policy on the domain settings for OpenSearch to ensure that the Lambda IAM ARN is listed to be allowed to carry out actions against the OpenSearch domain.   &lt;/p&gt;

&lt;p&gt;Hope you find this whistle stop tour of setting up Amazon OpenSearch for Centralised Logging.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Neil works for Telefonica Tech UK helping guide their customers who are considering or using AWS for their production work loads, He also works across Telefonica Tech UK's business units helping develop offerings and solutions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>centralisedlogging</category>
      <category>opensearch</category>
      <category>awscommunitybuilder</category>
    </item>
    <item>
      <title>How to — AWS Auto Stop/Start of EC2 Instances using Tags</title>
      <dc:creator>Neil Clark</dc:creator>
      <pubDate>Thu, 18 Apr 2024 10:30:21 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-to-aws-auto-stopstart-of-ec2-instances-using-tags-49mi</link>
      <guid>https://dev.to/aws-builders/how-to-aws-auto-stopstart-of-ec2-instances-using-tags-49mi</guid>
      <description>&lt;p&gt;In a previous blog post I talked about AWS Cost Control and some simple methods I used to cut cost on a customer environment by more than 50%.&lt;/p&gt;

&lt;p&gt;I thought I would show you how this was achieved in a how to guide, so please join me below to see how I did it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-requisites
&lt;/h2&gt;

&lt;p&gt;Regardless of which AMI you decide to use to run on your instances, ensure that SSM Agent is installed, this is present in some AMI’s but not all so it always worth checking.&lt;/p&gt;

&lt;p&gt;This should be a standard install on all instances really in my view, Systems Manager has such an array of features it is silly not to have it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How will we Identify the instances?
&lt;/h2&gt;

&lt;p&gt;This is the first thing we need to decide… AWS Systems Manager has a couple of different ways to do this through the Maintenance Windows feature, you can manually select all instances in the Registered Targets but this is not ideal as it requires manual intervention when new servers are added, and the chances of someone remembering to do this, is slim.&lt;/p&gt;

&lt;p&gt;The alternative is to use Instance Tags, I have two thought processes on this, you can either use an existing tag you already use on all instances, for example “environment:non-prod” on the face of it this seems like a great idea and for some it will, however I personally think using existing tags makes things a little less flexible, for instance if you wish to exclude some servers from being identified you would have to either remove the tag from those instances or change it, neither is really a great solution since tags are great for identifying instances. The other option is to have a specific tag for Auto Start/Stop, this is a tag that can be applied to all instances through IAC and then you only need to modify this tag to exclude instances… But you just said changing tags isn't a great idea, yes I did however this tag is a specific tag it means all my other identify tags are intact.&lt;/p&gt;

&lt;p&gt;So in my solution I went for the tag as below:-&lt;/p&gt;

&lt;p&gt;“auto_start_stop:yes”&lt;/p&gt;

&lt;p&gt;So when “yes” is present in the key value pair the instance is included in the auto start/stop solution and when it is set to “no” it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Instances
&lt;/h2&gt;

&lt;p&gt;So in my Dev lab I have launched 2 instances Test_Server_1 and Test_Server_2. Test_Server_1 has the tag “auto_start_stop” set to “yes” and Test_Server_2 has it set to “no”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qe7ptta4f349rs6o3ou.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qe7ptta4f349rs6o3ou.JPG" alt="Tags for Test_Server_1" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z1rn9zido3epposq9ru.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z1rn9zido3epposq9ru.JPG" alt="Tags for Test_Server_2" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point it is important to point out that the EC2 Instances should have an IAM Instance Profile attached with the sufficient permissions to allow Systems Manager Automation. I have attached the AWS managed policy “AmazonSSMAutomationRole” (see below) the others are used to allow the SSM Session Connection Manager to connect to EC2 instances that don't have a public IP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always remember AWS IAM Permissions make the world go round :-)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgiiblvv2yrnbac2chrb8.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgiiblvv2yrnbac2chrb8.JPG" alt="EC2 IAM Instance Profile Permissions" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resource Groups
&lt;/h2&gt;

&lt;p&gt;The next thing we need to do is create a Resource Group in “Resource Groups &amp;amp; Tag Editor” under “Management &amp;amp; Governance” we will call this group later on in the setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvblqibvzq9fkvomic1cf.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvblqibvzq9fkvomic1cf.JPG" alt="Resource Groups Location" width="800" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So when you reach the correct page, create a new resource group.&lt;/p&gt;

&lt;p&gt;Group Type = Tag based&lt;/p&gt;

&lt;p&gt;Resources Types = AWS::EC2::Instance&lt;/p&gt;

&lt;p&gt;Tags = auto_start_stop:yes&lt;/p&gt;

&lt;p&gt;At this point if you Click the “Preview group resources” button you will notice the table below will populate with instances that match the tag combination.&lt;/p&gt;

&lt;p&gt;Just a note that if you just add the Tag “auto_start_stop” with a blank entry when you click the preview it will pick up every instances with the tag and encompass all instances including instances you may not want to be included, so make sure you use the “yes” identifier as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn5xnilo2fbna2r1tjsqa.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn5xnilo2fbna2r1tjsqa.JPG" alt="Resource Group Creation" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you want to create a Maintenance Window?
&lt;/h2&gt;

&lt;p&gt;Maintenance Windows are a feature of AWS Systems Manager if you hadn't gathered already. So browse to Systems Manager in the AWS Console, and on the left hand side find “Maintenance Windows” under the “Change Management” section.&lt;/p&gt;

&lt;p&gt;Click “Create Maintenance Window”&lt;/p&gt;

&lt;p&gt;Fill out the information needed, see my entries below&lt;/p&gt;

&lt;p&gt;Name — auto_stop_2100 (for me it makes sense to have the time in to easily identify the window)&lt;/p&gt;

&lt;p&gt;Description — will stop EC2 Instances at 2100&lt;/p&gt;

&lt;p&gt;Unregistered Targets — Untick this&lt;/p&gt;

&lt;p&gt;Schedule — Select CRON/Rate expression&lt;/p&gt;

&lt;p&gt;CRON/Rate expression — cron(00 21 ? * MON-FRI *)&lt;/p&gt;

&lt;p&gt;Duration — 3&lt;/p&gt;

&lt;p&gt;Stop initiating tasks — 1&lt;/p&gt;

&lt;p&gt;Schedule timezone — set this to your time zone ( this is especially important if you are looking to turn of resources when no one is using them overnight otherwise it will default to the AWS System Time Zone for the region.&lt;/p&gt;

&lt;p&gt;Leave others options blank as they are optional.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nbfxpnkea9lszngyufh.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nbfxpnkea9lszngyufh.JPG" alt="Maintenance Window config" width="800" height="1298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is obviously set for my specific time zone and requirements you will need to adjust your CRON expression and time zone to what you want.&lt;/p&gt;

&lt;h2&gt;
  
  
  Registering Targets
&lt;/h2&gt;

&lt;p&gt;Now we have created our Maintenance Window we need to register some targets for it to run against.&lt;/p&gt;

&lt;p&gt;So click on your maintenance window and click the “Targets” tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdtbdbrc9bhgwyn9y8em.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdtbdbrc9bhgwyn9y8em.JPG" alt="Targets Tab" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click “Register Target”&lt;/p&gt;

&lt;p&gt;Give your target a name, the select the radio button “Choose a resource group”.&lt;/p&gt;

&lt;p&gt;In the drop down select the resource group we created earlier.&lt;/p&gt;

&lt;p&gt;Under “Resource types” select “AWS::EC2::Instance” this is optional though I added it for completeness.&lt;/p&gt;

&lt;p&gt;Then click “Register target”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fny0hah1w20anwpbl3c2g.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fny0hah1w20anwpbl3c2g.JPG" alt="Registering a target" width="800" height="971"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an Automation Task
&lt;/h2&gt;

&lt;p&gt;The final thing we need to do is create an Automation task that will stop the instances.&lt;/p&gt;

&lt;p&gt;So click the “Tasks” tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F148aho1nslm107sbtl3m.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F148aho1nslm107sbtl3m.JPG" alt="Task Tab" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The select the “Register tasks” drop down and select “Register Automation task”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xkpht0e9uvogfp2id86.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xkpht0e9uvogfp2id86.JPG" alt="Register Automation task" width="800" height="130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give your task a name&lt;/p&gt;

&lt;p&gt;In the Automation Document section this is where you select the Automation you wish to run, here is where you see just how powerful Systems Manager is, the document we want is AWS-StopEC2Instance, and Document version we want to set to “Latest version at runtime”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgle05osuai577c5hebq5.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgle05osuai577c5hebq5.JPG" alt="Automation Document" width="800" height="957"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under the targets section we select the targets we want this automation to run against.&lt;/p&gt;

&lt;p&gt;Select the tick box next to the target group we created earlier&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4a82gquwfgp2zqhaznp5.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4a82gquwfgp2zqhaznp5.JPG" alt="Automation Targets" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next section is the Input Parameters for the Automation, you will notice that Instance id is a required field, now you might think that you need to put in all the instance ID’s of your instances that you want the automation to run again, and if you like huge admin overhead then this would be the way to go, and I am not ashamed to admit in my first few plays with this that's exactly what I did… however AWS have a great way to get round this, it is called a &lt;strong&gt;&lt;u&gt;pseudo parameter&lt;/u&gt;&lt;/strong&gt; , so instead of putting all the instance id’s in we put the parameter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{RESOURCE_ID}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in this box. What this does is read the instance ID from the targets and passes it to the SSM Automation process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lys4vw58k04bfc9846e.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lys4vw58k04bfc9846e.JPG" alt="Input Parameters" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next section is rate control, this is how much you want done at once..&lt;/p&gt;

&lt;p&gt;This is personal preference really I have set mine to Percentage and set Concurrency to 80% and an Error Threshold to 40%.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzuuejzcvklwy1ut62fs.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvzuuejzcvklwy1ut62fs.JPG" alt="Rate Control" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The final thing we need to set is the IAM Service Role, this should be a Role that has the permissions to run Systems Manager Automation and read the Resource Groups, for this demo I am using the same Role I assigned to my EC2 Instances however this wouldn't be best practice outside of a Dev Environment it would be a different role (I am being lazy here).&lt;/p&gt;

&lt;p&gt;and that's it, click “Register Automation task”&lt;/p&gt;

&lt;p&gt;We now have a Maintenance Window set to run Monday to Friday at 21:00 every night that will stop EC2 Instances with a Tag “auto_start_stop:yes”&lt;/p&gt;

&lt;h2&gt;
  
  
  Over to you
&lt;/h2&gt;

&lt;p&gt;So as Morpheus said&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I’m trying to free your mind, Neo. But I can only show you the door. You’re the one that has to walk through it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have shown you how to create a Maintenance Window that Auto Stops EC2 Instances, now its your turn to create the opposite and create one to Auto Start the EC2 Instances…&lt;/p&gt;

&lt;p&gt;Good Luck and I Hope you found this useful. This is just one way of doing this there are many others,  but rememeber your customer may not grant you full access to all services and features in AWS so you need to be flexible.&lt;/p&gt;

&lt;p&gt;*UPDATE — should you wish to skip playing yourself, the link here will take you to my repo where there is terraform code to deploy what you need to run this solution.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Neil works for Telefonica Tech UK helping guide their customers who are considering or using AWS for their production work loads, He also works across Telefonica Tech UK's business units helping develop offerings and solutions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>ssm</category>
      <category>costcontrol</category>
      <category>awssystemsmanager</category>
    </item>
  </channel>
</rss>
