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.

AWS for Java Developers in 2019 - AWS Summit Sydney

360 views

Published on

2018 was an exciting year for the Java Development community on the AWS platform. Several major releases occurred that made building Java-based applications on AWS simpler, faster, and more correct. Come and hear about new features and products in the AWS Java ecosystem including AWS SDK for Java 2.0, Infrastructure as Code with Java and the CDK, Amazon Corretto an OpenJDK distribution and improvements in Serverless Java performance.

  • Login to see the comments

AWS for Java Developers in 2019 - AWS Summit Sydney

  1. 1. S U M M I T SYDNEY
  2. 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS for Java developers in 2019 James Ousby Solutions Architect Amazon Web Services
  3. 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  4. 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  5. 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  6. 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  7. 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  8. 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  9. 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  10. 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  11. 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  12. 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  13. 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  14. 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  15. 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  16. 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  17. 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  18. 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  19. 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  20. 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  21. 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  22. 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  23. 23. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  24. 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon Corretto Execution environments
  25. 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon Corretto Execution environments
  26. 26. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. “Amazon has a long and deep history with Java. I’m thrilled to see the work of our internal mission-critical Java team being made available to the rest of the world.” James Gosling Distinguished Engineer, Amazon Web Services
  27. 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon Corretto Amazon supported distribution of OpenJDK Run internally on thousand of production services Multiplatform Amazon Linux 2, Windows, MacOS, Ubuntu, RHEL, CentOS, SUSE, Docker No cost Distributed under open source license Long term support Corretto 8 until Jun 2023 Corretto 11 until (at least) Aug 2024 All patches and enhancements up streamed to OpenJDK Open source https://github.com/corretto https://aws.amazon.com/corretto
  28. 28. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  29. 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Toolkit for IntelliJ and AWS Toolkit for PyCharm Execution environments
  30. 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Toolkit for IntelliJ and AWS Toolkit for PyCharm
  31. 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Toolkit for IntelliJ and AWS Toolkit for PyCharm Make it easier to develop on AWS Open source https://aws.amazon.com/intellij Initial focus AWS Lambda AWS SAM CLI integration Local debugging Serverless application support Basic resource / credentials management
  32. 32. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  33. 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS SDK for Java 2.0
  34. 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T SnsAsyncClient.builder() .region(Region.US_WEST_2) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); SnsAsyncClient.builder() .region(Region.US_WEST_2) .overideConfiguration( ClientOverrideConfiguration.builder() .apiCallTimeout(Duration.ofSeconds(5) .build()) .build(); SnsAsyncClient.builder() .region(Region.US_WEST_2) .overideConfiguration(o -> o.apiCallTimeout(Duration.ofSeconds(5))) .build(); AWS SDK for Java 2.0 Core tenets Non-blocking asynchronous service clients Immutability through builder pattern Pluggable HTTP clients Consumer builder pattern SnsAsyncClient.create()SnsAsyncClient.builder() .region(Region.US_WEST_2) .httpClient(UrlConnectionHttpClient.create()) .build();
  35. 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS SDK for Java 2.0 Other callout features Modularised (as in Java 9 Modules – Project Jigsaw) Endpoint discovery DynamoDBClient.builder() .region(Region.US_WEST_2) .enableEndpointDiscovery() .build(); <service>.<region>.amazonaws.comdynamodb.ap-southeast-2.amazonaws.commyid2.dynamodb.ap-southeast-2.amazonaws.com myid1.dynamodb.ap-southeast-2.amazonaws.com myid3.dynamodb.ap-southeast-2.amazonaws.com
  36. 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS SDK for Java 2.0 Other callout features Modularised (as in Java 9 Modules – Project Jigsaw) Endpoint discovery HTTP/2 event streaming Fully non blocking HTTP/2 clients Bi-directional real-time streaming responses Reactive streams support Asynchronous stream processing with non-blocking back pressure
  37. 37. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  38. 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS CDK Execution environments
  39. 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS CDK
  40. 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T The journey to AWS CDK “CloudFormation JSON / YAML as an intermediary format like bytecode on the JVM?” 2006 – Provision via API 2010 – Provision via AWS SDK for Java 2010 – Provision via CloudFormation 2018 – Provision via AWS CDK generated CloudFormation
  41. 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS CDK example Amazon Simple Notification Service Stack Amazon Simple Queue Service
  42. 42. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CDK example Queue queue = new Queue(this, "Queue", QueueProps.builder() .withVisibilityTimeoutSec(300) .build()); Topic topic = new Topic(this, "Topic", TopicProps.builder() .withDisplayName("Some Amazing Topic") .build()); topic.subscribeQueue(queue);
  43. 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS CDK example { "Resources": { "Queue4A7E3555": { "Type": "AWS::SQS::Queue", "Properties": { "VisibilityTimeout": 300 } }, "QueuePolicy25439813": { "Type": "AWS::SQS::QueuePolicy", "Properties": { "PolicyDocument": { "Statement": [ { "Action": "sqs:SendMessage", "Condition": { "ArnEquals": { "aws:SourceArn": { "Ref": "TopicBFC7AF6E" } } }, "Effect": "Allow", "Principal": { "Service": "sns.amazonaws.com" }, "Resource": { "Fn::GetAtt": [ "Queue4A7E3555", "Arn" ] } } ], "Version": "2012-10-17" }, "Queues": [{ "Ref": "Queue4A7E3555" }] } }, "TopicBFC7AF6E": { "Type": "AWS::SNS::Topic", "Properties": { "DisplayName": "Some Amazing Topic" } }, "TopicQueueSubscription2D098ED4": { "Type": "AWS::SNS::Subscription", "Properties": { "Endpoint": { "Fn::GetAtt": [ "Queue4A7E3555", "Arn" ] }, "Protocol": "sqs", "TopicArn": { "Ref": "TopicBFC7AF6E" } } } } }
  44. 44. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CDK example Queue queue = new Queue(this, "Queue", QueueProps.builder() .withVisibilityTimeoutSec(300) .build()); Topic topic = new Topic(this, "Topic", TopicProps.builder() .withDisplayName("Some Amazing Topic") .build()); topic.subscribeQueue(queue);
  45. 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS CDK example { "Resources": { "Queue4A7E3555": { "Type": "AWS::SQS::Queue", "Properties": { "VisibilityTimeout": 300 } }, "QueuePolicy25439813": { "Type": "AWS::SQS::QueuePolicy", "Properties": { "PolicyDocument": { "Statement": [ { "Action": "sqs:SendMessage", "Condition": { "ArnEquals": { "aws:SourceArn": { "Ref": "TopicBFC7AF6E" } } }, "Effect": "Allow", "Principal": { "Service": "sns.amazonaws.com" }, "Resource": { "Fn::GetAtt": [ "Queue4A7E3555", "Arn" ] } } ], "Version": "2012-10-17" }, "Queues": [{ "Ref": "Queue4A7E3555" }] } }, "TopicBFC7AF6E": { "Type": "AWS::SNS::Topic", "Properties": { "DisplayName": "Some Amazing Topic" } }, "TopicQueueSubscription2D098ED4": { "Type": "AWS::SNS::Subscription", "Properties": { "Endpoint": { "Fn::GetAtt": [ "Queue4A7E3555", "Arn" ] }, "Protocol": "sqs", "TopicArn": { "Ref": "TopicBFC7AF6E" } } } } }
  46. 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Cloud Development Kit (AWS CDK) Higher level abstractions Object oriented & extensible Native IDE support (it’s just code) Java, Javascript, Typescript, .NET Open Source https://github.com/awslabs/aws-cdk Currently in Developer Preview
  47. 47. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  48. 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem Execution environments
  49. 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Java ecosystem
  50. 50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Performance
  51. 51. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Dependency caching
  52. 52. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  53. 53. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Summary
  54. 54. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  55. 55. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T A project wish list (devops) Pipeline as code Infrastructure as code Isolation Everything in the same language as my application Pipelines are highly available and performant
  56. 56. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T A project wish list (application build) (Serverless) Performance on par with a more long lived JVM workload All underpinned by a JVM that is dependable with free long term support Functional programming friendly SDK’s (Serverless) Great local development experience (debugging and IDE support)
  57. 57. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Pet Clinic – Spring Boot example app
  58. 58. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Environment Architecture This is the simplistic view of what we would like A load balancer, some web servers and a database AWS Cloud
  59. 59. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Environment Architecture Things are not quite so simple when it comes to deployment. AWS gives you a lot of control over the wider environment Can AWS CDK help keep things simple? AWS Cloud VPC Availability Zone 1 Availability Zone 2 Availability Zone 3 Auto Scaling group
  60. 60. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Pipeline Architecture Source Stage Retrieve source from Github Build Stage Maven build (mvn package) Create petclinic.jar Run CDK to provision or update environment
  61. 61. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Pipeline Architecture What do I mean by isolation? Devops Account Prod Account Non Prod Account PetClinic Pipeline PetClinic Staging PetClinic Prod
  62. 62. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  63. 63. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Content links Amazon Corretto https://aws.amazon.com/corretto/ AWS Toolkit for IntelliJ https://aws.amazon.com/intellij AWS Cloud Development Kit (AWS CDK) https://github.com/awslabs/aws-cdk AWS CDK demo + lab https://github.com/jousby/aws-java-appdev-lab https://github.com/jousby/aws-buildbox
  64. 64. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Related breakouts Enhancing your Developer eXperience on AWS Derek Bingham Pro tips for builders on AWS Gabe Hollombe
  65. 65. Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. James Ousby joousby@amazon.com

×