I am using Boto3 resource to send push notification to iOS devices.
It is working fine but issue is that I am not able to show badge count on the iOS App and also not able to pass any value for sound effect for new notifications.
What should be added here to have sound effect for new notifications and also for badge count (count for unread notifications) on the installed APP icon?
Thank you Russell. didn't know lambda could be executed in all regions by configuring regions. gonna help me reduce the time to spend on making lambda function in every region!!
Hi all
Cool and helpful article.
Now I'm trying to dive a little deeper
The task is how to use region_name as list of defined regions.
For example, find all instances across AWS with specific tag.
Very nice thanks!!
can anyone chime in how to do this on a one liner instead of 2 lines?
boto3.setup_default_session(profile_name='account1')
boto3.setup_default_session(region_name='eu-west-2')
hi...i am trying to access a lambda function which is in eu-west-1 using api gateway.the api gateway , i dont know how created in us-east-1...how should i solve this?I cannot able to create api in the same region as lambda fn
Thanks!
Thanks a lot buddy for this basic yet important lesson.
Python 3 picks up the IAM role and other stuff on its own, however I faced challenges with Python 2.
Great Information ! This is what I was looking for !! Thank you !
Awesome !! Exactly the info that was needed !
If I use aws configure to configure the details, do I still need to pass the region explicitly?
You can set a default region in the aws config (.aws/config) for your profile.
Then instead of passing a region, you can pass a profile name.
Here is a class I wrote to manage boto connections:
In it you can see how I get the default region from the profile.
I am using Boto3 resource to send push notification to iOS devices.
It is working fine but issue is that I am not able to show badge count on the iOS App and also not able to pass any value for sound effect for new notifications.
My code below:
What should be added here to have sound effect for new notifications and also for badge count (count for unread notifications) on the installed APP icon?
Sorry I don't use this part of the API so I can't help. Hopefully somebody else can chime in.
Otherwise, I would ask AWS support or the Boto3 github issue tracker.
Thanks, It helped me to set my 'ses' region to eu-west-1 since aws has no ses in ap-southeast
Your welcome! Great use case.
Thank u so much!
You are welcome!
totally helped me out today! I looked at boto docs first and couldn't figure it out
You are very welcome!
Thanks dude! Was wondering why the
AWS_REGIONenv variable wasn't being honored and couldn't use a boto config.Cool, yeah, I stopped using ENV vars and either use flags or I use the
~/.aws/configwith profiles.A related option, when in ec2, assuming you want to connect to whatever region the ec2 instance is running in (thus the region isn't hard coded):
Thank you Russell. didn't know lambda could be executed in all regions by configuring regions. gonna help me reduce the time to spend on making lambda function in every region!!
Yeah, makes perfect sense if you want to maintain the same lambda script in multiple regions, iterate over all regions and upload latest.
How to pass aws_access_key_id,aws_secret_access_key,region in client I am working on elb please help
I had to search the whole internet to find such a simple answer that how can i pass the aws credential on boto3 resource. Saved my day man!!!
Hi, when I use:
It raises:
What should I do?
Hi, this error message means
boto3didn't find API credentials. To fix this you need to either setup:A profile in your aws config file (typically located in
~/.aws/config)Environment vars:
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYCheck out my quickstart for the botoform project here for more details.
Thank you so much. It helps me.
Thanks for this post. I did not know that Lambda function in US region can access resource in Asia region like this...
Thank you :)
Thanks, this was great!
Thank you for sharing. Nicely presented. This Saved me.
Thanks Russell.
Very helpful!! :D
Hi all Cool and helpful article. Now I'm trying to dive a little deeper The task is how to use region_name as list of defined regions. For example, find all instances across AWS with specific tag.
You might be able to steal some code from a tool I wrote called atmosphere.
It loops over all AWS profiles, over all regions for each profile, and does some look ups.
Thanks, it helped.
Hi, I would like to pass region input as variable interactively. Like how python get it as raw_input() So, how do I do that in boto3
I prefer to use flags than interactive prompts. That said, this totally works:
Thanks Russell..!!
Hey Buddy, you made my 1 week work resolved. Thanks. AWS document keeps you busy reading, till you die or finish their document.
Welcome.
Thanks!
Welcome!
thanks!
Very nice thanks!! can anyone chime in how to do this on a one liner instead of 2 lines? boto3.setup_default_session(profile_name='account1') boto3.setup_default_session(region_name='eu-west-2')
hi...i am trying to access a lambda function which is in eu-west-1 using api gateway.the api gateway , i dont know how created in us-east-1...how should i solve this?I cannot able to create api in the same region as lambda fn
This is great, just what I was looking for, do you know of a way to find which specific instances of services/resources are using which using roles?
I'm trying to write a little program that will audit our role usage based on the instances of EC2 and other services using the roles.
Thanks!!!!