20
AWS Certified Solutions Architect Associate Level

AWS CSA Associate 05-07

Embed Size (px)

Citation preview

Page 1: AWS CSA Associate 05-07

AWS Certified Solutions ArchitectAssociate Level

Page 2: AWS CSA Associate 05-07

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

Page 3: AWS CSA Associate 05-07

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

Page 4: AWS CSA Associate 05-07

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

Page 5: AWS CSA Associate 05-07

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

Page 6: AWS CSA Associate 05-07

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

Page 7: AWS CSA Associate 05-07

SQS - Overview● Decouple● Multiple writers and readers● Worker fault tolerance● Reliable

○ Messages are stored redundantly● Simple

○ CreateQueue○ SendMessage○ ReceiveMessage○ ChangeMessageVisibility○ DeleteMessage

Page 8: AWS CSA Associate 05-07

SQS - Lifecycle

Page 9: AWS CSA Associate 05-07

SQS Visibility

Page 10: AWS CSA Associate 05-07

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

Page 11: AWS CSA Associate 05-07

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()

Page 12: AWS CSA Associate 05-07

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

Page 13: AWS CSA Associate 05-07

SWF - Sample

Page 14: AWS CSA Associate 05-07

SWF - Sample Implementation

http://boto.readthedocs.org/en/latest/swf_tut.html

Page 15: AWS CSA Associate 05-07

...

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'

Page 16: AWS CSA Associate 05-07

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

Page 17: AWS CSA Associate 05-07

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

Page 18: AWS CSA Associate 05-07

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

Page 19: AWS CSA Associate 05-07

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

Page 20: AWS CSA Associate 05-07

AWS Certified Solutions ArchitectAssociate Level

OBRIGADO!!