Thursday, February 23, 2023

AWS COST SAVING SERVICES

 









HOW DO YOU DEBUG A BASH SHELL? 

ANSWER:

  • Downloading bashdb - We install bashdb using system package manager. The package has steps for using debugging scripts.
  • STEPS:
  • Create a bash script file for example "script.sh"
  • Copy the file from "._DEBUG.sh"
  • Set up the debug configuration  to "run - debug configuration -bash scripts"
  • Lunch your "script.sh" from bash shell.
  • Debugger port 33333 - Ensure that firewall are configured to allow connections to the port.

. _DEBUG.sh
  • "Set  -x" option - This helps to execute the script and the argument. You can use set -x and set +x to see whats happening in your script.
#!/bin/bash

set -x
..code to debug...
set +x

  • Echo command - We can see the variables and the output of commands as well as where the scripts is likely failing. 


WHAT AWS SERVICES MANAGES COST?

ANSWER

AWS Trusted Advisor - By scanning the environment, ensures best practice and optimize the environment. Trusted Advisor implements checks in five categories cost optimization, performance, service limit, security and fault tolerance. 

HOW DO YOU CONFIGURE TRUSTED ADVISOR PROGRAMATICALLY USING AWS BOTO3?

import boto3

client = boto3.client('support')

response = client.describe_trusted_advisor_check_result(
###Do not forget to replace with the ID of the check you want to retrieve
checkId='*******',
language='en' ## This depends on your language preference for example en=English, fr=french etc.
)

print(response['result']['status'])


  • WHAT ARE THE CORE CHECKS OF TRUSTED ADVISOR?
  • ANSWER:

  • EBS public Snapshots

  • RDS public Snapshots.

  • IAM Use

  • S3 Bucket Permission

  • Security Groups - Specific port unrestricted.

  • MFA on Root Account

  • Service Limits

                                

                  AWS SAVING PLANS

AWS saving plans: Ensures a flexible pricing model that helps to reduce bills significantly. AWS offers three types of Saving plans.


Compute Savings Plan- Like AWS Fargate, AWS Lambda,                   Region, Avalability Zone, saving up to 66%.


EC2 instance Plan -like  AZ , Instance size ( t2 micro, t2 medium), operating system, saving 72%.

 SageMaker Savings Plan -Like Any ML instance size, any region saving 64%


               AWS COST EXPLORER : 
We use it to monitor and track your spending usage pattern and forecast future cost.

  AWS BUDGET:
You can set up a threshold usage budget for your AWS resources either monthly, quarterly, annually and set up alert should you exceed budget. 


AWS COST ALLOCATION TAGS
Cost allocation tags are metadata and AWS allows you to assign up to 50 cost allocation tags to each resource.  


AWS COST ANOMALY DETECTION
This services is available at no cost. And can be accessed via APIs, It also detects any sudden spikes in cost and sends an alert. This uses machine learning algorithms to establish a baseline of your cost and monitor the current against the baseline cost.

USED CASE:

Think about this, you are in an environment where you have   developers creating resources and some of the resources were not used; accumulating cost. As a best practice, using trusted Advisor to scan the environment will expose both tagged and untagged resources as well as their overhead cost...............





These are potential interview questions asked. Happy Learning!!😊

Referencing:

AWS :https://aws.amazon.com/savingsplans/

https://emmie-questia.blogspot.com/

No comments:

Post a Comment

CONFIGURING A PHISHING CAMPAIGN IN MICROSOFT DEFENDER.

Configuring a phishing campaign in Microsoft Defender (specifically Microsoft Defender for Office 365) involves creating a simulated attack ...