Getting Started
All blocks
21 min
what is aws ? this was a question i didnât fully have an answer to, until now back when i was first trying to understand what amazon web services was , just like anyone else would , i searched on google aws = lego blocks think of lego blocks very simple in appearance and functionality on their own however , put them together in the right way, with the right pieces, you can create something highly complex and amazing this is what aws allows aws is a compilation of many different lego pieces that all have their own simple functions although on their own they may lack much functionality; combined together with other services, they can construct a highly complex, practical application through aws, amazon has solely provided users with a huge lego toolbox where you can pick and choose which services you would like to use and for how long it is completely up to the user how theyâll construct their lego masterpiece one of the biggest reasons why aws has become so popular, is because of the complete freedom it allows consumers not only are you able to mix and match its services, amazon offers three different methods to manage and utilise aws through the cli, the aws console (gui), or sdks to top it all off, the highly competitive pricing makes aws an offer hard to refuse opening the aws lego toolbox in this section i will display some key amazon web services as well as some others i used in a recent project simple storage service (s3) as the name suggests, aws s3 is a storage service it provides automatic scaling â meaning you donât have to worry about running out of storage â and it is extremely reliable⌠like 99 999999999% reliable through the concept of âbucketsâ, s3 can be used to store log files, photos for your application, and even to serve static websites that donât require server side technologies elastic cloud computing (ec2) ec2 allows you put virtual servers in the cloud if you donât know anything about cloud computing, this means that aws is removing the need to purchase actual hardware to have servers just like s3, there is automatic scaling â meaning depending on the demand, the amount of servers can be automatically increased paired together with aws s3 and aws relational database (rds), you are able to create a full back end, front end, and database, all based in the cloud identity and access management (iam) whenever you need to programmatically access aws services you will need to have two different access keys an access key id, and a secret access key however, for the sake of security, you would not want these keys to be able to access all of your account this is where iam can come into play through iam, you can create aws users and groups, use permissions to allow and deny their access to aws resources, and delete users and groups when access is no longer required thus, iam highly improves security and gives you the ability to allow outside accounts to access your accountâs specific services lambda in essence, lambda allows you to have a âserverlessâ application this does not mean you do not have a server at all; instead, it means it removes the need to provision and manage servers (whether they be physical or virtual) explained simply, lambda runs code that you specify, based on a trigger that you also specify these triggers can be http requests with api gateway, changes in a specific s3 bucket, updates in your database, and so on lambda provides infinite flexibility and a highly affordable serverless option for applications api gateway api gateway is a simple service that allows you to build, deploy and manage apis through a matter of a few minutes in the aws console you are able to have a fully functioning restful api to a distinct url endpoint api gateway is able to simultaneously handle all your api calls, while providing traffic management, authorization and access control, and monitoring polly through artificial intelligence, aws polly is able to turn text into lifelike speech it works with dozens of different languages â for example, chinese, russian, turkish, spanish, and korean â with usually several voices for each language connect aws connect provides you the capability to have a simple, cloud based call center through the aws console, you can construct different âcontact flowsâ (where you create distinct user experiences for outbound or inbound calls), manage different calling âagentsâ, and track performance metrics my experience with aws in my most recent project, i combined together connect (with polly built in), lambda, api gateway, and s3 to create a fully functioning robocall system with a basic front end a user is able to access my static website that is hosted through s3, input the phone number they would like to call and the text they would like to change to speech once submitted, a request is sent to api gateway, which then triggers a special lambda function which calls the number that was inputted, with the text that was also inputted in my experience, using aws was extremely simple, and provided a vast range of capabilities even though my account is in the free tier i was able to confidently and easily use all of the aws services without fear i was going to spend any money aws has provided users many different resources to learn all their services, and through a 1 year free trial, you are able to test every single one of their services i would highly recommend anyone to at least try learning in this blog, i only showcased seven amazon web services, however, aws has over 90 different services in over 20 different categories list 1 list 2 list 2 1 list 2 1 1 list 2 2 list 3 check list 1 check list 2 tab examples url https api cakes com v1 cakes id name get cakes method post request pathparameters kind required name id type string description id of the cake to get n for free of course queryparameters kind required name recipe type string description the api will do its best to find n a cake matching the provided recipe kind required name gluten type boolean description whether the cake should be n gluten free or not headerparameters kind required name x auth token type string description authentication token to track n down who is emptying our stocks formdataparameters results languages id 4tgentsg2phzbtvjl3tjc code n name cake s name n recipe cake s recipe name n cake binary cake n language 202 id 4vwxn3gkaxonetojjbftk code n message ain t no cake like that n language 404 selectedlanguageid 4tgentsg2phzbtvjl3tjc examples languages id etxf3d2kbcayhhg4ccu4e code curl request get n url https api cakes com v1 cakes id n header accept application json language curl id d3h pu6 cealauj522ngw code fetch https api cakes com v1 cakes id n method get n headers n accept application json n n n then response n console log response ; n n catch err n console error err ; n ; language javascript id xpo27keqospmlc3gujadq code const fetch require node fetch ; n nlet url https api cakes com v1 cakes id ; nlet options n method get nheaders n accept application json n n ; nfetch url options n then res res json n then json console log json n catch err console error error err ; language nodejs id lkvprxqawf9oxoil1mtzn code import requests n nurl https api cakes com v1 cakes id nheaders accept application json nresponse requests request get url headers headers nprint response text language python id 2xpgbqur0 b4w8nyq3xv8 code const fetch require node fetch ; n nlet url https api cakes com v1 cakes id ; nlet options method get headers accept application json ; nfetch url options n then res res json n then json console log json n catch err console error error err ; language ruby selectedlanguageid etxf3d2kbcayhhg4ccu4e responses statuscode 202 description cake successfully retrieved jsonexample n name cake s name n recipe cake s recipe name n cake binary cake n statuscode 404 description could not find a cake matching this query jsonexample n message ain t no cake like that n description this endpoint allows you to get free cakes currentnewparameter label path parameter value pathparameters tab examples url https api cakes com name get cakes method put request pathparameters queryparameters headerparameters bodydataparameters kind required name id type string description id of the cake to get formdataparameters results languages id mk3yhos1 ixfv ybz 7bm code n name cake s name n language 200 id 4hlypcaisdugyb57mkysd code n message ain t no cake like that n language 404 selectedlanguageid mk3yhos1 ixfv ybz 7bm examples languages id lpo6y 91fqg3of6er4zql code fetch https api cakes com n method get n headers n accept application json n n n then response n console log response ; n n catch err n console error err ; n ; language javascript selectedlanguageid lpo6y 91fqg3of6er4zql description get a cake by its id currentnewparameter label body parameter value bodydataparameters / c# program to check whether the entered year is a leap year or not / using system; using system collections generic; using system linq; using system text; namespace program { class leapyear { static void main(string\[] args) { leapyear obj = new leapyear(); obj readdata(); obj leap(); } int y; public void readdata() { console writeline("enter the year in four digits "); y = convert toint32(console readline()); } public void leap() { if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) { console writeline("{0} is a leap year", y); } else { console writeline("{0} is not a leap year", y); } console readline(); } } }// we can use channels to synchronize execution // across goroutines here's an example of using a // blocking receive to wait for a goroutine to finish // when waiting for multiple goroutines to finish, // you may prefer to use a \[waitgroup]\(waitgroups) package main import "fmt" import "time" // this is the function we'll run in a goroutine the // `done` channel will be used to notify another // goroutine that this function's work is done func worker(done chan bool) { fmt print("working ") time sleep(time second) fmt println("done") // send a value to notify that we're done done < true } func main() { // start a worker goroutine, giving it the channel to // notify on done = make(chan bool, 1) go worker(done) // block until we receive a notification from the // worker on the channel < done } gegregerg qwe\<?php> \# python3 program to demonstrate \# the use of sample() function \# import random import random \# prints list of random items of \# length 3 from the given list list1 = \[1, 2, 3, 4, 5, 6] print("with list ", random sample(list1, 3)) \# prints list of random items of \# length 4 from the given string string = "geeksforgeeks" print("with string ", random sample(string, 4)) \# prints list of random items of \# length 4 from the given tuple tuple1 = ("ankit", "geeks", "computer", "science", "portal", "scientist", "btech") print("with tuple ", random sample(tuple1, 4)) \# prints list of random items of \# length 3 from the given set set1 = {"a", "b", "c", "d", "e"} print("with set ", random sample(set1, 3)) sequencediagram participant alice participant bob alice >>john hello john, how are you? loop healthcheck john >>john fight against hypochondria end note right of john rational thoughts \<br/>prevail! john >>alice great! john >>bob how about you? bob >>john jolly good! danger by philosophy, the library won't warn you when you modify your past, so you might delete your whole existence year processing you can now process years in batches ) glhf columns id 1 name in progress items id snmy3cbutdkbppc9ob5kq content beijing datacenter id 2 name testing items id hxd0rxdo6ybzezztn2x b content germany datacenter id oqxwqkc6dlabfimotezn2 content sea datacenter id 3kxqfmacbncb8bnfmezpy content arctic datacenter id 3 name done items id udhh7xvy 9wuehq4xoaks content south american datacenter id staiwlsluamylycndwzjo content switzerland datacenter id qptvf6eiotcqyhhsyvn5j content sf ny brussels datacenters zoom 2 center 3 370856476926319 5 887577533721924 markerpositions 39 9676482528045 122 84431457519533 35 79108281624994 96 98043823242188 39 63953756436671 116 54296875 38 82259097617713 120 41015625 32 54681317351517 113 02734375 47 27922900257085 3 1640625000000004 16 29905101458183 103 0078125 38 82259097617713 79 80468750000001 27 68352808378776 81 38671875000001 7 362466865535738 55 01953125000001 31 353636941500987 115 48828125 14 944784875088372 117 0703125 48 69096039092552 18 984375000000004 31 653381399664 95 625 33 637489243170826 473 87329101562506 realtime editor with markdown shortcuts docid\ x 04meqilww4ymhoomc80 the end