All Questions
64 questions
1
vote
1
answer
144
views
Cannot deploy AWS Greengrass v2 components with boto3
I developed a greengrass component that is basically a jar, with no configuration, as example to getting started with AWS Greengrass v2. I created a S3 bucket containing the jar and created a ...
0
votes
0
answers
119
views
How do I run the following Python and Boto3 code?
I'm trying to explore machine learning models from AWS. AWS recently released a Bedrock service, and I would like to setup an environment to do that. I would also need to interact with S3, Langchain ...
0
votes
1
answer
2k
views
AWS SSO with AWS CLI - python boto3
I am a beginner learning AWSCLI, and boto3 with Python. I am trying to execute a few operations using Python boto3 on my s3 bucket. For running the code, I had to copy-paste the short-lived ...
0
votes
0
answers
30
views
Can I download s3 objects locally with custom naming?
Using the CLI you can use
aws s3 cp s3://my-bucket/1234_client/dev/my.hprof.gz ./my_file_naming_is_custom.hprof.gz
The above gives you a renamed file of the object locally. I want to do the same in ...
2
votes
1
answer
2k
views
AWS SSO - List users assigned with an aws account
I have the list of all AWS accounts in my organization. I need to list the users present in each account via API.
Through the documentation List account assigments,
I can list only passing as ...
0
votes
1
answer
8k
views
botocore.exceptions.WaiterError: Waiter StackCreateComplete failed: Max attempts exceeded
I am getting above error when running a python code with boto3. It is erroring out at 1 hour all the time and the stack is being created even after this error. I have applied both MaxSessionDuration ...
0
votes
2
answers
207
views
Validate all cloudformation files in a s3 folder
CloudFormation validate supports validating a cloudformation template in s3.
How to validate all files in a s3 location. The files are located in a folder.
1
vote
1
answer
2k
views
Get Object URL of s3 all s3 files in a folder
Using python or aws cli get the object url of all the files in a s3 bucket folder.
S3 object url are of the format
https://BUCKET_NAME.s3.amazonaws.com/FOLDER_1/FILE_NAME
-2
votes
1
answer
2k
views
botocore.errorfactory.DBInstanceNotFoundFault in boto3
How to catch this boto error botocore.errorfactory.DBInstanceNotFoundFault
This is my python3 code :
import boto3
import botocore.exceptions
import botocore.errorfactory
clientrds = boto3.client('rds'...
-4
votes
1
answer
2k
views
How to copy individual objects between S3 buckets quickly / in a fast manner?
We have a lambda that is triggered for some S3 files and is supposed to copy them to a different bucket. Basically the code looks like
import boto3
def handler(event, context):
boto3.client(&...
0
votes
1
answer
594
views
Python Boto3 SnapshotNotFound exception. Unable to delete snapshot
I'm new to AWS and I have written a Boto3 script which gets the snapshots by OwnerId and delete older snapshots one by one. I'm having a strange issue that boto client finds all Snapshots and when it ...
0
votes
2
answers
435
views
How can I transfer objects in buckets between two aws accounts with python?
I need to transfer all objects of all buckets, with the same folders and buckets structures, from an aws account to another aws account.
I've been doing it with this code through aws cli, one bucket ...
1
vote
1
answer
5k
views
How can I get the SNS topic ARN using the topic name to publish a SNS message in Python via Boto3?
Python
method to run query
def function(run_query)
//topic = arn return from topic name
topic.publish(message)
pass
I am using the boto3 resource method. There are lot of examples of using ...
0
votes
0
answers
2k
views
How to create a script to export AWS security groups with rules in table structured format (CSV or TSV)
I want to create a script to export AWS security groups with rules in table structured format (CSV or TSV)
I require the following Values:
SecurityGroups
GroupName
GroupId
IpPermissions/...
0
votes
1
answer
158
views
Use Python variable in bash command with check_output
I would like to enter a backup plan name as input and use that variable in my bash command to get a backup plan ID. To do this, I list the backup plans and filter by the name of the backup plan. All ...