SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
© 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
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: GA!
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 and scale the application
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”
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
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.
Configuration: credentials
• NEVER put AWS credentials in your code.
• Credentials provider chain:
1. Environment variables
2. Shared credentials file
3. EC2 instance profile
credentials
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
~/.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
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 and scale the application
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
Word frequency processing
File
Amazon S3 bucket
Amazon SQS queue
Push
Poll queue
Word Frequency
service
Amazon SQS queue
Amazon DynamoDB table
Amazon SQS queue
Push
Poll queue
Word Frequency
service
Amazon SQS queue
Amazon DynamoDB table
File
Amazon S3 bucket
Word frequency processing
File
Amazon S3 bucket
Amazon SQS queue
Push
Word frequency processing
Word Frequency
service
Amazon SQS queue
Amazon DynamoDB table
Poll queue
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequency service
jobCh
resultsCh
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequency service
jobCh
resultsCh
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequency service
jobCh
resultsCh
Word frequency architecture
JobMessageQueue
Worker Pool
ResultCollector
Amazon SQS
Amazon SQS
Amazon DynamoDB
Word Frequency service
jobCh
resultsCh
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
Deploy and scale
• Create the application environment
• Deploy and update Word Frequency service
• Scaling Word Frequency service environment
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
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
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
Remember to complete
your evaluations!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
 
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User GroupAnsible Intro - June 2015 / Ansible Barcelona User Group
Ansible Intro - June 2015 / Ansible Barcelona User Group
 
Hosting a Rails App
Hosting a Rails AppHosting a Rails App
Hosting a Rails App
 
Scaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic BeanstalkScaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic Beanstalk
 
Docker on AWS OpsWorks
Docker on AWS OpsWorksDocker on AWS OpsWorks
Docker on AWS OpsWorks
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormation
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)
 
CTO Night & Days 2015 Winter - AWS Mobile Development
CTO Night & Days 2015 Winter - AWS Mobile DevelopmentCTO Night & Days 2015 Winter - AWS Mobile Development
CTO Night & Days 2015 Winter - AWS Mobile Development
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
ChefConf 2014 - AWS OpsWorks Under The Hood
ChefConf 2014 - AWS OpsWorks Under The HoodChefConf 2014 - AWS OpsWorks Under The Hood
ChefConf 2014 - AWS OpsWorks Under The Hood
 
What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
 
Extending ansible
Extending ansibleExtending ansible
Extending ansible
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to Cloud
 
Automation in Cloud
Automation in CloudAutomation in Cloud
Automation in Cloud
 
AWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorksAWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorks
 
Breaking Up With Your Data Center Presentation
Breaking Up With Your Data Center PresentationBreaking Up With Your Data Center Presentation
Breaking Up With Your Data Center Presentation
 

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

AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
Daniel Zivkovic
 
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Amazon Web Services
 

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

DEV207_Deploying and Managing Ruby Applications on AWS
DEV207_Deploying and Managing Ruby Applications on AWSDEV207_Deploying and Managing Ruby Applications on AWS
DEV207_Deploying and Managing Ruby Applications on AWS
 
Deploy, manage, and scale your apps
Deploy, manage, and scale your appsDeploy, manage, and scale your apps
Deploy, manage, and scale your apps
 
IaC on AWS Cloud
IaC on AWS CloudIaC on AWS Cloud
IaC on AWS Cloud
 
Building serverless applications (April 2018)
Building serverless applications (April 2018)Building serverless applications (April 2018)
Building serverless applications (April 2018)
 
Connect and Interconnect – The Mesh of Event-Driven Compute and Marvelous Vir...
Connect and Interconnect – The Mesh of Event-Driven Compute and Marvelous Vir...Connect and Interconnect – The Mesh of Event-Driven Compute and Marvelous Vir...
Connect and Interconnect – The Mesh of Event-Driven Compute and Marvelous Vir...
 
Infrastructure as Code on AWS
Infrastructure as Code on AWSInfrastructure as Code on AWS
Infrastructure as Code on AWS
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
 
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
Track 4 Session 4_ MAD02 MAD 04 如何藉由 CICD 流程管理容器化和無伺服器應用
 
Serverless DevOps to the Rescue
Serverless DevOps to the RescueServerless DevOps to the Rescue
Serverless DevOps to the Rescue
 
Fin jaws 202103
Fin jaws 202103Fin jaws 202103
Fin jaws 202103
 
Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
 Building a Python Serverless Applications with AWS Chalice - AWS Online Tech... Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
Building a Python Serverless Applications with AWS Chalice - AWS Online Tech...
 
AWS and DevOps Session 1
AWS and DevOps Session 1AWS and DevOps Session 1
AWS and DevOps Session 1
 
GitHub's Latest: Automation and More
GitHub's Latest: Automation and MoreGitHub's Latest: Automation and More
GitHub's Latest: Automation and More
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Intro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStarIntro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStar
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
 
Developing Java Applications in AWS
Developing Java Applications in AWSDeveloping Java Applications in AWS
Developing Java Applications in AWS
 

Más de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

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

  • 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. Go programming language Biplane by Renee French is licensed under BY CC 3.0
  • 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. AWS SDK for Go Source: https://github.com/aws/aws-sdk-go
  • 5. AWS SDK for Go Getting started: https://github.com/aws/aws-sdk-go/wiki
  • 6. AWS SDK for Go API docs: http://docs.aws.amazon.com/sdk-for-go/api/
  • 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. 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. 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. 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. 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. 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. ~/.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. AWS SDK for Go: Making requests Relying on credential provider and AWS_REGION
  • 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. 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. Word frequency processing File Amazon S3 bucket Amazon SQS queue Push Poll queue Word Frequency service Amazon SQS queue Amazon DynamoDB table
  • 18. Amazon SQS queue Push Poll queue Word Frequency service Amazon SQS queue Amazon DynamoDB table File Amazon S3 bucket Word frequency processing
  • 19. File Amazon S3 bucket Amazon SQS queue Push Word frequency processing Word Frequency service Amazon SQS queue Amazon DynamoDB table Poll queue
  • 20. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  • 21. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  • 22. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  • 23. Word frequency architecture JobMessageQueue Worker Pool ResultCollector Amazon SQS Amazon SQS Amazon DynamoDB Word Frequency service jobCh resultsCh
  • 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. Deploy and scale • Create the application environment • Deploy and update Word Frequency service • Scaling Word Frequency service environment
  • 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. 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. 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