Expert AWS Development

Book description

Key concepts, sample applications, best practices, and troubleshooting tips to build highly scalable applications in AWS.

About This Book

  • Design highly available, cost efficient, fault tolerant, and scalable distributed systems
  • A practical guide that will help you build, deploy, and manage applications with ease.
  • Develop effective solutions with AWS SDK and Lambda

Who This Book Is For

This book targets developers who would like to build and manage web and mobile applications and services on the AWS platform. If you are an architect you will be able to take a deep dive and use examples that can be readily applied to real world scenarios. Some prior programming experience is assumed along with familiarity of cloud computing.

What You Will Learn

  • Learn how to get up and running with AWS Developer Tools.
  • Integrate the four major phases in the Release Processes. Source, Build, Test and Production.
  • Learn how to integrate Continuous Integration, Continuous Delivery, and Continuous Deployment in AWS.
  • Make secure, scalable and fault tolerant applications.
  • Understand different architectures and deploy complex architectures within minutes

In Detail

Continuous deployment and Agile methodology have enabled huge advances in modern applications. This book will enable the reader to make use of this rapidly evolving technology to build highly scalable applications within AWS using different architectures.

You will begin with installation of AWS SDK and you will get hands-on experience on creating an application using AWS Management Console and AWS Command Line Interface (CLI). Next you will be integrating Applications with AWS services such as DynamoDB, Amazon Kinesis, AWS Lambda, Amazon SQS and Amazon SWF

Following this you will get well versed with CI/CD workflow and work with four major phases in Release processes – Source, Build, Test and Production. Next you will learn to apply AWS developer tools in your Continuous Integration (CI) and Continuous Deployment (CD) WorkFlow. Later you will learn about User Authentication using Amazon Cognito and also how you can evaluate the best architecture as per your infrastructure costs. You will learn about Amazon EC2 service and deploy an app using Amazon EC2.You will also get well versed with container service which is Amazon EC2 Container Service (Amazon ECS) and you will learn to deploy an app using Amazon ECS. Along with EC2 and ECS, you will also deploying a practical real-world example of a CI/CD application with the Serverless Application Framework which is known as AWS Lambda. Finally you will learn how to build, develop and deploy the Application using AWS Developer tools like AWS CodeCommit, AWS CodeBuild, AWS CodeDeploy and AWS CodePipeline as per project needs. Also you can develop and deploy applications within minutes using AWS CodeStar from wizard.

By the end of this book, the reader will effectively build, deploy, and manage applications on AWS along with scaling and securing applications with best practices and troubleshooting tips.

Style and approach

This book covers follows an approach where you will learn the key concepts followed by a real world example and some tips and tricks to make building and deploying easier

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Expert AWS Development
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. AWS Tools and SDKs
    1. Brief introduction to AWS tools and SDKs
      1. AWS SDK for Java
        1. AWS SDK for Java using Apache Maven
          1. Configuring an SDK as a Maven dependency
        2. AWS SDK for Java using Gradle
        3. AWS SDK for Java using Eclipse IDE
      2. AWS SDK for Node.js
    2. AWS SDKs for IoT devices
      1. AWS SDKs for mobile devices
        1. AWS Mobile SDK for Android
          1. AWS Mobile SDK setup for Android
          2. Configuring AWS Mobile SDK for Android
        2. Using Amazon Cognito to set AWS credentials
    3. Summary
  7. Integrating Applications with AWS Services
    1. Amazon DynamoDB
      1. Integrating DynamoDB into an application
        1. Low-level interface
        2. Document interface
        3. Object persistence (high-level) interface
      2. DynamoDB low-level API
      3. Troubleshooting in Amazon DynamoDB
    2. Amazon Kinesis
      1. Amazon Kinesis streams
        1. Troubleshooting tips for Kinesis streams
      2. Amazon Kinesis Firehose
        1. Troubleshooting tips for Kinesis Firehose
    3. Amazon SQS
      1. Benefits and features of Amazon SQS
      2. Troubleshooting in Amazon SQS
      3. Amazon SWF
      4. AWS SWF components
      5. Amazon SWF examples
        1. AWS SDK for Java using Apache Maven
        2. Workflow implementations
        3. Building and running a project
      6. Troubleshooting Amazon SWF
        1. Unknown resource fault
        2. Non-deterministic workflows
        3. Versioning problems
        4. Troubleshooting and debugging a workflow execution
        5. Lost tasks
    4. Summary
  8. Continuous Integration and Continuous Deployment Workflow
    1. An overview of DevOps
      1. The goal of DevOps
      2. Reasons for integrating DevOps in your process  
      3. The benefits of DevOps
    2. Continuous Integration – maintaining code repository
      1. Continuous Integration best practices
    3. Continuous Delivery – automating build and self-testing
      1. Continuous Delivery benefits
    4. Continuous Deployment – automating production deployment
      1. How they work together
      2. The benefits of Continuous Deployment
    5. Tools used for DevOps processes
      1. Source Code Management
        1. GIT
        2. Bitbucket
        3. Subversion (SVN)
      2. Build Automation tool
        1. Maven
        2. Ant
        3. Gradle
      3. Test automation
        1. Selenium
        2. JUnit
        3. Cucumber
      4. Continuous Integration
        1. Jenkins
        2. Bamboo
        3. Hudson
      5. Configuration Management
        1. Puppet
        2. Chef
        3. Ansible
      6. Continuous Monitoring
        1. Nagios
        2. Ganglia
        3. Sensu
      7. Virtual Infrastructure
    6. CI/CD on AWS
    7. Summary
  9. CI/CD in AWS Part 1 – CodeCommit, CodeBuild, and Testing
    1. A brief overview of AWS for DevOps
    2. AWS CodeCommit – maintaining code repository
      1. Prerequisites of AWS CodeCommit
        1. AWS CodeCommit setup using Git credentials
        2. AWS CodeCommit setup using other methods
      2. Getting started with AWS CodeCommit
    3. AWS CodeBuild – automating the build
      1. AWS CodeBuild benefits
      2. AWS CodeBuild features
        1. Creating AWS CodeBuild project using AWS Management Console
        2. List of build project names
        3. Viewing the build project's details
        4. Updating the build project's details
        5. Deleting the build project
    4. Summary
  10. CI/CD in AWS Part 2 – CodeDeploy, CodePipeline, and CodeStar
    1. AWS CodeDeploy
      1. AWS CodeDeploy benefits
      2. Compute platforms and deployment options for AWS CodeDeploy
        1. Compute platforms
        2. Deployment options
      3. AWS CodeDeploy – sample application deployment on a Windows Server
        1. Step 1 – prerequisite configurations for AWS CodeDeploy
        2. Step 2 – launch a Windows Server Amazon EC2 instance
        3. Step 3 – configure source content to deploy to the EC2 instance
        4. Step 4 – upload application to Amazon S3
          1. Provision of S3 bucket with IAM user permission
          2. Preparation and bundling of the application's file and pushing to the S3 bucket
        5. Step 5 – deploy application
          1. To deploy and monitor the application from AWS CLI
          2. To deploy and monitor the application from AWS Management Console
        6. Step 6 – update and redeploy application
        7. Step 7 – clean up the application and related resources
    2. AWS CodePipeline
      1. AWS CodePipeline benefits
      2. AWS CodePipeline features
      3. Creating an AWS CodePipeline from the console
      4. Creating an AWS CodePipeline from AWS CLI
        1. JSON file creation
        2. Execution of the create-pipeline command
    3. AWS CodeStar
      1. Creating a project in AWS CodeStar
    4. AWS X-Ray
      1. AWS X-Ray benefits
      2. Key features of AWS X-Ray
      3. Creating an AWS X-Ray example from the console
    5. Summary
  11. User Authentication with AWS Cognito
    1. Amazon Cognito benefits
    2. Amazon Cognito features
      1. Amazon Cognito User Pools
        1. Getting started with Amazon Cognito User Pools
          1. Amazon Cognito User Pool creation from the console
          2. Amazon Cognito example for Android with mobile SDK
      2. Amazon Cognito Federated Identities
        1. Creating a new Identity Pool from the console
      3. Amazon Cognito Sync
    3. Summary
  12. Evaluating the Best Architecture
    1. The comparison of traditional web hosting versus web hosting on the cloud using AWS
      1. Traditional web hosting
        1. Challenges with traditional hosting
      2. Cloud hosting
      3. The AWS solution for common web hosting
    2. AWS Well-Architected framework
    3. Amazon EC2 instance and Elastic Load Balancer
      1. Benefits and drawbacks of Amazon EC2
    4. Elastic Load Balancing
    5. Docker with the Amazon EC2 Container Service (Amazon ECS)
      1. Use case of Docker
    6. Containers
    7. Amazon ECS
    8. Serverless architecture with Lambda
    9. Use cases for different architectures
    10. Controlling and optimizing costs
    11. Summary
  13. Traditional Web Hosting – Amazon EC2 and Elastic Load Balancing
    1. Amazon EC2 best practices
    2. Troubleshooting instances
      1. Instance terminates immediately
      2. Errors when connected to an instance
      3. Troubleshooting stopping your instance
      4. Troubleshooting terminating (shutting down) your instance
      5. Troubleshooting instance recovery failures
      6. Troubleshooting instances with failed status checks
      7. Troubleshooting instance capacity
      8. Getting console output and rebooting instances
      9. My instance is booting from the wrong volume
      10. Troubleshooting Windows instances
    3. Elastic Load Balancing, auto scaling, and fault tolerant
      1. Features of ELB
      2. Benefits of Application Load Balancer 
      3. Benefits of Network Load Balancer 
      4. Benefits of Classic Load Balancer 
      5. Auto scaling and fault tolerance
      6. Fault tolerance in AWS for Amazon EC2
    4. Monitoring and optimizing the cost of the EC2 infrastructure
      1. Cost efficient resources
      2. Supply-demand matching
      3. Know your expenses
      4. Optimization over time
    5. Continuous Integration and Continuous Deployment workflow
    6. Summary
  14. Amazon EC2 Container Service
    1. Docker
    2. Container instances
      1. Basic concepts of a container instance
      2. Life cycle of a container instance
      3. Checking the instance role for the account
      4. AMIs for a container instance
      5. Update notification subscribing to Amazon ECS–optimized AMI
      6. Launching an Amazon ECS container instance
      7. Bootstrapping container instances with Amazon EC2 user data
      8. Connecting your container instance
      9. Container instances with CloudWatch Logs
      10. Container instance draining
      11. Remotely managing your container instance
      12. Deregistering your container instance
    3. Amazon ECS clusters
      1. Cluster concepts
      2. Creating a cluster
      3. Scaling a cluster
      4. Deleting a cluster
    4. Scheduling tasks
      1. Service scheduler
      2. Manually running tasks
      3. Running tasks on a cron-like schedule
      4. Custom schedulers
      5. Task life cycle
      6. Task retirement
      7. Windows containers (beta)
        1. Windows container concepts
        2. A web application with Windows containers
          1. Create a Windows cluster
          2. Launch a Windows container instance into the cluster
          3. Register a task definition for Windows
          4. Create a service with the task definition
          5. View the service
    5. Monitoring and optimizing the cost of the infrastructure
    6. Continuous Integration (CI) and Continuous Deployment (CD) Workflow
      1. Step 1 – addding required files source repository
      2. Step 2 – creating a Continuous Deployment pipeline
      3. Step 3 – adding Amazon ECR permissions to the AWS CodeBuild role
      4. Step 4 – testing your pipeline
    7. Summary
  15. Amazon Lambda – AWS Serverless Architecture
    1. Microservices architecture
      1. Microservice characteristics
    2. Lambda and Lambda@Edge advanced topics and best practices
      1. Environment variables
        1. Setting up
        2. Naming convention rules for environment variables
        3. Environment variables and function versioning
        4. Environment variable encryption
        5. Error scenarios
      2. Dead letter queues (DLQ)
    3. Best practices for working with AWS Lambda functions
      1. Function code
      2. Function configuration
      3. Alarming and metrics
      4. Stream event invokes
      5. Async invokes
      6. Lambda VPC
    4. Lambda@Edge
      1. Lambda@Edge benefits
    5. AWS Serverless Application Model (SAM)
      1. Deploying with AWS SAM and AWS CloudFormation
        1. Packaging and deployment
          1. Packaging
          2. Deployment
      2. Introducing the Serverless Application Framework
        1. What makes an application serverless?
        2. Serverless applications benefits
        3. The Serverless Framework
          1. Serverless Framework benefits
    6. Monitoring and optimizing the cost of the infrastructure
      1. How does Lambda pricing work?
      2. How do you keep AWS Lambda costs down?
    7. CI and CD workflow
      1. Step 1 – setting up the repository
      2. Step 2 – creating the pipeline
      3. Step 3 – modifying the generated policy
      4. Step 4 – completing your deployment stage
    8. Summary
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Expert AWS Development
  • Author(s): Atul V. Mistry
  • Release date: March 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788477581