Problem Statement: Use boto3 library in Python to get a list of all secrets in AWS Secret ManagerApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: There are no parameters here.Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name while creating the session.Step 4: Create an AWS client for secretmanager.Step 5: Call list_secrets function to retrieve all secrets.Step 6: It returns the metadata of all secrets.Step 7: Handle the generic exception if something went wrong ... Read More
In this post, we will understand the difference between Stack and HeapStackIt is a linear data structure.Memory is allocated in a contiguous (continuous) block.The memory for a stack is allocated and deallocated automatically using the instructions of the compiler.It costs less to build and maintain a stack.It is easy to implement.It is fixed in size; hence it is not flexible.Its only disadvantage is the shortage of memory, since it is fixed in size.If all the blocks are not occupied, memory gets wasted too.It takes less time to access the elements of a stack.It has an excellent locality of reference.HeapIt is ... Read More
Problem Statement: Use boto3 library in Python to generate a random password in AWS Secret ManagerApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: There are no parameters here.Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name while creating the session.Step 4: Create an AWS client for secretmanager.Step 5: Call get_random_password and pass the parameter as per the desired complexity.Step 6: It returns a random password.Step 7: Handle the generic exception if something went wrong ... Read More
Problem Statement: Use boto3 library in Python to get the details of secrets from specific location in AWS Secret Manager.Approach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: secret_stored_location is the required parameter.Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name while creating the session.Step 4: Create an AWS client for secretmanager.Step 5: Call describe_secret and pass the secret_stored_location as SecretId.Step 6: It returns the metadata of secrets.Step 7: Handle the generic exception if something ... Read More
In this post, we will understand the difference between CLI and GUI −CLIIt stands for Command Line Interface.It is difficult to use.It consumes less memory.It provides high precision.It is quick in comparison to GUI.The operating system of CLI required a keyboard only.The appearance can’t be modified.An input can be entered at command prompt only.The information is presented to the user in the form of plain text and files.No menu is provided.No graphics are present in CLI.It doesn’t use any pointing devices.It doesn’t help avoid spelling mistakes and typing errors.GUIIt is easy to use.It stands for Graphical User Interface.It consumes more ... Read More
Problem Statement: Use boto3 library in Python to update secret keys from specific location in AWS Secret Manager.Approach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: secret_stored_location and secret_key_pair are the required parameters. Make sure secret_key_pair is written as string, not as dict.Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name, while creating the session.Step 4: Create an AWS client for secretmanager.Step 5: Call update_secret and pass the secret_stored_location as SecretId and secret_key_pair as SecretString.Step ... Read More
Problem Statement: Use boto3 library in Python to restore all secret keys from specific location in AWS Secret Manager.Approach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: secret_stored_location is the required parameter.Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name while creating the session.Step 4: Create an AWS client for secretmanager.Step 5: Call restore_secret and pass the secret_stored_location as SecretId.Step 6: It returns the metadata of restored secret.Step 7: Handle the generic exception if something ... Read More
Problem Statement: Use boto3 library in Python to delete all secret keys from a specific location in AWS Secret ManagerApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: secret_stored_location is the required parameter.Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name while creating the session.Step 4: Create an AWS client for secretmanager.Step 5: Call delete_secret and pass the secret_stored_location as SecretId.Step 6: It returns the metadata of deleted secret.Step 7: Handle the generic exception if ... Read More
In this post, we will understand the difference between RPC and RMI −RPC (Remote Procedure Call)It is a library.It is an OS dependent platform.It supports procedural programming.It is less efficient in comparison to RMI.It creates more overhead.The parameters passed to RPC is normal data.It is the older version of RMI.It is easy to program in RPC.It doesn’t provide any security.The cost of development is high.Versioning is a complicated process in RPC.Multiple codes will be needed to build a simple application in RPC.RMI (Remote Method Invocation)It is a platform based on Java.It supports object-oriented programming.It is more efficient in comparison to ... Read More
Problem Statement: Use boto3 library in Python to create a secret key as plain text in AWS Secret ManagerApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: secret_stored_location and secret_key_pair is the required parameter. It is a place where secrets are saved with given key-pair value. Make sure secret_key_pair is written as string, not as dict. For example: '{key:pair}'Step 3: Create an AWS session using boto3 lib. Make sure region_name is mentioned in the default profile. If it is not mentioned, then explicitly pass the region_name while creating the session.Step 4: Create an AWS ... Read More