0 Down time
GraphQL
NextJS
Mongo
VITE
MEAN
MERN
Rust
Spring
Hibernate
Liquid
SASS
REST
Spring
React
Angular

From Github to AWS

Deploying an Angular app to AWS when merging to the master branch on GitHub involves several steps, including setting up AWS services, configuring GitHub Actions, and creating deployment scripts. Here's a general overview of the process:

  1. Set Up AWS Services:

    a. S3 Bucket: Create an Amazon S3 bucket to store your Angular app's static files (HTML, CSS, JS).

    b. CloudFront Distribution (Optional): Set up an Amazon CloudFront distribution to serve your app's content globally for better performance.

  2. Configure AWS Credentials:

    a. Create an IAM user with appropriate permissions (S3, CloudFront if used).

    b. Generate AWS Access Key and Secret Access Key for the IAM user.

    c. Configure these credentials on your local machine or your CI/CD environment where the deployment will take place. This can be done using environment variables or AWS CLI configuration.

  3. Set Up GitHub Actions:

    a. In your Angular project repository on GitHub, create a .github/workflows directory.

    b. Create a YAML file (e.g., deploy.yml) in this directory to define the GitHub Actions workflow.

    c. Configure the workflow to trigger on merges to the master branch.

  4. Define Deployment Steps:

    a. Within the workflow file, define steps to build and deploy the Angular app:

more...

AWS had a little lambda

AWS Lambda

I recently had the opportunity to develop a serverless application with the use of AWS Lambda and API Gateway. It was my first introduction to the technology. My coworker suggested the solution as a way to keep cost down for for hosting a relatively simple  REST API needed for multiple other services in our main application. We started with a Spring Boot Java application connected to DynamoDB in a docker container. Then we created a Lambda file to define the API endpoints. A Lambda file in this case is was a single Java class with methods for each endpoint which is basically the same thing as a traditional Spring Boot Controller. The Lambda file called an additional service file to do the core logic which also depended on a CRUD Repository file that integrates to DynamoDB. This Lambda project is deployed to AWS via a serverless.yml file that defines the paths and parameters for the Lambda file. The challenges I faced were mostly learning to use AWS API Gateway and serverless.yml. We used the original spring controller to debug during development. Once we got it working it seemed rather simple though. 

AWS Lambda is a serverless computing service provided by Amazon Web Services (AWS) that enables you to run code in response to events without the need to provision or manage servers. With AWS Lambda, you can build and deploy applications using a "pay-as-you-go" model, where you only pay for the compute time that your code actually consumes.

Key features and concepts of AWS Lambda include:

Serverless Architecture: With AWS Lambda, you don't need to worry about server provisioning, scaling, or maintenance. AWS takes care of the underlying infrastructure, allowing you to focus on writing and deploying code.

Event-Driven Execution: AWS Lambda functions are triggered by events from various AWS services or custom sources. These events can include changes in data, HTTP requests, database updates, file uploads, and more.

more...

script