User Tools

Site Tools


aws:aws-cloudformation-lambda

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

aws:aws-cloudformation-lambda [23/12/2024 11:08] – created andrewaws:aws-cloudformation-lambda [30/05/2025 09:38] (current) – removed andrew
Line 1: Line 1:
-====== lambda yaml cloudformation ====== 
- 
- 
-<code yaml> 
-AWSTemplateFormatVersion: 2010-09-09 
-Parameters: 
-  var1: 
-    Type: CommaDelimitedList 
-    Description: general variable 
-Resources: 
-  LambdaRole: 
-    Type: 'AWS::IAM::Role' 
-    Properties: 
-      AssumeRolePolicyDocument: 
-        Version: 2012-10-17 
-        Statement: 
-          - Effect: Allow 
-            Principal: 
-              Service: 
-                - lambda.amazonaws.com 
-            Action: 
-              - 'sts:AssumeRole' 
-  LambdaPolicy: 
-    Type: 'AWS::IAM::Policy' 
-    Properties: 
-      PolicyName: LambdaPolicy 
-      PolicyDocument: 
-        Version: 2012-10-17 
-        Statement: 
-          - Effect: Allow 
-            Action: 
-              - 'logs:CreateLogGroup' 
-              - 'logs:CreateLogStream' 
-              - 'logs:PutLogEvents' 
-            Resource: '*' 
-      Roles: 
-        - !Ref LambdaRole 
-        -  
-  Lambda1: 
-    Type: 'AWS::Lambda::Function' 
-    DeletionPolicy: Delete 
-    Properties: 
-      Code: 
-        ZipFile: !Sub | 
-          import cfnresponse 
-          import json 
-          import boto3 
-          def lambda_handler(event, context): 
-            print('REQUEST RECEIVED:\n' + json.dumps(event)) 
-            return 
-             
-      FunctionName: Lambda1 
-      Tags: 
-        - Key: "RepoName" 
-          Value: "Lambda1_repo" 
-        - Key: "CreatedBy" 
-          Value: "CloudFormation" 
- 
-      Handler: index.lambda_handler 
-      Role: !GetAtt  
-        - LambdaRole 
-        - Arn 
-      Runtime: python3.10 
-      Timeout: 10 
- 
- 
-</code> 
  
aws/aws-cloudformation-lambda.1734952120.txt.gz · Last modified: by andrew

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki