AWS Articles

Page 2 of 16

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

How to get the list of all versions of the object from S3 present in AWS Resource

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

In this article, we will see how to get the list of all versions of objects from S3 using boto3 in Python. This is useful when S3 versioning is enabled and you need to track object history. Prerequisites Before running this code, ensure you have ? AWS credentials configured (via AWS CLI, IAM roles, or environment variables) S3 bucket with versioning enabled boto3 library installed: pip install boto3 Approach We'll use the list_object_versions() method from the S3 client to retrieve all versions of objects in a specific bucket and prefix ? ...

Read More

How to use Boto3 to paginate through all triggers present in AWS Glue

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

Problem Statement: Use boto3 library in Python to paginate through all triggers from AWS Glue Data Catalog that is created in your account Approach/Algorithm to solve this problem Step 1: Import boto3 and botocore exceptions to handle exceptions. Step 2: max_items, page_size and starting_token are the optional parameters for this function max_items denote the total number of records to return. ...

Read More

How to use Boto3 to paginate through all tables present in AWS Glue

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

AWS Glue Data Catalog stores metadata about your data sources. When you have many tables, pagination helps retrieve them efficiently without overwhelming your application. The boto3 library provides built-in pagination support for AWS Glue operations. Understanding Pagination Parameters The pagination configuration accepts three optional parameters: max_items: Total number of records to return across all pages page_size: Number of records per page (default is 100) starting_token: Token from previous response to resume pagination Setting up AWS Glue Client First, create a boto3 session and Glue client. Ensure your AWS credentials and region are configured ...

Read More

How to use Boto3 to paginate through table versions of a table present in AWS Glue

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

Problem Statement: Use boto3 library in Python to paginate through table versions of a table from AWS Glue Data Catalog that is created in your account. Approach/Algorithm to solve this problem Step 1: Import boto3 and botocore exceptions to handle exceptions. Step 2: max_items, page_size and starting_token are the optional parameters for this function, while database_name and table_name are required. max_items denotes the total number of records to ...

Read More

How to use Boto3 to paginate through security configuration present in AWS Glue

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

In this article, we will see how to paginate through security configuration present in AWS Glue using Boto3. AWS Glue security configurations define encryption settings for data at rest and in transit. Problem Statement Use boto3 library in Python to paginate through security configurations from AWS Glue Data Catalog that are created in your account. Understanding Pagination Parameters The pagination function accepts three optional parameters ? max_items − Total number of records to return. If available records exceed this limit, a NextToken is provided for resuming pagination. page_size ...

Read More

How to use Boto3 to paginate through all jobs present in AWS Glue

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

In this article, we will see how to paginate through all jobs present in AWS Glue using the boto3 library in Python. Problem Statement Use boto3 library in Python to paginate through jobs from AWS Glue Data Catalog that is created in your account. Understanding Pagination Parameters Before implementing the solution, let's understand the key pagination parameters ? max_items − Total number of records to return. If available records exceed this limit, a NextToken is provided for resuming pagination. page_size − Number of items per page during pagination. starting_token − Token from previous response ...

Read More
Showing 11–20 of 155 articles
« Prev 1 2 3 4 5 16 Next »
Advertisements