Post

Visualizzazione dei post da settembre, 2023

How to Create a DocumentDB and use it from Lambda

Immagine
  Everybody loves MongoDB and there are a lot of way to use it: deploy it in an EKS or K8s, an Atlas installation or even deploy on premis. Only the Atlas way gives you the power of easy management, because the service is totally owned by the vendor. There is another solution if you want to use it in AWS: DocumentDB, which is a partially managed service Database totally compatible with MongoDB. It gives you the power to have patching managed by Amazon but requires - believe or not - a little bit of confidence on networking. ASSUMPTIONS To create the cluster AWS needs to be sure that if an instance can be added, there is a chance to work in an high availability zone. It means that you need to create a VPC spanned into multiple AZ and different subnets should work in different AZ. VPC We will use aws cli for all. In our case we will create a VPC with just 2 subnets, each in a different Availability zone.  We will save vpc id and subnet id: the first is important for querying, th...

EKS - Create an automatic way to build a K8s Cluster and expose it on Internet

Immagine
  AWS gives you the ability to create an EKS cluster inside a VPC, but it is so important to expose the web service on Internet trying to automate as much as possible. To expose on internet, the best way is to use the Application Load Balancer that points to an internal Service to EKS. To create it with a CI/CD it is important of course to have as much script automation as possible. So let's explore each stage. THE VPC The first step is of course to create a VPC inside your account. To be as fast as possible, it is essential to have a VPC with 2 Public Subnet and a security group that allows the machines to access and be accessed from all. This is intended of course for just testing purpose, it means that you need to create the rules properly in the feature, allow each subnet to be accessed only by your Control Node of EKS So create it and take apart the value of the subnet, they will be used in the future THE EKS To create the EKS we will use of course the existing AWS cli feature...