-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy-cf.yml
39 lines (38 loc) · 1.12 KB
/
deploy-cf.yml
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
AWSTemplateFormatVersion: 2010-09-09
Resources:
AwsCfTagsRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Sub AwsCfTags-role-${AWS::Region}
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
Policies:
- PolicyName: cf-describestacks
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: cloudformation:DescribeStacks
Resource: "*"
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: sts:AssumeRole
AwsCfTagsCustomResource:
Type: AWS::Lambda::Function
Properties:
FunctionName: AwsCfTags
Role: !GetAtt AwsCfTagsRole.Arn
Runtime: python3.9
Handler: index.lambda_handler
Code:
ZipFile: |
# aws_cf_tags.py
# CustomResourceParameter:
# Type: AWS::SSM::Parameter
# Properties:
# Name: /cf-custom-resources/AwsCfTags
# Type: String
# Value: !GetAtt AwsCfTagsCustomResource.Arn