Posts

Showing posts from March, 2026

aws cloudformation creating lamda

 First of all we need to run the following scripts to create our lambda function in python/  AWSTemplateFormatVersion : ' 2010-09-09 ' Description : ' AWS Lambda Function with IAM Role and Log Group ' Resources :   # 1. IAM Role for Lambda Execution   LambdaExecutionRole :     Type : AWS::IAM::Role     Properties :       AssumeRolePolicyDocument :         Version : ' 2012-10-17 '         Statement :           - Effect : Allow             Principal :               Service : [ lambda.amazonaws.com ]             Action : [ ' sts:AssumeRole ' ]       ManagedPolicyArns :         - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole   # 2. CloudWatch Log Group (Prevents logs from being kept forever)   LambdaLogGroup :  ...

aws eks create using cloud formation

To create a EKS using cloud formation, we can use the following cloud formation code. This is not an EKS Auto AWSTemplateFormatVersion : ' 2010-09-09 ' Description : ' EKS Cluster and Managed Node Group ' Parameters :   ClusterName :     Type : String     Default : ' my-eks-cluster '   VpcId :     Type : AWS::EC2::VPC::Id   SubnetIds :     Type : List<AWS::EC2::Subnet::Id>     Description : ' Select at least two subnets in different AZs ' Resources :   # 1. IAM Role for the EKS Cluster (Control Plane)   EKSClusterRole :     Type : AWS::IAM::Role     Properties :       AssumeRolePolicyDocument :         Version : ' 2012-10-17 '         Statement :           - Effect : Allow             Principal :               Service : [ eks.amazonaws.com ] ...