Corley cloud angular in cloud
-
Upload
corley-srl -
Category
Engineering
-
view
539 -
download
6
Transcript of Corley cloud angular in cloud
![Page 1: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/1.jpg)
AngularJSon Cloud
AngularConf 2015
![Page 2: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/2.jpg)
Who am I?Gianluca Arbezzano
@gianarb
![Page 3: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/3.jpg)
I'm here to protect you
![Page 4: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/4.jpg)
Software Engineer @CorleyCloud
![Page 5: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/5.jpg)
When you think "Infrastructure"
![Page 6: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/6.jpg)
![Page 7: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/7.jpg)
Think of word without SysAdmin
![Page 8: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/8.jpg)
Great!
![Page 9: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/9.jpg)
![Page 10: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/10.jpg)
The mission:
build an application managed byAWS
to avoid sysadmin
![Page 11: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/11.jpg)
![Page 12: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/12.jpg)
Security Issues
Without servers where do you store private credentials?
![Page 13: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/13.jpg)
Cognito identity
Helps your client app to manage authentication and it opens the doors of AWS world
![Page 14: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/14.jpg)
![Page 15: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/15.jpg)
in AngularJS// app/app.js.config([function() var creds = new AWS.CognitoIdentityCredentials( IdentityPoolId: 'useast1:0000000000000008c3c5397a17ad174' ); AWS.config.update( region: 'useast1', credentials: creds );]);
![Page 17: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/17.jpg)
![Page 18: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/18.jpg)
in AngularJS.directive('googleSignin', function() return restrict: 'A', template: '<span id="signinButton"></span>', replace: true, scope: afterSignin: '&' , link: function(scope, ele, attrs) // see ngnewsletter.com/posts/awsjssdk.html ;)
![Page 19: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/19.jpg)
in AngularJS// app/view/view.tpl.html<p>This is the partial for view 1.</p><h2>Signin to ngroad</h2>
<div googlesignin clientid='3818201' aftersignin="signedIn(oauth)" datauser="user"></div><pre> user | json </pre>
![Page 20: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/20.jpg)
in AngularJS$scope.signedIn = function(oauth) var creds = params: ; $scope.user = oauth; creds = AWS.config.credentials; creds.params.Logins = ; creds.params.Logins['accounts.google.com'] = oauth.id_token; AWS.config.update( credentials: creds ); AWS.config.credentials.refresh(function(err) if (err) console.log(err); ); ;
![Page 21: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/21.jpg)
Chamber of Secrets was open
![Page 22: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/22.jpg)
in AngularJS
![Page 23: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/23.jpg)
in AngularJS
![Page 24: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/24.jpg)
DynamoDBis a fully managed NoSQL database service that erovides
fast and predictable performance
with seamless scalability
![Page 25: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/25.jpg)
in AngularJS
![Page 26: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/26.jpg)
in AngularJS
![Page 27: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/27.jpg)
![Page 28: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/28.jpg)
in AngularJS<p>This is the partial for view 1.</p><h2>Signin to ngroad</h2>
<div googlesignin clientid='38182010900e5l22mddk7oliohktn747trqgsfau1rd' aftersignin="signedIn(oauth)" datauser="user"></div><pre> user | json </pre>
<form ngsubmit="send(item)"><input ngmodel="item.title"><button type="submit">Save</button></form>
![Page 29: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/29.jpg)
in AngularJS$scope.send = function(item) AWS.config.getCredentials(function() var dynamodb = new AWS.DynamoDB(apiVersion: '20120810'); dynamodb.putItem( Item: "title": "S": item.title , TableName: "angularconf" , function(err, data) if(err) throw err; ); );;
![Page 30: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/30.jpg)
DynamoDB
![Page 31: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/31.jpg)
DynamoDB
![Page 32: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/32.jpg)
working on your data
Allow permission for singlelines
Allow permission for singlecolumns
![Page 33: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/33.jpg)
working on your data "Version": "20121017", "Statement": [ "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem" ], "Resource": ["arn:aws:dynamodb:uswest2::table/GameScores"], "Condition": "ForAllValues:StringEquals": "dynamodb:LeadingKeys": ["$www.amazon.com:user_id"] ]
![Page 34: Corley cloud angular in cloud](https://reader031.fdocuments.net/reader031/viewer/2022021502/58729d5d1a28ab07208b4feb/html5/thumbnails/34.jpg)
Other AWS servicesSQS
S3
Cognito Sync
docs.aws.amazon.com/AWSJavaScriptSDK