AWS Lambda Create a Lambda Function with CloudFromation: Difference between revisions
Jump to navigation
Jump to search
Line 64: | Line 64: | ||
- ... | - ... | ||
[[AWS_Lambda_Concepts#Memory_Configuration|MemorySize]]: 128 | [[AWS_Lambda_Concepts#Memory_Configuration|MemorySize]]: 128 | ||
[[AWS_Lambda_Concepts#Role|Role]]: | [[AWS_Lambda_Concepts#Role|Role]]: !GetAtt LambdaExecutionRole.Arn | ||
[[AWS_Lambda_Concepts#Timeout|Timeout]]: ''Integer'' | [[AWS_Lambda_Concepts#Timeout|Timeout]]: ''Integer'' | ||
[[AWS_Lambda_Concepts#Concurrent_Execution|ReservedConcurrentExecutions]]: ''Integer'' | [[AWS_Lambda_Concepts#Concurrent_Execution|ReservedConcurrentExecutions]]: ''Integer'' |
Revision as of 21:42, 4 April 2019
External
Internal
Resource Types
AWS::Lambda::Function
Resources: LambdaExecutionRole: Type: AWS::IAM::Role Properties: RoleName: playground-lambda-execution-role Path: /service-role/ AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Effect: 'Allow' Principal: Service: - "lambda.amazonaws.com" Action: - "sts:AssumeRole" Policies: - PolicyName: 'inline-policy' PolicyDocument: Version: '2012-10-17' Statement: - Effect: 'Allow' Action: - 'logs:CreateLogGroup' - 'logs:CreateLogStream' - 'logs:PutLogEvents' Resource: - 'arn:aws:logs:*:*:*' LambdaExample: Type: "AWS::Lambda::Function" Properties: FunctionName: my-lambda Description: 'Some description' Code: S3Bucket: a-bucket S3Key: a-deployment-package # S3ObjectVersion: String # ZipFile: String Handler: handler Runtime: java-1.8.0-openjdk Environment: Variables: MY_ENV_VAR: 'my value' VpcConfig: SubnetIds: - red-subnet SecurityGroupIds: - ... MemorySize: 128 Role: !GetAtt LambdaExecutionRole.Arn Timeout: Integer ReservedConcurrentExecutions: Integer DeadLetterConfig: DeadLetterConfig KmsKeyArn: String Layers: - String TracingConfig: TracingConfig Tags: Resource Tag