Skip to content

Instantly share code, notes, and snippets.

version: '3.8'
services:
  peca-dev-db:
    image: postgres:13-alpine
    restart: always
    ports:
      - "5435:5432"
    environment:
 - POSTGRES_PASSWORD=abc1234

Q. what then is the difference between mapping an iam user or role to kubernetes roles and groups AND iam role for service account?

The difference between mapping an IAM user or role to Kubernetes roles and groups and using IAM roles for service accounts lies in the scope, usage, and purpose of these mappings. Here’s a detailed explanation:

Mapping IAM Users or Roles to Kubernetes Roles and Groups

Purpose:

  • IAM User/Role Mapping: This mapping is used to grant Kubernetes access to AWS IAM users or roles, allowing them to perform actions within the Kubernetes cluster.

Scope:

@edwardoboh
edwardoboh / workflow.md
Created May 31, 2024 12:54
Update Deployment Configuration
name: CI/CD Pipeline

on:
  push:
    branches:
      - main

jobs:
@edwardoboh
edwardoboh / cognito_auth.md
Last active May 10, 2024 07:18
Cognito Authentication and Authorization Flow

Cognito Authentication and Authorization Flow

When you use AWS Cognito User Pools to authenticate a user, the typical flow involves several steps where the user is authenticated, and tokens are issued and utilized. Here’s a step-by-step breakdown of this process:

1. User Authentication Flow

  • User Registration/Sign-up: The user signs up using their username and password, or through a third-party identity provider supported by Cognito.
  • User Sign-in: Upon successful sign-up, the user signs in. This can be done using a standard authentication flow (username and password) or through federated sign-in via external identity providers integrated with Cognito.
  • Authentication Challenge: Depending on the user pool's security configuration, the user may be required to respond to various challenges (like MFA or CAPTCHA) before authentication is confirmed.

2. Token Issuance

Once the user is authenticated:

@edwardoboh
edwardoboh / github_action_ref.md
Last active May 10, 2024 07:18
Github Action Ref for Actions

Ref in GitHub Workflows

Q: In GitHub Actions, when using the pull_request event, the workflow context and certain environment variables differ from those in a push event, which gives you flexibility in specifying where and how the actions are run in relation to the pull request.

A: In GitHub Actions, when using the pull_request event, the workflow context and certain environment variables differ from those in a push event, which gives you flexibility in specifying where and how the actions are run in relation to the pull request.

Key Concepts:

  1. github.ref: In the context of a pull request event (pull_request), the github.ref variable refers to the reference of the branch into which the pull request is being merged. This typically looks like refs/pull/:prNumber/merge.
@edwardoboh
edwardoboh / aws_azure_s2s_vpn.md
Created March 21, 2024 22:42
Site-to-Site VPN Connection Between Azure and AWS

Site-to-Site VPN Connection Between Azure and AWS

Architecture Diagram:

draw

Step 1: Configuring Azure

  1. Crate a resource group on Azure to deploy the resources on that
Resource Group Name: rg-azure-aws

Spring Boot

Make use of start.spring.io to bootstrap a new spring project.


Spring Boot helps you build applications quickly with the following features:

  • Spring Initializr: Helps with project bootstraping
  • Spring Boot Starter Project: Helps you to quickly define dependencies for your projects. They provide Convenient Dependency Descriptors.
  • Spring Boot Auto Configuration: Helps with automatically defining configuration based on the dependencies in the class path
  • Spring Boot Dev Tools: Make application changes without having to manually restart the server
@edwardoboh
edwardoboh / Spring and Spring Boot Notes.md
Last active July 16, 2023 09:39
My Notes on Spring Framework and Spring Boot

Spring Notes

Coupling is measured by the amount of work that needs to be done whenever a change needs to be made.

Spring Beans is any Java object managed by the Spring framework


The IoC container manages the lifecycle of beans and dependencies. It comprises:

  • Application Context: complex and most widely used
  • Bean Factory: Simple and rarely used

AWS Notes (Part 2)

Table of Content:

S3

S3 is a global service but the buckets are created specific to a region. Note that the buckets must have unique names across all regions and across all AWS accounts.

  • S3 stores objects (files). These objects have a key. Key = [prefix] + [object name]
  • In actuality, there is no concept of directories in S3, they are just prefixes.