You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Libraries/src/Amazon.Lambda.Annotations/README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,35 @@ public class Functions
53
53
}
54
54
```
55
55
56
+
## Using References To Other Resources and Parameters in the template
57
+
58
+
To use a reference to a Resource or Parameter in the template, prefix the value with `@`. Example shows using CloudFormation template Parameter named `LambdaRoleParameter` for the role of the Lambda function.
59
+
```csharp
60
+
publicclassFunctions
61
+
{
62
+
[LambdaFunction( Role="@LambdaRoleParameter")]
63
+
[RestApi("/plus/{x}/{y}")]
64
+
publicintPlus(intx, inty)
65
+
{
66
+
returnx+y;
67
+
}
68
+
}
69
+
```
70
+
71
+
and place in your template:
72
+
73
+
```
74
+
75
+
"Parameters": {
76
+
"LambdaExecutionRole": {
77
+
"Type": "String"
78
+
}
79
+
},
80
+
81
+
```
82
+
83
+
The above two examples when used together will the use the value of LambdaRoleParameter as the role during deployment.
84
+
56
85
## Source Generator
57
86
58
87
To bridge the gap from Lambda Annotations programming model to the normal programming model a .NET source generator is included in this package.
0 commit comments