Introduction
This spring, I sat in a lockdown in the Bahamas, without the right to go ashore, and, fighting boredom, decided to see what kind of beast Amazon Web Services was, and yes, I was gone. It happened, as they say, love at first sight. One of the technologies that got me drunk as well as Bahamian rum was serverless computing.
- , , , , , -, . , .
. - . , , , .
, «» , 2015 . – ? , Budweiser - . – . , . . . , , , AWS Billing Alert.
, , , , -. , , «Hello World» , !
:
- AWS S3;
- AWS Cognito User Pool;
- API API Gateway Lambda Function;
- NoSQL DynamoDB.
AWS S3
AWS S3 – , , , . Mail.ru, , – Simple Object Storage AWS S3 API.
S3 – - . CSS, JavaScript HTML «Static Web Hosting». «». HTTP . , -. . , «Hello World» SSL, , , , .
CloudFront, , 1/6 . edge location, . . , , , .
SSL Certificate Manager CloudFront , HTTPS, CloudFront edge location AWS . S3 . , SSE-KMS SSL Lambda@Edge edge location. .
CloudFront DNS Route 53, , CloudFront.
Cognito User Pool
– , - . Amazon Cognito , SAML OpenID Connect, (Facebook, Twitter, Amazon) .
- ;
- Cognito User Pool ;
- Cognito User Pool ;
- .
Cognito SDK JavaScript. . , , Cognito Hosted UI, , , MFA SAML. , , , , . , …
— OpenID Connect, . , , .
API Gateway Lambda Function
API Gateway – HTTP, Rest API Web Socket. GET Lambda . , Authorizer . CORS, , , Lambda proxy API HTTP . boto3 AWS, .
, EC2. , - 10 - .
NoSQL DynamoDB
, DynamoDB : id = UUID identifier; Text = «Hello World».
:
- -;
Route 53 CloudFront edge location; - CloudFront ;
- JavaScript , ;
- Cogito User Pool ;
- API Gateway, ;
- Lambda ;
- , JavaScript .
- . , . , , . , ?
AWS « ». 3 , . , , AWS Pricing Calculator.
, :
S 3
- – 5 Gb.
- – $0,02 Gb .
- — $0,09 Gb
- PUT, GET — $0,005 1000
CloudFront
- – 50 Gb , AWS ;
- – $0,08 Gb, CloudFront , S3;
- , IP , .
Cognito User Pool
- – 50 MAU ( ) Cognito User Pool 50 MAU , SAML;
- — $0,005 MAU;
- SMS .
API Gateway
- – 1 ;
- — $3,5 1 .
Lambda
- – 1 , 400 - ( . )
- — $0,0000166667 -.
:
– 100 . 2. 50 «Hello World» , . CloudWatch Logs Insights , .
DynamoDB
DynamoDB . – , 1-4-8 .
- – ;
- RCU () – $0,25 1 ;
- WCU () – $1,25 1 ;
- (-, ), ;
- .
In our test application, we fit into the free tier with the exception of the DynamoDB table. Its existence came to us in a round sum of $ 0.59 per month, which is quite acceptable at the current dollar rate.
So we have at our disposal an excellent tool that allows us to realize almost any fantasy practically for free.
Winter will be long and cold - it's time to start creating in the cloud.