Giter Club home page Giter Club logo

aws-samples / designing-cloud-native-microservices-on-aws Goto Github PK

View Code? Open in Web Editor NEW
285.0 10.0 76.0 45.87 MB

Introduce a fluent way to design cloud native microservices via EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.

License: Other

JavaScript 0.65% TypeScript 12.63% Shell 3.58% Java 82.14% Gherkin 0.27% Dockerfile 0.73%
aws ecr ecs fargate serverless lambda dynamodb eventbridge microservices cloudnative

designing-cloud-native-microservices-on-aws's Issues

FIX: change the role to the new AWSLambda_FullAccess managed policy

Initial deployment via cdk deploy will fail. ROOT CAUSE: aws:policy/AWSLambdaFullAccess managed policy has since been depreciated, resulting in Policy arn:aws:iam::aws:policy/AWSLambdaFullAccess does not exist or is not attachable. (Service:

AmazonIdentityManagement; Status Code: 404; Error Code: NoSuchEntity error message by CDK.

FIX: change the role to the new AWSLambda_FullAccess managed policy, deployment then succeeds.

Fix the test ALB endpoint

Run Test - updating curl command to point to my deployed API endpoint, execution fails with 502 Bad Gateway status.

curl --header "Content-Type: application/json" --request POST --data '{"items":[{"productId":"5678","qty":2,"price":200}]}' http://Coffe-AlbSv-S03YRO6K0UPD-1527471424.ap-southeast-2.elb.amazonaws.com/order

The ALB load balancer deployed is failing health status, draining connections as target deregistration is in progress.
On inspecting CloudWatch Logs, Java NullPointerException is reported in the handler code

java.lang.NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
  at solid.humank.coffeeshop.cofee.sls.orders.OrderCreatedHandler.handleRequest(OrderCreatedHandler.java:46)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.base/java.lang.reflect.Method.invoke(Unknown Source)

Fix the content reference link to current repo.

All files make reference to an EventStormingWorkshop repository name, rather than its current designing-cloud-native-microservices-on-aws repository name. A potential confusion for readers.

Fix file content in module 05-deploy-applications-by-cdk/README.md

  • Deploy Instruction mentions changing github owner but repo also needs changing from EventStormingWorkshop to designing-cloud-native-microservices-on-aws.
  • Create build project screenshot UI has since changed
  • Connect with GitHub screenshot shows old repository name and old AWS CodeBuild icon branding.

Fix configuration for lambda functions

This step uses AWS CLI to reference an coffee-sls-OrderCreatedHandler function that has not been deployed previously, and obviously fails.

Instructions do not clearly mention the need for the user to commit changes and git push -u origin master is required. This then triggers the CodeBuild project, thereby deploying the Lambda function. This could be an error prone step for many users.

CodeBuild build will fail during POST_BUILD stage, with below output:

[Container] 2021/09/27 05:16:41 Running command sam deploy --template-file ./packaged.yaml --stack-name coffee-sls --capabilities CAPABILITY_IAM

    Deploying with following values
    ===============================
    Stack name                 : coffee-sls
    Region                     : None
    Confirm changeset          : False
    Deployment s3 bucket       : None
    Capabilities               : ["CAPABILITY_IAM"]
    Parameter overrides        : {}

Initiating deployment
=====================
AcceptOrderFunction may not have authorization defined.

Waiting for changeset to be created..
Error: Failed to create changeset for the stack: coffee-sls, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Template error: instance of Fn::GetAtt references undefined resource AcceptOrder

[Container] 2021/09/27 05:16:48 Command did not exit successfully sam deploy --template-file ./packaged.yaml --stack-name coffee-sls --capabilities CAPABILITY_IAM exit status 1
[Container] 2021/09/27 05:16:48 Phase complete: POST_BUILD State: FAILED
[Container] 2021/09/27 05:16:48 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: sam deploy --template-file ./packaged.yaml --stack-name coffee-sls --capabilities CAPABILITY_IAM. Reason: exit status 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.