Articles on Trending Technologies

Technical articles with clear explanations and examples

How to use Boto3 to get the details of secrets from a specific location in AWS Secret Manager

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 1K+ Views

AWS Secrets Manager allows you to securely store and manage sensitive information like API keys, database passwords, and tokens. Using the boto3 library in Python, you can retrieve metadata about secrets stored in specific locations. Prerequisites Before using boto3 with AWS Secrets Manager, ensure you have: AWS credentials configured (via AWS CLI, environment variables, or IAM roles) Boto3 library installed: pip install boto3 Proper IAM permissions for secretsmanager:DescribeSecret Approach Follow these steps to get secret details from AWS Secrets Manager ? Step 1: Import boto3 and botocore exceptions to handle errors ...

Read More

How to use Boto3 to update the secret keys from a specific location in AWS Secret Manager

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 918 Views

AWS Secrets Manager allows you to securely store and manage sensitive information like API keys, database credentials, and other secrets. Using boto3, Python's AWS SDK, you can programmatically update secrets stored in AWS Secrets Manager. Prerequisites Before updating secrets, ensure you have ? AWS credentials configured (via AWS CLI, IAM roles, or environment variables) Appropriate IAM permissions for secretsmanager:UpdateSecret The boto3 library installed: pip install boto3 Algorithm Steps Step 1: Import boto3 and botocore exceptions to handle errors gracefully. Step 2: Define the secret location (SecretId) and the new secret value as ...

Read More

How to use Boto3 to restore all secret keys from a a specific location in AWS Secret Manager

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 266 Views

Problem Statement: Use boto3 library in Python to restore all secret keys from specific location in AWS Secrets Manager. Approach/Algorithm Step 1: Import boto3 and botocore exceptions to handle exceptions. Step 2: Define the secret_stored_location as the required parameter. Step 3: Create an AWS session using boto3 library. Make sure region_name is mentioned in the default profile. If not specified, explicitly pass the region_name while creating the session. Step 4: Create an AWS client for secretsmanager. Step 5: Call restore_secret and pass the secret_stored_location as SecretId. Step 6: It returns the metadata of the restored secret. Step ...

Read More

How to use Boto3 to delete all secret keys from a specific location in AWS Secret Manager

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 477 Views

AWS Secrets Manager is a service that helps you protect secrets needed to access your applications and services. Using boto3, you can programmatically delete secrets from specific locations in AWS Secrets Manager. Prerequisites Before running this code, ensure you have ? AWS credentials configured (via AWS CLI, IAM roles, or environment variables) boto3 library installed: pip install boto3 Appropriate IAM permissions for secretsmanager:DeleteSecret Algorithm Steps Step 1: Import boto3 and botocore exceptions to handle exceptions. Step 2: Define the secret_stored_location parameter (Secret ARN or name). Step 3: Create an AWS session using ...

Read More

How to use Boto3 to create a secret key as plain text in AWS Secret Manager

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 1K+ Views

AWS Secrets Manager is a service that helps you securely store, retrieve, and manage sensitive information like API keys, database credentials, and other secrets. Using boto3, Python's AWS SDK, you can programmatically create and manage secrets as plain text. Prerequisites Before creating secrets, ensure you have ? AWS credentials configured (via AWS CLI, IAM roles, or environment variables) Proper IAM permissions for Secrets Manager operations boto3 library installed: pip install boto3 Creating a Secret in AWS Secrets Manager The process involves establishing an AWS session, creating a Secrets Manager client, and calling the ...

Read More

How to use Boto3 to get the secret keys saved as plain text from AWS Secret Manager

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 1K+ Views

AWS Secrets Manager is a service that helps you protect secrets needed to access your applications. Boto3 is the AWS SDK for Python that allows you to interact with AWS services, including retrieving secrets stored as plain text. Prerequisites Before retrieving secrets, ensure you have: AWS credentials configured (via AWS CLI, IAM roles, or environment variables) Proper IAM permissions to access Secrets Manager Boto3 library installed: pip install boto3 Step-by-Step Approach Step 1: Import boto3 and botocore exceptions to handle errors Step 2: Define the secret name or ARN where your secrets ...

Read More

How to use Boto3 to paginate through all objects of a S3 bucket present in AWS Glue

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 4K+ Views

Boto3 is a Python SDK for AWS that allows you to interact with AWS services. When working with large S3 buckets containing thousands of objects, pagination helps retrieve data in manageable chunks rather than loading everything at once. Why Use Pagination? S3 buckets can contain millions of objects. Loading all objects at once can cause memory issues and timeouts. Pagination allows you to: Process objects in smaller batches Reduce memory usage Handle large datasets efficiently Resume from a specific point using tokens Key Parameters The ...

Read More

Python Program to Construct a Tree & Perform Insertion, Deletion, Display

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 716 Views

When building a tree data structure in Python, we need to construct a tree and perform operations such as inserting an element, deleting an element and displaying elements of the tree. This can be achieved by defining a class with methods for these operations. Below is a demonstration of the same − Tree Structure Implementation class Tree_struct: def __init__(self, data=None, parent=None): self.key = data self.children = [] self.parent ...

Read More

Check whether a number has consecutive 0's in the given base or not using Python

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 271 Views

When working with different number bases, we sometimes need to check if a number contains consecutive zeros in its representation. Python provides an efficient way to convert numbers between bases and detect patterns like consecutive zeros. Understanding the Problem For example, the number 8 in base 2 (binary) is represented as "1000", which contains consecutive zeros. We need to convert the number to the specified base and then check for consecutive zero digits. Complete Solution def check_consecutive_zero(N, K): my_result = convert_to_base(N, K) if (check_consecutive_zeros(my_result)): ...

Read More

Python Program to Implement a Stack

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 4K+ Views

A stack is a Last-In-First-Out (LIFO) data structure where elements are added and removed from the same end (the top). In Python, we can implement a stack using a class with methods for push, pop, and checking if the stack is empty. Stack Implementation Here's a complete stack implementation with push, pop, and empty check operations ? class Stack: def __init__(self): self.items = [] def is_empty(self): return ...

Read More
Showing 4951–4960 of 61,297 articles
« Prev 1 494 495 496 497 498 6130 Next »
Advertisements