aws csa associate 05-07
TRANSCRIPT
AWS Certified Solutions ArchitectAssociate Level
Agenda● 08/Set - Abertura, Overview AWS e S3● 16/Set (terça) - Cloudfront e Route53● 22/Set - EC2 e VPC● 29/Set - RDS, DynamoDB e Other Storage Options● 13/Out - CloudFormation, SQS e SWF● 20/Out - Elastic Beanstalk e Security● 27/Out - Architecting for the Cloud e Revisão
Horário: 18:00 as 20:00
O que preciso lembrar?● Pra que server?● Quais benefícios?● Limites
● Quais benefícios?● Templates● Criando ambientes
dev/homolog/prod
● Task, Worker, Desider ?● Funciona com on-premise?● Humans events● Diferença SQS● Limites
Materiais de ApoioReferências1. Página oficial2. Post sobre o programa e prova3. AWS Architecture Center4. AWS Security Center5. AWS Documentation Page6. Curso online7. Slideshare
White Papers1. Overview of Amazon Web Services2. Overview of Security Processes3. AWS Risk and Compliance4. Storage Options in the AWS Cloud5. Architecting for the AWS Cloud: Best
Practices6. Storage Use Cases7. Designing Fault-Tolerant Applications in
the AWS Cloud
CloudFormation● Amazon Route 53● Amazon S3● Amazon EC2● Amazon VPC● AWS Elastic Load Balancing● Auto Scaling● Amazon CloudFront● AWS CloudWatch● Amazon RDS
● AWS Identity and Access Management● Amazon SQS● Amazon Redshift● Amazon DynamoDB● Amazon ElastiCache● AWS Elastic Beanstalk● Amazon SimpleDB● Amazon SNS
CloudFormationSnippets
● Auto Scaling Snippets● Amazon CloudFront Template Snippets● Amazon CloudWatch Logs Sample● AWS CloudFormation Amazon EC2 Template Snippets● AWS Elastic Beanstalk Snippets● Elastic Load Balancing Snippets● Identity and Access Management (IAM) Template Snippets● AWS OpsWorks Snippets● Amazon Redshift Snippets● Amazon RDS Template Snippets● Amazon Route 53 Template Snippets● Amazon S3 Template Snippets● Amazon SimpleDB Snippets● Amazon SNS Snippets● Amazon SQS Queue Snippet● Stack Resource Snippets● Wait Condition Template Snippets● AWS CloudFormation Template Snippets
Sample Solutions● WordPress
○ Amazon EC2 instances ○ Auto Scaling group ○ Multi-AZ Amazon RDS
● Mais
SQS - Overview● Decouple● Multiple writers and readers● Worker fault tolerance● Reliable
○ Messages are stored redundantly● Simple
○ CreateQueue○ SendMessage○ ReceiveMessage○ ChangeMessageVisibility○ DeleteMessage
SQS - Lifecycle
SQS Visibility
SQS - Limits● Retention period
○ Min - 1 minute○ Max - 2 weeks○ Default - 4 days
● Maximum message size○ 256 KB
● Queue names○ 80 Characters
● Visibility○ 12 hours
SQS - Lab# CREATE import boto.sqsconn = boto.sqs.connect_to_region("us-east-1", aws_access_key_id='KEY', aws_secret_access_key='SECRET')q = conn.create_queue('myqueue')
# WRITEfrom boto.sqs.message import Messagem = Message()m.set_body('This is my first message.')q.write(m)
# READrs = q.get_messages()len(rs)m = rs[0]m.get_body()
SWF Overview● Coordinate work across distributed
components○ Managing intertask dependencies○ Scheduling○ Concurrency
● Processo○ Stores tasks○ Assigns them to workers○ Tracks their progress○ Maintains their state (details on completion)
● Benefits (Independently)○ Implement○ Deploy○ Scale○ Modify
● Limits○ Maximum registered domains
■ 100○ Maximum request size
■ 1 MB per request○ Maximum workflow execution time
■ 1 year
SWF - Sample
SWF - Sample Implementation
http://boto.readthedocs.org/en/latest/swf_tut.html
...
for workflow_type in ('HelloWorkflow', 'SerialWorkflow', 'ParallelWorkflow', 'SubWorkflow'):
registerables.append(swf.WorkflowType(domain=DOMAIN, name=workflow_type, version=VERSION, task_list='default'))
….
for activity_type in ('HelloWorld', 'ActivityA', 'ActivityB', 'ActivityC'):
registerables.append(swf.ActivityType(domain=DOMAIN, name=activity_type, version=VERSION, task_list='default'))
...
for swf_entity in registerables:
try:
swf_entity.register()
print swf_entity.name, 'registered successfully'
except (SWFDomainAlreadyExistsError, SWFTypeAlreadyExistsError):
print swf_entity.__class__.__name__, swf_entity.name, 'already exists'
Workerimport boto.swf.layer2 as swf
DOMAIN = 'boto_tutorial'VERSION = '1.0'TASKLIST = 'default'
class HelloWorker(swf.ActivityWorker):
domain = DOMAIN version = VERSION task_list = TASKLIST
def run(self): activity_task = self.poll() if 'activityId' in activity_task: print 'Hello, World!' self.complete() return True
Deciderimport boto.swf.layer2 as swf...class HelloDecider(swf.Decider):
.... def run(self): history = self.poll() if 'events' in history: # Find workflow events not related to decision scheduling. workflow_events = [e for e in history['events'] if not e['eventType'].startswith('Decision')] last_event = workflow_events[-1]
decisions = swf.Layer1Decisions() if last_event['eventType'] == 'WorkflowExecutionStarted': decisions.schedule_activity_task('saying_hi', ACTIVITY, VERSION, task_list=TASKLIST) elif last_event['eventType'] == 'ActivityTaskCompleted': decisions.complete_workflow_execution() self.complete(decisions=decisions) return True
O que preciso lembrar?● Pra que server?● Quais benefícios?● Limites
● Quais benefícios?● Templates● Criando ambientes
dev/homolog/prod
● Task, Worker, Desider ?● Funciona com on-premise?● Humans events● Diferença SQS● Limites
Agenda● 08/Set - Abertura, Overview AWS e S3● 16/Set (terça) - Cloudfront e Route53● 22/Set - EC2 e VPC● 29/Set - RDS, DynamoDB e Other Storage Options● 13/Out - CloudFormation, SQS e SWF● 20/Out - Elastic Beanstalk e Security● 27/Out - Architecting for the Cloud e Revisão
Horário: 18:00 as 20:00
AWS Certified Solutions ArchitectAssociate Level
OBRIGADO!!