By default, the permissions are set to read. Make sure to check the permissions for your Twitter App. Once that is set up, we can grab our keys and tokens so and start accessing Twitter through the API library. You need to provide information about the app and a website if the app is going to be attached to one. There is some information required for setting up an app. Here we can click the top right to create a new app. Once we get the developer account set up we can head to the Apps portal. If you have not, check this out on how to get started. We are assuming here that you have already set up a developer account with Twitter. If you go to Twitter’s Developer portal you can head to the dashboard and set up a new app. For our purposes, we can still use the free tier. Rebuilt from the ground up they also overhauled their pricing. In 2020 however, they began rolling out v2. The Twitter API has been in v1.1 since 2016. This Twitter bot is a quote regurgitation service so there is very little chance of it ever exceeding any of that. After which you pay $0.20 per additional million requests The first 400,000 GB seconds are also free and $0.0000166667 for every GB second after that. Lambda’s free services are also a great use case because the first 1 million requests per month are free. I can simply set a schedule and create the bot and Lambda starts up, runs my function, and powers down. With Lambda I do not need to spin up an EC2 or a local VM instance and continually run my bot. I realized this is uniquely appropriate for things like a regularly scheduled Twitter bot. With which you can create functions and triggers to start those functions and Lambda runs your code without having to provision a server. Lambda is a compute service for running code on the cloud. Let’s see how much easier still I can make this using AWS Lambda. I am all for anything which makes my job easier. Their API makes it easy to interface with and there are thousands of libraries that utilize this API. One project I have been wanting to get into is a Twitter bot using a new language I have been learning, Go. It’s hard to get your bearings with something as huge as AWS so for my learning journey I decided to focus on projects I thought would be cool and see how AWS might help facilitate what I build. So far it has been an enlightening deep dive into the different services they offer. Recently I have begun the process of becoming one of those people. Most people have heard of AWS and developers have started learning how they can use it to further augment the quality of their projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |