Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFormation: Custom resource support for .NET Core Lambda functions #26

Open
NeilBostrom opened this issue Jan 4, 2017 · 14 comments
Labels
feature-request A feature should be added or improved. m Effort estimation: medium module/lambda-client-lib p2 This is a standard priority issue queued

Comments

@NeilBostrom
Copy link

I wanted to write some custom resources for my CloudFormation templates using .NET core in AWS Lambdas. All the samples are in JS and Python at the moment:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough-custom-resources-lambda-lookup-amiids.html

I'm assuming CloudFormation event models are not currently supported by the SDK? I found S3 models and others but no CloudFormation ones.

I've written a version of the request / response model for CloudFormation in Lambdas. Is this something you would be interested in me creating a PR for?

I also have a working version of cfn-response in .NET which feels like it would be super handy to have in the SDK for people to be able to call on their Lambda response calls. The version is based around the documentation at:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-cfnresponsemodule

Let me know if you are interested in any of the above and I can look at creating a PR for it.

@normj normj added the Question label Jan 5, 2017
@normj
Copy link
Member

normj commented Jan 5, 2017

I'm not familiar with this Lambda/CloudFormation feature. Let me process your links and think about how it fits in with our tooling.

@zapproved
Copy link

I would be happy to be the first step be adding a nuget package for the event objects (say, Amazon.Lambda.CloudFormationEvents) so that work on this could start to gel.

@Muppets
Copy link

Muppets commented Mar 21, 2017

Did you want me to throw some of my code in to a PR?

@oldnerd
Copy link

oldnerd commented Feb 5, 2018

Did anything come of this? I haven't found an example. I'm able to catch the incoming requests via SNS/Lambda integration, but don't see an event class for this or a reponse class object

@alexconwayspok
Copy link

I have an interest in creating Lambda backed custom resources in .NET as well. Therefore I too am curious as to whether anything came out of this.

@NeilBostrom would you be comfortable open sourcing your request / response models and your .net port of cfn-response?

@NeilBostrom
Copy link
Author

@alexconwayspok Sure, it's a few classes and a sample that looks up a specific AMI by name.

https://gist.github.com/NeilBostrom/97048a42e536a3b94f37dce2e4ac0c38

@swlasse
Copy link

swlasse commented Jul 12, 2018

Thanks for the gist @NeilBostrom. It would be great to see this feature within the SDK some day.

@NeilBostrom
Copy link
Author

@normj Did you want me to try to put a PR for this feature together? Might need some thoughts from you and your team on how you would want it integrated with the rest of the SDK but I'm happy to help do some legwork.

@swlasse
Copy link

swlasse commented Jul 13, 2018

@NeilBostrom FWIW, in case you submit a PR, I will be happy to provide my view on it.

@diehlaws diehlaws added guidance Question that needs advice or information. and removed Question labels Jan 3, 2019
@matheusmaximo
Copy link

Any news about this?

@scottjbaldwin
Copy link

I have the same requirement, currently I want to create a serverless application using net core, and need to use a custom cloudformation resource to configure parts of Cognito that are not accessible via cloud formation. I am currently using a JS Custom Resource to achieve this, but would be much better to have a homogeneous approach.

@NeilBostrom , thanks for sharing your code, this is at least a starting point.

@johniwasz
Copy link

Add one more vote for this feature. I'd like to be able to integrate C# lambda with my CloudFormation-driven deployment process.

@NeilBostrom Thanks for the sample code. It'll be useful in the meantime.

@ApocDev
Copy link

ApocDev commented Sep 6, 2019

I took @NeilBostrom Gist, and expanded it to make life a bit easier.

You can find my changes here: https://gist.github.com/ApocDev/11ce0d06ad06a0d63f67bbf184aa388b

Example of usage (to create MySQL users after database creation): https://gist.github.com/ApocDev/d6b13f932564492cea780b90dd537608

@ashishdhingra ashishdhingra added module/lambda-client-lib feature-request A feature should be added or improved. and removed guidance Question that needs advice or information. labels Sep 14, 2020
@SaurabhHarwande
Copy link

SaurabhHarwande commented Jan 2, 2021

I had the same requirement and decided to build a Helper library around this. There is no documentation yet, but code and usage help is available on Gitlab.
Available as Nuget Package.

@ppittle ppittle added the medium label Aug 21, 2021
@hunanniu hunanniu added the A label Mar 17, 2022
@ashishdhingra ashishdhingra added p2 This is a standard priority issue m Effort estimation: medium and removed A labels Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. m Effort estimation: medium module/lambda-client-lib p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests