June 17, 2023

AWS Certified Solutions Architect - Questions Part 2

 1. Which AWS service provides a fully managed service for deploying and managing containerized applications using Kubernetes?

   A) Amazon ECS

   B) Amazon EKS

   C) AWS Fargate

   D) AWS Elastic Beanstalk



2. Which AWS service allows you to create and manage serverless functions?

   A) Amazon EC2

   B) AWS Lambda

   C) Amazon RDS

   D) Amazon S3



3. Which AWS service provides a fully managed, scalable data streaming platform?

   A) Amazon Kinesis

   B) Amazon SQS

   C) AWS Glue

   D) Amazon S3



4. Which AWS service provides a managed, highly scalable, and serverless data integration solution?

   A) AWS Glue

   B) Amazon Redshift

   C) Amazon S3

   D) Amazon RDS



5. Which AWS service provides a fully managed, scalable service for real-time data streaming and analytics?

   A) Amazon Kinesis

   B) Amazon SQS

   C) Amazon S3

   D) AWS Glue



6. Which AWS service provides a serverless compute service that lets you run your code without provisioning or managing servers?

   A) Amazon EC2

   B) AWS Lambda

   C) Amazon ECS

   D) Amazon S3



7. Which AWS service provides a fully managed service for deploying, operating, and scaling a relational database in the cloud?

   A) Amazon EC2

   B) Amazon RDS

   C) Amazon DynamoDB

   D) AWS Lambda


8. Which AWS service provides a fully managed, highly scalable, and secure object storage service?

   A) Amazon S3

   B) Amazon EBS

   C) Amazon Glacier

   D) AWS Storage Gateway


9. Which AWS service allows you to securely store, encrypt, and manage your AWS credentials and access keys?

   A) AWS Secrets Manager

   B) AWS IAM

   C) AWS Key Management Service (KMS)

   D) AWS Shield


10. Which AWS service provides a scalable and highly available managed message queuing service?

   A) Amazon SQS

   B) Amazon SNS

   C) Amazon Kinesis

   D) AWS Glue


June 16, 2023

AWS Certified Solutions Architect - Questions

 

 

#1        Which AWS service is specifically designed for deploying and managing containerized applications?

A) Amazon EC2

B) Amazon S3

C) Amazon ECS

D) AWS Lambda


#2
        Which AWS service provides scalable, highly available, and managed relational databases?

A) Amazon DynamoDB

B) Amazon Redshift

C) Amazon Aurora

D) Amazon S3


#3
    : Which AWS service allows you to automatically scale compute resources based on demand?

A) Amazon EC2

B) AWS Lambda

C) Amazon RDS

D) Amazon S3


#4
    Which AWS service provides a fully managed message queuing service?

A) Amazon SQS

B) Amazon SNS

C) Amazon Kinesis

D) AWS Glue


#5
Which AWS service provides a scalable, fully managed NoSQL database?

A) Amazon DynamoDB

B) Amazon RDS

C) Amazon Redshift

D) AWS Elastic Beanstalk


#6
    Which AWS service allows you to create and manage virtual private networks (VPNs) for secure connectivity to your AWS resources?

A) Amazon VPC

B) AWS Direct Connect

C) Amazon EC2

D) AWS IAM


#7     Which AWS service provides a fully managed, scalable data warehouse for analytics and business intelligence?

A) Amazon Redshift

B) Amazon RDS

C) Amazon DynamoDB

D) AWS Glue


#8
    Which AWS service provides a fully managed service for deploying and managing containerized applications using Kubernetes?

A) Amazon ECS

B) Amazon EKS

C) AWS Fargate

D) AWS Elastic Beanstalk


#9
    Which AWS service allows you to create and manage serverless functions?

A) Amazon EC2

B) AWS Lambda

C) Amazon RDS

D) Amazon S3


#10
Which AWS service provides a fully managed, scalable data streaming platform?

A) Amazon Kinesis

B) Amazon SQS

C) AWS Glue

D) Amazon S3


#11
        Which AWS service provides a fully managed graph database?

A) Amazon Neptune

B) Amazon DynamoDB

C) Amazon RDS

D) Amazon Redshift





    




May 21, 2023

Cloud Formation

 Aws cloud services + provisioning of aws cloud resource 

(EC2, lambda, load balancer) 



Use case

  • Hard to manage infrastructure


  • Complex and time consuming to replace infra in another region / account 


  • Incremental upgrades become critical 



Cloud formation template: 

1. Act as a blueprint for the provisioning of resource

2. Created in JSON or YAML file




Stacksets:

It extends the functionality of stacks which enables you to create, update or delete stacks across multiple accounts and regions with single operations.




Create Template file : 

Allowed templates : JSON | YAML

Definition file of all the resources you will be using for cloud formation 


Stack 

Define initial template file that you are going to deploy to this stack


Changeset : 

Upload modified file into cloud formation and before applying this change set to the stack 

Generate the preview of changes to the existing stack. 


AwsTemplateFormatversion


AwsTemplateFormatversion: “2010-09-09”

This is the only allowed value for this property.


If you don't define this property in the YAML template then by default the YAML file will refer “2010-09-09” as a default value. 



Resources:

  S3Bucket:

    Type: 'AWS::S3::Bucket'

    DeletionPolicy: Retain

    Properties:

      BucketName: DOC-EXAMPLE-BUCKET

  S3Bucket2:

    Type: 'AWS::S3::Bucket'

    DeletionPolicy: Retain

    Properties:

      BucketName: DOC-EXAMPLE-BUCKET2




Infrastructure as a code for the 


Aws cloud formation is a free aws service.


CREATE UPDATE DELETE


Cloud formation enables you to 

1. Model and setup your infra using templates

2. Automate provisioning and configuration

3. Manage dependencies

4. Easily control track change of infra 

5. Rollback or delete clearly 



Update stack

Stacks:

- When cloud formation executes a template it creates a stack

- to update the resources within a template you need to update the stack 

- a set of related resources as a single unit is called stack 




Change Set

- Before updating a stack you can generate change set 

- a change set allow you to see how the changes will impact to your running resources

- this is very important for live system, this can delete the existing resource and create new one


Ex RDS name change - existing RDS will be deleted - Potential data loss 

Change sets provide visibility on actions to be taken using new template


Template anatomy

 

  Resources:

    LOGICAL ID:

      TYPE OF RESOURCE :

        PROPERTIES:

          —----

          —----

          —----

March 25, 2021

List down different transformations available in SSIS

 It is an object that generates, modifies, or passes data.

1.    AGGEGATE –

It applies an aggregate function to grouped records and produces new output records from aggregated results.     

 

2.    AUDIT –

The transformation adds the value of a system variable, such as machine name or execution instance GUID to a new output column.

 

3.    CHARACTER MAP –

This transformation makes string data changes such as changing data from lower case to upper case.

 

4.    CONDITIONAL SPLIT -    

It separate input rows into separate output data pipelines based on the Boolean expressions configured for each output

 

5.    COPY COLUMN

Add a copy of column to the t/r output we can later transform the copy keeping the original for auditing personal

 

6.    DATA CONVERSION

Converts a columns data type to another data type.

 

7.    DATA MINING QUERY

Perform a data mining query against analysis services.

 

8.    DERIVED COLUMN

Create a new derive column calculated from expression.

 

9.    EXPORT COLUMN

It allows you to export a column from the data flow to a file.

 

10. FUZZY GROUPING

Perform data cleansing by finding rows that are likely duplicates.

 

11. FUZZY LOOKUP

Matches and standardizes data based on fuzzy logic.

eg:-transform the name jon to john

 

12. IMPORT COLUMN

Reads the data from a file & adds it into a dataflow.

 

13. LOOKUP

Perform the lookup of data tab used later in a transform.

ex:-t/f to lookup a city based on zipcode.

§  getting a related value from a table using a key column value

§  update slowly changing dimension table

§  To check whether records already exist in the table.

 

14. MERGE

 

Merges two sorted data sets into a single data set into a single data flow.

 

15. Merge Join

Merges two data sets into a single dataset using a join junction.

 

16. MULTI CAST

Sends a copy of two data to an additional path in the workflow.

 

17. ROW COUNT

Stores the rows count from the data flow into a variable.

 

18. ROW SAMPLING

Captures the sample of data from the dataflow by using a row count of the total rows in dataflow.

 

19. ROW SAMPLING

Captures the sample of the data from the data flow by using a row count of the total rows in data flow.

 

20. UNION ALL

Merge multiple data sets into a single dataset.

 

21. PIVOT

Converts rows into columns

 

22. UNPIVOT

Converts columns into rows

March 23, 2021

unzip zip files using python

import zipfile
import os 
import pandas as pd 
import numpy as np
import glob

STRWORKINGDIR = r"FOLDER PATH"

# Loop to extract all the zip files 

def un_zipFiles(path):
    files=os.listdir(path)
    for file in files:
        if file.endswith('.zip'):
            filePath=path+'/'+file
            zip_file = zipfile.ZipFile(filePath)
            for names in zip_file.namelist():
                zip_file.extract(names,path)
                print('Extracted file .. '+ names)
            zip_file.close()

un_zipFiles(STRWORKINGDIR)

print('Extracted all the files')

March 3, 2021

WMIC commonly used commands

  Most commonly used WMIC commands 

- CPU  

        cpu get name


- RAM  

        MEMORYCHIP get BankLabel, DeviceLocator, Capacity, Speed


- OS  

        os get Caption,OSArchitecture

- HDD  

        diskdrive get model,size


- LOGICAL DISK

            get name,Size


- Sound  

        sounddev get Caption  


- Software 

        product get name


- Video  

        path win32_VideoController get name 


- NIC  

        nic get caption 

August 19, 2019

Compare 2 excel inputs and highlight the difference in python

I have 2 input files with almost similar columns


I want to compare 2 files for the difference and highlight the difference and generate the difference file as output

The flexibility of comparing 2 files always lies with the user

as here we are using the the column mapping file to compare 2 inputs.

refer below code


import pandas as pd
import numpy as np

import  gc
dfInput1 = pd.read_excel(
"E:/001 E books/006 Python/003 Projects/003 Compare 2 excel files/"Input files.xlsx", sheet="Sheet1")

dfInput2 = pd.read_excel(
"E:/001 E books/006 Python/003 Projects/003 Compare 2 excel files/input2.xlsx", sheet="Sheet2")

dfOutputMapping = pd.read_excel(
"E:/001 E books/006 Python/003 Projects/003 Compare 2 excel files/OutputMapping.xlsx", sheet="Sheet1")


dffinalOP = pd.merge(dfInput1, dfInput2,
left_on="Row ID", right_on="Ip2_Row ID", how="left")

# Added the output columns  here
for  index, col1 in dfOutputMapping.iterrows():
   
dffinalOP[col1[
'Output']] = (dffinalOP[col1['File1_IP']] == dffinalOP[col1['File2_IP']])

dffinalOP.to_csv(
"E:/001 E books/006 Python/003 Projects/003 Compare 2 excel files/output.csv")



Reference file format and output

Input file 1

Input file 2
Mapping file : Defines which columns to compare from input file 1 and input  file 2

Output file with status in last column


This code can be further developed as per your requirement.

please share your suggestions. 

Cheeeeeeeeeeeers !!