18
AWS Lambda Ping Sen & Tas Emine [5min] [email protected] & [email protected] 27/02/19

AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] [email protected] & [email protected] 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

AWS Lambda PingSen&TasEmine[5min]

[email protected]&[email protected]/02/19

Page 2: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Sommaire • Introduction• Développement• FonctionLambda• Casd’utilisation• Démonstration• Payement• Conclusion

Page 3: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Introduction (1) Qu’est-ceAWS?

•  AmazonWebServiceestuneplateforme

Pourquoinommé«Lambda»?•  Àcausedelafonctionlambda

Qu’offre-t-il?•  Serviceinformatique•  Exécutiondecodelorsquenécessaireetadaptable•  Payementuniquementdutempsdecalcul•  Pourn’importequeltyped’applicationouservicebackend•  Infrastructuredecalculàhautedisponibilité•  Langagescompatibles:Node.js,Java,C#,Go&Python•  Responsabilitéducodeuniquement

Page 4: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Introduction (2) Commentontévoluélesserveurs?

<1990 1990-2000 2010 2013 Maintenant

Page 5: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

AWS Lambda

• AWSLambdaestunserviceinformatique•  Functionasaservice(Faas)• Paradigmedeprogrammationévénementielle

Page 6: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Serverless •  Infrastructure•  Toléranceauxpannes•  Maintenance•  Dimensionnement•  Miseàl’échelle

Page 7: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Développement d’une application basée sur AWS (1)

• CréationdecodepourlafonctionLambda•  Dansleslangagesprisencharge•  Avecdesoutilsfournis

• Déploiement:ImportationdecodeetcréationdefonctionLambda•  Créationd'unpackagededéploiement–Organisationducodeetdesdépendances•  Chargementd'unpackagededéploiement–Créationd'unefonctionLambda•  Testd'unefonctionLambda

•  Surveillanceetdépannage•  Surveillanceautomatique•  MétriqueviaAmazonCloudWatch•  Aideàlarésolutiondeproblèmesvialog

Page 8: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Développement d’une application basée sur AWS (2)

Page 9: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Fonction Lambda Qu’est-cequec’est?•  Code•  Dépendances(librairies,modules,…)•  Configuration

Commentest-il?•  Ready•  Stateless

Page 10: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Comparaison

FonctionLambda Fonction

Maintenance Automatique Manuelle

Scalabilité Automatique Manuelle

Opération Automatique Manuelle

Exécution Déclenchement Enattente

Design&implémentation

Règle Libre

Etats Stateless Stateless/Statefull

Prix Variable Fixe

Page 11: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Comment exécuter un Lambda ?

Page 12: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Exemples d'utilisation d'AWS Lambda

• Utilisationd'AWSLambdaaveclesservicesAWSentantquesourcesd'événements• AppeldelafonctionLambdaàlademandeviaHTTPS(AmazonAPIGateway)• AppeldelafonctionLambdaàlademande(créationdevospropressourcesd'événementsàl'aided'applicationspersonnalisées)•  Événementsplanifiés

Page 13: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Cas d’utilisation

Page 14: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Démonstration

Page 15: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Payements Qu’enest-ildescoûts?•  Croiserlenombrederequêtesmensuellesetladuréed’exécutiondecelles-ci

Exemple•  Unefonction,alloue128Mb,exécuté30millionsdefois,lancépendant200msàchaquefois:•  Chargedecalcul:5,83$•  Chargederequête:5,80$•  Chargetotale(mois):11,63$

Page 16: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Conclusion

Avantages:

Désavantages:

•  Plusdepréoccupationpourl’infrastructure

•  Scalabilité•  Serverless•  Architectureorientéeévénements•  Payement•  Sécurité

•  TechnologieServerlessnonstandardisée

•  Dépendancedusystèmed’apitiers•  Intégrationcontinue

Page 17: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité
Page 18: AWS Lambda · 2020-05-28 · AWS Lambda Ping Sen & Tas Emine [5min] ping.sen@hotmail.com & tas.emine@outlook.be 27/02/19. Sommaire • Introduction ... , Go & Python • Responsabilité

Crédits •  https://aws.amazon.com/blogs/compute/resize-images-on-the-fly-with-amazon-s3-aws-lambda-and-amazon-api-gateway/•  https://docs.aws.amazon.com/fr_fr/lambda/latest/dg/welcome.html•  https://aws.amazon.com/fr/lambda/•  https://whatis.techtarget.com/definition/event-driven-computing•  https://www.slideshare.net/AmazonWebServices/deep-dive-on-aws-lambda•  https://www.slideshare.net/AmazonWebServices/intro-to-aws-lambda-london-loft•  https://aws.amazon.com/fr/lambda/features/•  https://www.contino.io/files/Contino-Introduction-to-Serverless-Computing-with-AWS-Lambda.pdf