Please add DotNetTriggerFunction
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- aws, csharp, typescript
Research direction
Start by comparing the existing DotNetFunction construct with the CDK TriggerFunction API and its TriggerFunctionProps usage shown in the issue. Implement the analogous DotNetTriggerFunction with ProjectDir-based packaging while preserving trigger configuration such as VPC, handler, timeout, environment, and security groups; done means the example no longer requires manually creating a ZIP before deployment.
Written by the indexing model from the issue text.
Description
I use DotNetFunction in my CDK app instead of the normal Function, so that my Lambda function is packaged during synthesis without manually calling dotnet lambda package ....
However, CDK also has a TriggerFunction which runs during deployment. For example:
var initDatabaseFunction = new TriggerFunction(this, "InitDatabase", new TriggerFunctionProps()
{
Runtime = Runtime.DOTNET_8,
Vpc = props.Vpc,
VpcSubnets = new SubnetSelection()
{
SubnetGroupName = "Database",
},
//NOTE: need to call "dotnet lambda package" to create this ZIP file
Code = Code.FromAsset("../functions/DatabaseInitFunction/bin/Release/net8.0/DatabaseInitFunction.zip"),
Handler = "DatabaseInitFunction",
Timeout = Duration.Minutes(5),
Environment = new Dictionary<string,string>()
{
{ "VpcCidr", props.Vpc.VpcCidrBlock},
{ "Secret" , props.DatabaseCluster.Secret.SecretName }
},
SecurityGroups = new SecurityGroup[] {securityGroup},
});
It would be useful to have a similar DotNetTriggerFunction (or TriggerDotNetFunction?) like this:
var initDatabaseFunction = new DotNetTriggerFunction(this, "InitDatabase", new TriggerFunctionProps()
{
Runtime = Runtime.DOTNET_8,
Vpc = props.Vpc,
VpcSubnets = new SubnetSelection()
{
SubnetGroupName = "Database",
},
ProjectDir = "../functions/DatabaseInitFunction",
Handler = "DatabaseInitFunction",
Timeout = Duration.Minutes(5),
Environment = new Dictionary<string,string>()
{
{ "VpcCidr", props.Vpc.VpcCidrBlock},
{ "Secret" , props.DatabaseCluster.Secret.SecretName }
},
SecurityGroups = new SecurityGroup[] {securityGroup},
});
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 4
- Avg merge
- 8h 23m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cdklabs/awscdk-lambda-dotnet
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cdklabs/awscdk-lambda-dotnet#588 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
cdklabs/awscdk-lambda-dotnet#267 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in cdklabs/awscdk-lambda-dotnet
Similar issues
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
ranxianglei/billion-context#7860 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
agent-oc-find-bugs api complexity → simple payment-methods recurring contributions reviewed stripe
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opencollective/opencollective#9177 ·