Code Monkey home page Code Monkey logo

aws-saas-factory-serverless-workshop's Issues

Autoscale Health Check doesn't utilise ELB checks

The configuration for the Auto Scaling Group only utilises EC2 Health Checks. When leaving the lab running over for a few days noticed that 502 errors were returned in the HTML site. tracking down the problem the ALB had the two backing EC2 instances marked as 'unhealthy' and therefore were not routing traffic. However they remained in the Autoscale pool as they were marked as Healthy by the EC2 health check (rather than the defined ALB Health Check /health.html).

Suggest updating the Cloudformation to configure the Auto Scaling Groups HealthCheckType to use ELB health checks.

Lab 2: Unable to build React app

During Lab 2, the React app fails to build because webpack 4.x uses a legacy openssl provider, documented here.

A workaround is to add the following to website-lab2.sh:

export NODE_OPTIONS=--openssl-legacy-provider

Error:

Creating an optimized production build... Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at module.exports (/home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/webpack/lib/NormalModule.js:471:10) at /home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/webpack/lib/NormalModule.js:503:5 at /home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/webpack/lib/NormalModule.js:358:12 at /home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10) /home/ec2-user/environment/saas-factory-serverless-workshop/lab2/client/node_modules/react-scripts/scripts/build.js:19 throw err; ^

Lab 2 & 4 : Multi-tenant support does not work for more than 1 registration.

After completing lab 2 and all the steps successfully, i proceed to try to simulate a second tenant by signing up with a whole different set of fictitious account. However after multiple attempts, the "new" tenant was created but showed 122 orders & products in the dashboard of the app.

After completing lab 4, I was also not able to create a "new" tenant successfully.

Is this by design of the lab ?

Lab 2 / Step 15 issue, open blank page for product

Hi,

I created the tenant successfully. I can login to my tenant. On the dashboard I saw that we have 122 products and 122 Orders.
But when I click to create new product as guidance, the page is blank.

Please help to check and advise me.

Thank you!

master to main

Recent change by user brtrvn "Changing the name of the default branch to main from master" 9b1ff9b 2 days ago
Appears to have updated the code commit repo default branch to main however the Lab1 template CodePipeline source stage and CloudWatch Event still appear to reverence master.

Will update Lab1.template and submit PR

Nested stacks of [saas-workshop] are failing due to unsupported runtime Java8 issue.

Following documentation here

"eventSource": "lambda.amazonaws.com",
    "eventName": "CreateFunction20150331",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "cloudformation.amazonaws.com",
    "userAgent": "cloudformation.amazonaws.com",
    "errorCode": "InvalidParameterValueException",
    "errorMessage": "The runtime parameter of java8 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (java21) while creating or updating functions.",

Failed to copy assets from s3

Following command in README failed.

aws s3 cp s3://aws-saas-factory-serverless-saas-workshop-us-west-2/CopyS3Objects.jar ./
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden

Lab 1 - Step 15 : Git commit step does not trigger codepipeline.

Git push does commits the changes to CodeCommit but not on the main branch. The pipeline is set to trigger on main branch. Is this by design ?

Mitigated by creating a pull request OR directly committing to the main branch will trigger the Codepipeline to run.

Lab 2 Error on public-read ACL

Lab 2 errors out when running "sh website-lab2.sh" throwing a PutObject Access Denied when run with "--acl public-read".

If "Block Public Access" is disabled, the script works. This is not the recommended best practice for S3 buckets.

When deleting lab1.template the LogGroup with name /var/log/messages is getting recreated

When you delete the lab1.template, the template is deleting the LogGroup with name /var/log/messages but the EC2 instance has a cloudwatch logs agent which is creating a LogGroup with name /var/log/messages to log messages while EC2 is shutting down. The issue with this is later when you rerun the lab1.template in the same account it will fail saying LogGroup with name /var/log/messages already exists.

Lab2 website-lab2.sh issue replacing the API Gateway URL

Tried to start Lab2 again and found that there is an issue on step 2 :
The sed command in website-lab2.sh does not properly replace the API Gateway URL in the client/src/shared/config.jsfile.
There are no visible errors appart that later the call from the React Client to the REST API fails while trying to call the register URL /v1/registration
After fixing this issue and redeploying the React Client with website-lab2.sh I fall into another trap : the registration Lambda is returning an error :
Cannot register new tenant. Hot pool of RDS clusters has been depleted.

Deprecated PostgreSQL Version (13.6) in CloudFormation Template Causes Deployment Failure

The CloudFormation template fails to deploy due to a deprecated PostgreSQL version (13.6). This causes an error during the RDS resource creation, blocking the workshop's setup.

Resource handler returned message: "Cannot find version 13.6 for aurora-postgresql (Service: Rds, Status Code: 400, Request ID: fb96b633-7d68-4ff5-a98c-7c7a60f80e70)" (RequestToken: 22d733e0-1ade-8f69-e1b3-99801b99e611, HandlerErrorCode: InvalidRequest)

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/AuroraPostgreSQL.Updates.html#AuroraPostgreSQL.Updates.20180305.136X

Please update the template to use a supported PostgreSQL version for Aurora RDS.

Lab 2 npm audit vulnerabilities

During step 3 of Lab 2 (deploying the website), the npm package installation fails the audit so nothing gets installed (or built), resulting in no website behind CloudFront.

89 vulnerabilities (38 moderate, 50 high, 1 critical)

Can work-around by modifying website-lab2.sh to reference npm install --audit=false which is subjectively ok for a sample.

Instructions to setup the Lab1 environment

I am referring to the instructions for Lab1. It looks like that the instructions in the Readme assumes a lot of steps with the environment setup. Can we verify on what all steps should someone execute while trying the Lab1 in their AWS account and also for the subsequent labs.
As an example, there are multiple bash scripts and CF templates in the resources folder, do we need to run them in any definite order?

Base Structure for workshop

The manual assumes the account we are working on already have a pipeline provisioned where adding the repo will directly kick in the pipeline and build the stack, which is the case for people trying to do the workshop on their own.

Is there any document to show the base architect they started from ?

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.