Slide 1

Slide 1 text

React, JAVA e AWS cloud, criando um crud e fazendo upload de imagens para S3

Slide 2

Slide 2 text

Weder Mariano de Sousa Center Leader Specialist Senior - NTTDATA https://www.linkedin.com/in/wedermarianodesousa/ AWS User Group Goiânia https://github.com/weder96 GOJava

Slide 3

Slide 3 text

Agenda Eric Z. Beard and Rico Huijbers CDK for Complex Enterprise Applications The Problem AWS Cloud Development Kit (AWS CDK) FrontEnd BackEnd Show me the Code And f i n a l l y … Resources Q & A

Slide 4

Slide 4 text

Architecture FrontEnd BackEnd AWS S3 React Java

Slide 5

Slide 5 text

Architecture FrontEnd BackEnd AWS S3 React Java http http CDK CDK

Slide 6

Slide 6 text

AWS Cloud Development Kit (AWS CDK)

Slide 7

Slide 7 text

What is AWS CDK? The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework for defining cloud infrastructure as code with modern programming languages and deploying it through AWS CloudFormation. https://aws.amazon.com/cdk/faqs/ https://aws.amazon.com/cdk/?nc1=h_ls

Slide 8

Slide 8 text

AWS Cloud Development Kit (CDK) A multi-language software development framework for modeling cloud infrastructure as reusable components

Slide 9

Slide 9 text

Ser v er l es s A pp In t eg r a t ion / F ou n da t ion a l Ser v ic es C on t a in er s C I/ C D Main Components Core Framework AWS Construct Library AWS CDK CLI App Stacks Resources

Slide 10

Slide 10 text

C DK C L I St a c ks & C on s t r u c t s Sou rc e Code Temp l a t es + A s s et s C l ou d A s s embl y C l oud R es ou r c es A W S C l ou dF or ma t ion https://www.youtube.com/watch?v=R7wSTZ54gNk&t=261s Development Workflow execute synthesize deploy provision

Slide 11

Slide 11 text

cdk deploy git push Fubuki’s Account Saitama’s Account Fubuki Saitama Shared Services Account Pipeline Dev Account Homol Account Prod Account Source Control Best Practice – Deploy to multiple accounts

Slide 12

Slide 12 text

Application Development

Slide 13

Slide 13 text

Model continuous delivery pipelines as part of your infrastructure code. Easily model cross-account and cross-region pipeline configurations. Pipelines are self modifying as you push your CDK code to origin. CDK Pipelines Continuous delivery for AWS CDK applications

Slide 14

Slide 14 text

N E W Consolidated construct library (aws-cdk-lib), experimental modules distributed separately. New CDK Watch functionality. For JavaScript, TypeScript, Java, Python, .NET and Go. DOP315 - What's new with AWS CloudFormation and AWS CDK ​ G E N E R A L L Y A V A I L A B L E T O D A Y AWS Cloud Development Kit (CDK) v2

Slide 15

Slide 15 text

Difference between v2 and v1 "dependencies": { "@aws-cdk/aws-amplify": "^1.125.0", "@aws-cdk/aws-appsync": "^1.125.0", "@aws-cdk/aws-codepipeline": "^1.125.0", "@aws-cdk/aws-cognito": "^1.125.0", "@aws-cdk/aws-lambda": "^1.125.0", "@aws-cdk/aws-sns": "^1.125.0", "@aws-cdk/core": "1.125.0", "@aws-cdk/pipelines": "^1.125.0", } "dependencies": { "aws-cdk-lib": "2.0.0", "constructs": "^10.0.0", "@aws-cdk/aws-iot-alpha": "^2.0.0-alpha.0" } import { App, Stack } from "@aws-cdk/core"; const lambda = require("@aws-cdk/aws-lambda"); import { App, Stack } from "aws-cdk-lib"; const s3 = require("aws-cdk-lib/aws-s3"); CDK v1 CDK v2

Slide 16

Slide 16 text

N E W Share open-source construct libraries with the wider cloud development community. https://constructs.dev ​ G E N E R A L L Y A V A I L A B L E T O D A Y https://aws.amazon.com/pt/blogs/developer/construct-hub-preview/ AWS CDK Construct Hub

Slide 17

Slide 17 text

N E W ​ G E N E R A L L Y A V A I L A B L E T O D A Y https://aws.amazon.com/pt/blogs/developer/construct-hub-preview/ AWS CDK Construct Hub

Slide 18

Slide 18 text

Talking is easy, show me the code.

Slide 19

Slide 19 text

FrontEnd

Slide 20

Slide 20 text

Architecture FrontEnd FrontEnd Mode Dark Breadcumbs Loading Toast Messages

Slide 21

Slide 21 text

List Buckets

Slide 22

Slide 22 text

List Objects

Slide 23

Slide 23 text

Upload Files - S3

Slide 24

Slide 24 text

Create Bucket

Slide 25

Slide 25 text

BackEnd

Slide 26

Slide 26 text

Architecture BackEnd BackEnd

Slide 27

Slide 27 text

Upload File Bucket

Slide 28

Slide 28 text

Download File Bucket

Slide 29

Slide 29 text

List Objects and Bucket

Slide 30

Slide 30 text

Swagger - Open ui v3

Slide 31

Slide 31 text

And finally…

Slide 32

Slide 32 text

Best Practice: Contribute

Slide 33

Slide 33 text

Dive Deeper GitHub https://github.com/aws/aws-cdk CDK Pipelines https://aws.amazon.com/blogs/developer/cdk-pipelines-continuous-delivery-for-aws-cdk-applications/ Sample Code in this presentation https://github.com/rix0rrr/devoops-sample A Landing Zone Implemented with CDK https://github.com/aws-samples/aws-secure-environment-accelerator Testing infrastructure with the CDK https://aws.amazon.com/blogs/developer/testing-infrastructure-with-the-aws-cloud-development-kit-cdk/ Get Started with the AWS CDK AWS CDK Online Workshop https://cdkworkshop.com AWS CDK Samples on GitHub https://github.com/aws-samples/aws-cdk-examples Resources

Slide 34

Slide 34 text

• Weder Mariano de Sousa Center Leader Specialist Senior - NTTDATA https://www.linkedin.com/in/wedermarianodesousa/ AWS User Group Goiânia https://github.com/weder96 GOJava Q & A

Slide 35

Slide 35 text

THANK YOU