Filtering instances by IAM role in boto3?
Is there a way to filter instances by IAM role? Basically I want a script that terminates all the instances that I've launched, but doesn't touch instances launched with other IAM roles.
See also questions close to this topic
AWS - share business logic (jar) across multiple lambdas
I have a smaller application, but it uses multiple lambda functions (20+) for different tasks. Each lambda is it's own project. Most of the logic code resides in a jar-file (single project) which is shared among them.
So when making changes to the logic code I need to re-deploy every lambda so they all run the same code base...
Is it possible to point out a S3 bucket path (environment variable) and let my lambdas include the jar as they are run? In that case I only need to re-deploy the logic code.
Or is AWS Code Pipeline the way to go? I have never used that before
Private DNS not resolving for EC2 instance
I just set up a VPN server using OpenVPN on an Amazon EC2 instance using this tutorial: https://hackernoon.com/using-a-vpn-server-to-connect-to-your-aws-vpc-for-just-the-cost-of-an-ec2-nano-instance-3c81269c71c2.
The problem that I'm experiencing is that I am unable to connect with the private DNS:
$ssh -i X.pem firstname.lastname@example.org ssh: Could not resolve hostname ip-172-31-aa-bbb.ec2.internal: nodename nor servname provided, or not known
However, when I use the IP address:
$ssh -i X.pem email@example.com Last login: Thu Mar 22 18:43:34 2018 from 172.31.aa.bbb __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___|
Would I be required to use a private hosted zone to achieve this? If so, is this something I can use alongside my current DNS provider (Hover)? I feel like I'm lacking a basic understanding of how this private hosting works, so details would be appreciated.
How to get security profile of AWS Connect user outside of the application?
I am working on building a call center application using the AWS Connect Streams API and AWS-SDK. I want to add a feature that is only accessible to User/Agent who are of "Admin" Security Profile. The feature is going to create a table in DynamoDB. I know I can control the access to the DynamoDB but if there is a way to know or get the security profile of the user, I can use it for many other authentications.
Streams API I am talking about- https://github.com/aws/amazon-connect-streams/blob/master/Documentation.md
DNS A Record not pointing to website IP
I am having an AWS EC2 instance running Wordpress on 184.108.40.206
I pointed my domain (timespade.com) to the particular IP address, but the same is resulting in an error. The IP address is working fine. I have attached the screenshots of my A Name and C Name records. Kindly help me with the same. Would mean a lot! Thank you :) [Website not loading] [A Record] [C Record] : https://i.stack.imgur.com/1HWfh.png : https://i.stack.imgur.com/NPoZR.png : https://i.stack.imgur.com/EaM3E.png
Combining wget and aws s3 cp to upload data to S3 without saving locally
I have a url that points to a file (.tif) and would like to upload the file to Amazon S3. I currently download the file to an EC2 instance using
wgetand then upload to an S3 bucket using
aws s3 cpin linux command line. I was wondering if you could directly pipe (not sure about correct nomenclature) the file to S3 without saving to the EC2 instance first.
Multipart upload using boto3
I am following below doc for multipart upload using boto3, but not able to perform the same. can you walk me through concept and syntax for same?
While downloading a folder contents from Amazon S3 using boto3, only some files get downloaded and for others, i get the following exception :
File "C:\Program Files\Python36\lib\site-packages\boto3\s3\inject.py", line 130, in download_file extra_args=ExtraArgs, callback=Callback) File "C:\Program Files\Python36\lib\site-packages\boto3\s3\transfer.py", line 307, in download_file future.result() File "C:\Program Files\Python36\lib\site-packages\s3transfer\futures.py", line 73, in result return self._coordinator.result() File "C:\Program Files\Python36\lib\site-packages\s3transfer\futures.py", line 233, in result raise self._exception File "C:\Program Files\Python36\lib\site-packages\s3transfer\tasks.py", line 255, in _main self._submit(transfer_future=transfer_future, **kwargs) File "C:\Program Files\Python36\lib\site-packages\s3transfer\download.py", line 353, in _submit **transfer_future.meta.call_args.extra_args File "C:\Program Files\Python36\lib\site-packages\botocore\client.py", line 324, in _api_call return self._make_api_call(operation_name, kwargs) File "C:\Program Files\Python36\lib\site-packages\botocore\client.py", line 622, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (404) when calling the HeadObject operation: Not Found
Why am i getting this exception only for some files? i've a S3 folder (/test/files/) with 25 files (A1.tmp, A2.tmp etc .... A25.tmp). only 2 files (A5.tmp, A6.tmp) are getting downloaded. Could anyone please suggest a solution for this? any help is appreciated.
How to fetch all items of a particular Attribute from an AWS DynamoDB Table using Python boto3?
I am pretty new to AWS Dynamodb. I am using python's boto3 to fetch all items of a particular attribute (say, Attribute name is 'Name') from the dynamodb table.
Although there are other attributes too in the table like 'Email', 'Profession'. I need to fetch or get all items only of the attribute 'Name'. My Name attribute consists of four items : Nick, John, Gary, Jules. How can I fetch this using boto3 ? I tried with client.query method of boto3 but I am not sure if it works.