Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Michael Dowling
October 2015
DEV201
AWS SDK for ...
Go programming language
Biplane by Renee French is licensed under BY CC 3.0
History of AWS SDK for Go
• Based on Stripe's aws-go
• January 2015: AWS took over
• June 2015: Developer Preview
• Soon: ...
AWS SDK for Go
Source: https://github.com/aws/aws-sdk-go
AWS SDK for Go
Getting started: https://github.com/aws/aws-sdk-go/wiki
AWS SDK for Go
API docs: http://docs.aws.amazon.com/sdk-for-go/api/
What to expect from the session
• Get started with the AWS SDK for Go
• Build concurrent application with the SDK
• Deploy...
Go get the AWS SDK for Go
• Get the SDK
• go get -u github.com/aws/aws-sdk-go/...
• Tagged release versioning
• e.g. “v0.9...
Structure of AWS SDK for Go
• import "github.com/aws/aws-sdk-go/aws"
• Utilities tools
• Configuration
• import "github.co...
Configuration for AWS SDK for Go
• Requires region and AWS credentials.
• Service clients are given a configuration that i...
Configuration: credentials
• NEVER put AWS credentials in your code.
• Credentials provider chain:
1. Environment variable...
Credentials: shared credentials file
• Default file, ~/.aws/credentials
• Shared by all SDKs and AWS CLI
• Multiple sets o...
~/.aws/credentials
[default]
aws_access_key_id = ACCESS_KEY_ID
aws_secret_access_key = SECRET_ACCESS_KEY_ID
[prod]
aws_acc...
AWS SDK for Go: Making requests
Relying on credential provider
and AWS_REGION
What to expect from the session
• Get started with the AWS SDK for Go
• Build concurrent application with the SDK
• Deploy...
Word frequency
• Analyze files and determine top 10 most common words.
• Persist the data and write to a queue for further...
Word frequency processing
File
Amazon S3 bucket
Amazon SQS queue
Push
Poll queue
Word Frequency
service
Amazon SQS queue
A...
Amazon SQS queue
Push
Poll queue
Word Frequency
service
Amazon SQS queue
Amazon DynamoDB table
File
Amazon S3 bucket
Word ...
File
Amazon S3 bucket
Amazon SQS queue
Push
Word frequency processing
Word Frequency
service
Amazon SQS queue
Amazon Dynam...
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequen...
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequen...
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequen...
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequen...
What to expect from the session
• Get started with the AWS SDK for Go
• Build concurrent application with the SDK
• Deploy...
Deploy and scale
• Create the application environment
• Deploy and update Word Frequency service
• Scaling Word Frequency ...
Deploying Word Frequency service
• AWS Elastic Beanstalk
• Easy to use
• Handles load balancing, scaling,
and deployments....
What we learned in this session
 Get started with the AWS SDK for Go
 Build concurrent application with the SDK
 Deploy...
Thank you!
• SDK / issue tracker: https://github.com/aws/aws-sdk-go
• Getting Started guide: https://github.com/aws/aws-sd...
Remember to complete
your evaluations!
Upcoming SlideShare
Loading in …5
×

(DEV201) AWS SDK For Go: Gophers Get Going with AWS

1,513 views

Published on

The AWS SDK for Go is now live and ready for developers to build productive applications with using the Go programming language. This session will show you how to get started using the AWS SDK for Go. We’ll introduce the best practices for how to use the SDK, and how it integrates with your Go application. We will explore an example application which uses async programming with Amazon S3 and Amazon SQS to distribute tasks across multiple concurrent goroutines, and use Amazon Elastic Beanstalk to deploy and scale the application.

Published in: Technology

(DEV201) AWS SDK For Go: Gophers Get Going with AWS

  1. 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Michael Dowling October 2015 DEV201 AWS SDK for Go Gophers Get Going with AWS
  2. 2. Go programming language Biplane by Renee French is licensed under BY CC 3.0
  3. 3. History of AWS SDK for Go • Based on Stripe's aws-go • January 2015: AWS took over • June 2015: Developer Preview • Soon: GA!
  4. 4. AWS SDK for Go Source: https://github.com/aws/aws-sdk-go
  5. 5. AWS SDK for Go Getting started: https://github.com/aws/aws-sdk-go/wiki
  6. 6. AWS SDK for Go API docs: http://docs.aws.amazon.com/sdk-for-go/api/
  7. 7. What to expect from the session • Get started with the AWS SDK for Go • Build concurrent application with the SDK • Deploy and scale the application
  8. 8. Go get the AWS SDK for Go • Get the SDK • go get -u github.com/aws/aws-sdk-go/... • Tagged release versioning • e.g. “v0.9.9”
  9. 9. Structure of AWS SDK for Go • import "github.com/aws/aws-sdk-go/aws" • Utilities tools • Configuration • import "github.com/aws/aws-sdk-go/service/s3" • Service client • API operations • API request/response structs
  10. 10. Configuration for AWS SDK for Go • Requires region and AWS credentials. • Service clients are given a configuration that is merged with the default configuration. Specify only what you need. • Create unique service client instances with different configurations.
  11. 11. Configuration: credentials • NEVER put AWS credentials in your code. • Credentials provider chain: 1. Environment variables 2. Shared credentials file 3. EC2 instance profile credentials
  12. 12. Credentials: shared credentials file • Default file, ~/.aws/credentials • Shared by all SDKs and AWS CLI • Multiple sets of credentials as profiles • AWS_PROFILE specifies profile
  13. 13. ~/.aws/credentials [default] aws_access_key_id = ACCESS_KEY_ID aws_secret_access_key = SECRET_ACCESS_KEY_ID [prod] aws_access_key_id = ACCESS_KEY_ID aws_secret_access_key = SECRET_ACCESS_KEY_ID
  14. 14. AWS SDK for Go: Making requests Relying on credential provider and AWS_REGION
  15. 15. What to expect from the session • Get started with the AWS SDK for Go • Build concurrent application with the SDK • Deploy and scale the application
  16. 16. Word frequency • Analyze files and determine top 10 most common words. • Persist the data and write to a queue for further processing. • Goals: concurrent, durable, and scalable. https://github.com/awslabs/aws-go-wordfreq-sample
  17. 17. Word frequency processing File Amazon S3 bucket Amazon SQS queue Push Poll queue Word Frequency service Amazon SQS queue Amazon DynamoDB table
  18. 18. Amazon SQS queue Push Poll queue Word Frequency service Amazon SQS queue Amazon DynamoDB table File Amazon S3 bucket Word frequency processing
  19. 19. File Amazon S3 bucket Amazon SQS queue Push Word frequency processing Word Frequency service Amazon SQS queue Amazon DynamoDB table Poll queue
  20. 20. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  21. 21. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  22. 22. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  23. 23. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  24. 24. What to expect from the session • Get started with the AWS SDK for Go • Build concurrent application with the SDK • Deploy and scale the application
  25. 25. Deploy and scale • Create the application environment • Deploy and update Word Frequency service • Scaling Word Frequency service environment
  26. 26. Deploying Word Frequency service • AWS Elastic Beanstalk • Easy to use • Handles load balancing, scaling, and deployments. • No additional cost. Pay only for the resources you use. AWS Elastic Beanstalk
  27. 27. What we learned in this session  Get started with the AWS SDK for Go  Build concurrent application with the SDK  Deploy and scale the application
  28. 28. Thank you! • SDK / issue tracker: https://github.com/aws/aws-sdk-go • Getting Started guide: https://github.com/aws/aws-sdk-go/wiki • API docs: http://docs.aws.amazon.com/sdk-for-go/api/ • Sample application: https://github.com/awslabs/aws-go-wordfreq-sample
  29. 29. Remember to complete your evaluations!

×