forked from SheyNjila1/Assignments
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmappings.yaml
More file actions
46 lines (38 loc) · 1.04 KB
/
mappings.yaml
File metadata and controls
46 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
AWSTemplateFormatVersion: 2010-09-09
Description: >-
Sample template to copy file from source S3 bucket to Destination S3 bucket using Lambda function
Parameters:
Environment:
Type: String
AllowedValues:
- jsdev
- pydev
Mappings:
LanguageMap:
jsdev:
Runtime: "nodejs14.x"
name: 'jsdev'
pydev:
Runtime: "python3.7"
name: 'pydev'
Resources:
HelloLambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: sts:AssumeRole
LambdaFunction:
Type: AWS::Lambda::Function
Properties:
Role: !GetAtt HelloLambdaRole.Arn
Runtime: !FindInMap [LanguageMap , !Ref Environment , Runtime]
Handler: index.my_handler
Code:
ZipFile: |
def my_handler(event, context):
message = 'Hello Lambda World!'
return message