generated from Sage-Bionetworks-IT/lambda-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
template.yaml
29 lines (27 loc) · 844 Bytes
/
template.yaml
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
# From https://github.com/aws-cloudformation/aws-cloudformation-macros/tree/master/S3Objects
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A Cloudformation macro to deploy objects to S3 buckets
Resources:
ResourceFunction:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.11
CodeUri: s3objects
Handler: resource.handler
Policies: AmazonS3FullAccess
MacroFunction:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.11
CodeUri: s3objects
Handler: macro.handler
Policies: AmazonS3FullAccess
Environment:
Variables:
LAMBDA_ARN: !GetAtt ResourceFunction.Arn
Macro:
Type: AWS::CloudFormation::Macro
Properties:
Name: S3Objects
FunctionName: !GetAtt MacroFunction.Arn