AWS Bites
AWS Bites
  • 156
  • 112 113
139. Building Great APIs with Powertools
In this episode, we discuss using AWS Lambda Powertools for Python to build serverless REST APIs with AWS Lambda. We cover the benefits of using Powertools for routing, validation, OpenAPI support, and more. Powertools provides an excellent framework for building APIs while maintaining Lambda best practices.
💰 SPONSOR 💰
AWS Bites is proudly brought to you by fourTheorem, an AWS Consulting Partner dedicated to helping you and your team deliver successful projects on AWS. With a sharp focus on performance and cost optimization, we’re here to ensure your cloud journey is smooth and efficient. If you’re searching for a trusted partner to bring your AWS projects to life, visit us at fourTheorem.com and let’s work together to make your vision a reality!
🔖 Chapters:
00:00 Introduction and overview of popular Python web frameworks
02:49 Overview of AWS Lambda Powertools for Python
07:44 Key features needed in an API framework
14:20 Validation and parsing with Pydantic
16:51 Using Powertools with monolithic vs. single-purpose Lambdas
20:32 Local development with PowerTools
22:11 Status of REST API support in other Powertools languages
In this episode, we mentioned the following resources:
1. AWS Bites 41. How can Middy make writing Lambda functions easier? - awsbites.com/41-how-can-middy-make-writing-lambda-functions-easier
2 .AWS Bites 120. Lambda Best Practices - awsbites.com/120-lambda-best-practices/
3. REST API - Powertools for AWS Lambda (Python) - docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/
4. Hono - hono.dev/
5. Fastify - fastify.dev/
6. Axum - github.com/tokio-rs/axum
7. FastAPI - fastapi.tiangolo.com/
You can listen to AWS Bites wherever you get your podcasts:
- Apple Podcasts: podcasts.apple.com/us/podcast/aws-bites/id1585489017
- Spotify: open.spotify.com/show/3Lh7PzqBFV6yt5WsTAmO5q
- Google: podcasts.google.com/feed/aHR0cHM6Ly9hbmNob3IuZm0vcy82YTMzMTJhMC9wb2RjYXN0L3Jzcw==
- Breaker: www.breaker.audio/aws-bites
- RSS: ​​anchor.fm/s/6a3312a0/podcast/rss
Do you have any AWS questions you would like us to address?
Leave a comment here or connect with us on BlueSky or LinkedIn:
- bsky.app/profile/eoin.sh | www.linkedin.com/in/eoins/
- bsky.app/profile/loige.co | www.linkedin.com/in/lucianomammino/
#aws #lambda #powertools #api #rest
Переглядів: 4

Відео

138. How Do You Become A Cloud Architect?
Переглядів 38921 день тому
Ready to take your tech career to the cloud and build those awe-inspiring systems you see? Then you're in the right place. This episode of AWS Bites is your blueprint for becoming a successful cloud architect. We're not just going to talk about it; we'll show you what worked for us, sharing the critical skills you need, and a practical path to build your expertise. Whether you're a beginner or ...
137. Transit Gateway Explained
Переглядів 392Місяць тому
In this episode, David Lynam provides an overview of AWS Transit Gateway, which aims to simplify complex network connectivity between VPCs, VPNs, and on-premises networks. We discuss the limitations of using VPC peering and the benefits Transit Gateway provides through its hub-and-spoke model. The main components of Transit Gateway are explained, including attachments, route tables, association...
136. 20 Amazing New AWS Features
Переглядів 4492 місяці тому
In this pre-re:Invent 2024 episode, Luciano and Eoin discuss some of their favorite recent AWS announcements, including improvements to AWS Step Functions, Lambda runtime updates, DynamoDB price reductions, ALB header injection, Cognito enhancements, VPC public access blocking, and more. They share their thoughts on the implications of these new capabilities and look forward to seeing what else...
135. Serverless is making a comeback where you least expect it
Переглядів 2992 місяці тому
In this episode, we discuss the pros and cons of using serverless architecture in enterprise companies. We cover topics like cost, complexity, security, ability to evolve architecture, and more. Overall, we find that serverless can provide benefits like reduced operational costs, improved developer productivity, and increased focus on core business logic for larger companies. AWS Bites is broug...
134. Eliminate the IAM User
Переглядів 3732 місяці тому
In this episode, we discuss why IAM users and long-lived credentials are dangerous and should be avoided. We share war stories of compromised credentials and overprivileged access. We then explore solutions like centralizing IAM users, using tools like AWS Vault for temporary credentials, integrating with AWS SSO, and fully eliminating IAM users when possible. 💰 SPONSORS 💰 AWS Bites is brought ...
133. Building Businesses in the Cloud with Fiona McKenna
Переглядів 2383 місяці тому
In this special episode of AWS Bites, Eoin is joined by Fiona McKenna, co-founder and CFO of fourTheorem, to discuss startup advice, hiring and growing teams, creating an environment for success, and managing cloud costs. They cover important themes around people, culture, leadership, and finance from Fiona's extensive experience in the tech industry. 💰 SPONSORS 💰 AWS Bites is sponsored by four...
132. GitHub Action Runners on AWS
Переглядів 5163 місяці тому
We give an overview of GitHub Action Runners and discussed the benefits of using self-hosted runners on AWS. We covered options including EC2 and CodeBuild for running GitHub Actions, compared pricing across solutions, and shared our hands-on experience setting things up. Overall, using AWS services can provide more control, lower latency, and cost optimization compared to GitHub hosted runners...
131. What do you do about CloudFormation Drift?
Переглядів 2234 місяці тому
In this episode, we discuss the concept of CloudFormation drift, what causes it, how to detect it, and strategies for resolving it. We explain that drift happens when the actual state of resources diverges from what is defined in the CloudFormation templates. Common causes include manual changes, third party tools, mixing IaC solutions, and automation. We then cover built-in drift detection in ...
130. Growing in Tech with Farrah Campbell
Переглядів 2574 місяці тому
In this episode, we had the pleasure to interview Farrah Campbell, head of modern compute community at AWS, prolific speaker, and former AWS Hero. We discussed Farrah's career journey from healthcare into tech, tips on public speaking, dealing with imposter syndrome, the pace of innovation in the cloud, and predictions for the future. Farrah shared personal stories and advice for getting starte...
129. Lambda Provisioned Concurrency
Переглядів 4115 місяців тому
In this episode, we discuss AWS Lambda provisioned concurrency. We start with a recap of Lambda cold starts and the different concurrency control options. We then explain how provisioned concurrency works to initialize execution environments in advance to avoid cold starts. We cover how to enable it, pricing details, common issues like over/under-provisioning, and alternatives like self-warming...
128. Writing a book about Rust & Lambda
Переглядів 3686 місяців тому
In this episode, we discuss Luciano's new book project on using Rust to write AWS Lambda functions. We start with a recap on why Rust is a good fit for Lambda, including performance, efficiency, safety, and low cold start times. Luciano provides details on the book's progress so far, the intended audience, and the current published chapters covering Lambda internals, getting started with Rust L...
127. Which Load Balancer should you use?
Переглядів 4616 місяців тому
An overview of load balancers, explaining how they distribute traffic across multiple servers and provide high availability. We discuss layer 4 and layer 7 load balancers, detailing their pros and cons. We then focus on AWS load balancers, covering network load balancers and application load balancers in depth, including their features, use cases, and pricing models. We conclude by mentioning s...
126. Bastion Containers
Переглядів 2617 місяців тому
This episode discusses solutions for securely accessing private VPC resources for debugging and troubleshooting. We cover traditional approaches like bastion hosts and VPNs and newer solutions using containers and AWS services like Fargate, ECS, and SSM. We explain how to set up a Fargate task with a container image with the necessary tools, enable ECS integration with SSM, and use SSM to start...
125. A first look at CloudFront Hosting Toolkit
Переглядів 3777 місяців тому
In this episode, we discuss the newly announced CloudFront Hosting Toolkit from AWS. We provide an overview of the tool, which aims to simplify deploying modern front-end applications to AWS while retaining infrastructure control. We discuss the current capabilities and limitations and share our hands-on experiences trying out the tool. We also talk about alternatives like Vercel and Amplify, a...
124. S3 Performance
Переглядів 3838 місяців тому
124. S3 Performance
123. What do you need to know about DynamoDB?
Переглядів 6598 місяців тому
123. What do you need to know about DynamoDB?
122. Amazing Databases with Aurora
Переглядів 4298 місяців тому
122. Amazing Databases with Aurora
121. 5 Ways to extend CloudFormation
Переглядів 3569 місяців тому
121. 5 Ways to extend CloudFormation
120. Lambda Best Practices
Переглядів 9679 місяців тому
120. Lambda Best Practices
119. The state of AWS 2024 (AnsWeRS community survey commentary)
Переглядів 37710 місяців тому
119. The state of AWS 2024 (AnsWeRS community survey commentary)
118. The landing zone: Managing multiple AWS accounts
Переглядів 57110 місяців тому
118. The landing zone: Managing multiple AWS accounts
117. What do EBS and a jellyfish have in common?
Переглядів 16710 місяців тому
117. What do EBS and a jellyfish have in common?
116. What is RAM (Resource Access Manager)?
Переглядів 39211 місяців тому
116. What is RAM (Resource Access Manager)?
115. What can you do with Permissions Boundaries?
Переглядів 23611 місяців тому
115. What can you do with Permissions Boundaries?
114. What's up with LLRT, AWS' new Lambda Runtime?
Переглядів 39211 місяців тому
114. What's up with LLRT, AWS' new Lambda Runtime?
113. How do you revoke leaked credentials?
Переглядів 16911 місяців тому
113. How do you revoke leaked credentials?
112. What is a Service Control Policy (SCP)?
Переглядів 80311 місяців тому
112. What is a Service Control Policy (SCP)?
111. How we run a Cloud Consulting business
Переглядів 1,2 тис.Рік тому
111. How we run a Cloud Consulting business
110. Why should you use Lambda for Machine Learning?
Переглядів 397Рік тому
110. Why should you use Lambda for Machine Learning?

КОМЕНТАРІ

  • @ADITYACHEBROLU
    @ADITYACHEBROLU 7 днів тому

    Great content!

  • @nathanielsackey6959
    @nathanielsackey6959 8 днів тому

    Top Top proper stuff really enjoyed the just tow guys having a conversation on their tools , very engaging and good content.

  • @no_I_dont_my_real_name_on_yt
    @no_I_dont_my_real_name_on_yt 22 дні тому

    the music is a little too loud there

  • @JsDev9590
    @JsDev9590 Місяць тому

    I have millions of records per hour to be processed. Out of SNS, Eventbridge and Kinesis what can be used? All these services can be used with multiple consumers...so please suggest which service to use in this case

  • @Loige
    @Loige Місяць тому

    Epic episode (and cover art ❤)

  • @RDarrylR
    @RDarrylR 2 місяці тому

    A great talk guys! Thanks for sharing your thoughts.

  • @viacheslav5574
    @viacheslav5574 2 місяці тому

    No, you don't need all of this. You can run everything on $5 VPC and Lavarel 😂

    • @eoinsha
      @eoinsha 2 місяці тому

      😁 You sure can!

  • @TheBikerDude2024
    @TheBikerDude2024 2 місяці тому

    Great content. Thanks.

  • @sarwankumar5339
    @sarwankumar5339 2 місяці тому

    I really liked this deep dive video. keep it up.

  • @ahmadnazriabdullah8656
    @ahmadnazriabdullah8656 2 місяці тому

    This video is literally useless. Why not share the screen?

  • @vukkumsp
    @vukkumsp 2 місяці тому

    Very interesting, I didn't know Lambda can also be published and shared. It makes sense to reuse instead building for ourselves.

  • @colillo9939
    @colillo9939 3 місяці тому

    Gracias lucho y eoin por la info!

  • @Zimi.M
    @Zimi.M 3 місяці тому

    Thank you so much for this, super super valuable.

  • @sreechalasani9268
    @sreechalasani9268 3 місяці тому

    Great video. I really like the real-life example provided with identity being used to authorize the write to firehose. Would have been great if everything else was also backed with an example. Could you redo this video with more example scenarios

  • @Nick-yd3rc
    @Nick-yd3rc 3 місяці тому

    Oh the same mantra of: old monoliths bad, new microservices good but scary to software engineers, and GenAI taking over everyone’s work, making software engineers even more frightened, and the CFOs still not getting the Cloud pricing models, with Black Friday being just the spike and the rest of the time hardware sitting idle. You know, that playbook is outdated. There’s so much nuance that came out of the interactions with the Cloud infrastructure and pricing models that this video isn’t even trying to scratch the surface of. We’ve been running on AWS for over a decade, but not for the reasons stated in this interview.

  • @SonOfSofaman
    @SonOfSofaman 3 місяці тому

    Another great thumbnail 😁 Oh and the episode is good, too. img.ua-cam.com/users/viRSV0VDBPRGU/maxresdefault.jpg

  • @amardeep.sahota
    @amardeep.sahota 3 місяці тому

    If you have kubernetes already running then you can also look at the kubernetes based GitHub runners along with KEDA for autoscaling. Beware of DIND limitations.

  • @cheet00
    @cheet00 4 місяці тому

    I just found you guys, I content was very useful. Please keep it up. You guys gained a new sub.

  • @SonOfSofaman
    @SonOfSofaman 4 місяці тому

    Another great episode of useful material, and another great UA-cam thumbnail. Someone is having a lot of fun with those.

  • @f1aziz
    @f1aziz 5 місяців тому

    I have been using Python with Cloudformation for few years and I have been pretty happy with the experience. Easier to write code, unit tests and ship libraries using SAM cli.

  • @tsumita777
    @tsumita777 5 місяців тому

    Awesome content! Thanks!

  • @marekkucak6581
    @marekkucak6581 6 місяців тому

    This combo always appeared natural, fast and cheap but there was not many sources on the topic.

    • @Loige
      @Loige 6 місяців тому

      Indeed! That's one of the reasons why we thought about writing a book. Hopefully it will become a good resource to get started with this powerful combo. Have you tried yourself to write some Lambda functions in Rust? I'd love to hear about your experience if you did!

  • @jhonsen9842
    @jhonsen9842 6 місяців тому

    What about Golang

  • @probably_crater
    @probably_crater 6 місяців тому

    was this before the AWS CDK?

    • @AWSBites
      @AWSBites 3 місяці тому

      We mention CDK in the episode but the topic is on comparing the two declarative options

  • @gabrieldash721
    @gabrieldash721 7 місяців тому

    How about free tiers, all new account have it’s own “free tier”?

  • @vigilanteer
    @vigilanteer 7 місяців тому

    Amazing! I do have a question though. Many people say that cloudwatch is one of the most expensive AWS services. I understand that cloud cost optimization can help... but many just go towards open source tools like OpenSearch (ElasticSearch) or Prometheus... because you don't have pay that much as cloudwatch..??? really don't understand what they are trying to say to be honest.

  • @sahebjotsingh6306
    @sahebjotsingh6306 7 місяців тому

    great episode!

  • @reynerloza1630
    @reynerloza1630 7 місяців тому

    for app config, if you have cold start lambdas you would pay cost per request received for each one one right? which is 0.0008, so if I have 40 lambdas, every time they are loaded will be 40*0.0008, let's say every 15 min my lambdas are loaded, so in 24 hrs will be 3 dolars, and one month, 90 dolars. I think it make senses to use app config if you have a very active application for all the lambdas

  • @SonOfSofaman
    @SonOfSofaman 7 місяців тому

    Thanks for covering this topic. It's good to learn about new options, otherwise I just keep using what I already know. I'm looking forward to seeing how CFHT evolves.

  • @alansnyder8448
    @alansnyder8448 7 місяців тому

    I'm a big fan of DynamoDB's scalability, especially since I've been at startups where SQL databases failed when our prototype took off and we suddenly had a surge of users. It nearly killed one startup. That said, if the access pattern becomes too complex, you need to combine DynamoDB with something else, like an SQL database. I attempted a "single table design" once. It was challenging enough that I locked myself in a conference room with whiteboards to map it all out. By the end of the day, I had it figured out and started writing it up. The next morning, my boss added a last-minute feature that required a new access pattern, causing the entire single table design to collapse like a house of cards. I haven't attempted such a design since. Now, when I use DynamoDB, it's for simple use cases with a primary key and sort key (like a timestamp). If it gets more complicated, I'll combine it with an SQL database that might have DynamoDB keys for the large datasets. I'd like to at some point work with a network database like Neo4J or AWS's Neptune, but haven't found a case for it yet. I might invent a personal project just so I can have a reason to try it out.

  • @SandwichStorePlay
    @SandwichStorePlay 7 місяців тому

    thank u.

  • @thomaspsteven
    @thomaspsteven 8 місяців тому

    This thumbnail is incredible

    • @Loige
      @Loige 8 місяців тому

      Eoin is really fast IRL! ⚡⚡

  • @uzair004
    @uzair004 8 місяців тому

    I don't know who needs to hear this but I have been using dynamodb as primary db in one project and it is total pain in the rear to design db (access patterns and data modeling) for application with a mobile application and dashboard. No matter how much effort you put in, there will be a point where your existing patterns won't be enough and there no easy way to support new ones.

  • @Loige
    @Loige 8 місяців тому

    In this episode, we mentioned that you could use a user email as a primary key in DynamoDB. This can work but from a compliance/security/privacy perspective it might a bit of a problem. So in these cases, if you don't have other unique identifiers for the user, you could use a hash of the user email instead (e.g. md5 or sha).

  • @lashlarue7924
    @lashlarue7924 9 місяців тому

    good video, I'm basically still lost though 😮‍💨

  • @ALi-s5t2r
    @ALi-s5t2r 9 місяців тому

    OpenAI could understand the speech of the Italia guy? Alora!!

  • @My50c
    @My50c 10 місяців тому

    Thanks for the mention 👍

  • @devopmh
    @devopmh 10 місяців тому

    the thing I appreciate a lot is the fact both of you always share the great resource that serves as a foundation of your speech, thanks for always sharing great content

  • @trishul_bawankar
    @trishul_bawankar 10 місяців тому

    Good one! :)

  • @alansnyder8448
    @alansnyder8448 10 місяців тому

    I got really good at CloudFormation. I wouldn't say I liked it, but felt it got the job done. Moving now to CDK (prefer Python) in the same language the project is using. Also: A show about DynamoDB single table design would be interesting to me.

    • @AWSBites
      @AWSBites 10 місяців тому

      Do you expect any drawbacks with CDK or is it all positive? Best of luck with the move!

  •  10 місяців тому

    Very informative episode. ADF (Amazon Deployment Framework) is another interesting framework for creating and managing accounts. It has drawbacks (like not using CKD v1 and being released slowly) but can be integrated with Control Tower and you can define and create pipelines in the CICD account.

    • @AWSBites
      @AWSBites 10 місяців тому

      Great addition, thanks! We haven't come across ADF in the wild but we'll definitely keep an eye on its progress.

  • @SonOfSofaman
    @SonOfSofaman 10 місяців тому

    Another great episode, as always. Thanks for sharing your knowledge. You mentioned using email aliases (using "plus" notation) to satisfy the distinct email address requirement for each account. It occurred to me that if the inbox to which all the aliases are associated were compromised, an attacker would have a list of every account in the org including each account's unique email address. Enabling MFA on every account is a no-brainer, and ideally the email inbox should have MFA enabled as well, but it does feel like putting all your eggs in one basket. Maintaining multiple distinct email inboxes is certainly a lot of work, but maybe it's worth it? Or is MFA sufficient protection?

    • @AWSBites
      @AWSBites 10 місяців тому

      Good question! Like you say, root account MFA is essential. I guess if the management account root email was compromised, you'd be in a similar situation anyway. I would go for the simplicity of email aliases. It's very difficult to do account creation automation (Account Factory) and enforce a unique primary email inbox for each account.

  • @larryhenderson8625
    @larryhenderson8625 10 місяців тому

    *Promosm* ❣️

  • @emanuelegurini
    @emanuelegurini 10 місяців тому

  • @emanuelegurini
    @emanuelegurini 10 місяців тому

  • @RamkumarSethuraman-f8b
    @RamkumarSethuraman-f8b 11 місяців тому

    Excellent explanation

    • @AWSBites
      @AWSBites 10 місяців тому

      Glad it was helpful!

  • @iraqiq
    @iraqiq 11 місяців тому

    Great walk through and totally agree with the recommendation. Thank you 👍

    • @AWSBites
      @AWSBites 10 місяців тому

      No problem 👍

  • @chrizzking
    @chrizzking 11 місяців тому

    Straight to the point and very good explanation. Thx for sharing

    • @AWSBites
      @AWSBites 10 місяців тому

      Thank you for the comment :)