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

AWS CDK Support #83

Closed
dbettin opened this issue Feb 14, 2019 · 12 comments
Closed

AWS CDK Support #83

dbettin opened this issue Feb 14, 2019 · 12 comments

Comments

@dbettin
Copy link

dbettin commented Feb 14, 2019

Is this runtime supported in the CDK? If not, is this a possibility?

@softprops
Copy link
Contributor

What problem are you trying to solve?

@dbettin
Copy link
Author

dbettin commented Feb 14, 2019

We would like to use the CDK to deploy our aws assets as code as compared to serverless or SAML.

Currently, it seems like custom runtimes are not supported when creating lambdas via the CDK.

This might be a better issue for the CDK team, but I wanted to start here first.

@davidbarsky
Copy link
Contributor

davidbarsky commented Feb 14, 2019

@dbettin This is more of a CDK-related question, but my glance at the documentation makes me inclined to say no—CloudFormation should provide those hooks, but I can't find any mention of “provided runtimes” in CloudFormation or the CDK, which is odd. I'd suggest opening an issue on their repository.

@dbettin
Copy link
Author

dbettin commented Feb 14, 2019

Will do, thanks.

@dbettin dbettin closed this as completed Feb 14, 2019
@davidbarsky
Copy link
Contributor

@dbettin Having looked more closely at their source, you might be able to use this runtime in the CDK via:

new Runtime('Rust')

After all, Lambda expects just a ZIP file and the Ruby25 runtime is technically a provided runtime.

(But I'd confirm with the CDK team first.)

@dbettin
Copy link
Author

dbettin commented Feb 14, 2019

Awesome! I completely overlooked that comment when I took a look at that piece of code. I will confirm with the team.

Thanks!

@dbettin
Copy link
Author

dbettin commented Feb 14, 2019

FYI - the implemented the feature already. aws/aws-cdk#1761

@davidbarsky
Copy link
Contributor

@dbettin Great to hear! We should have an example with the CDK somewhere, maybe.

@happyspace
Copy link

Just to be clear the solution mentioned above aws/aws-cdk#1761 by @dbettin

    const rustFun = new lambda.Function(this, 'rust-hello', {
      code: lambda.Code.fromAsset('lambdas//lambdas.zip'),
      runtime: Runtime.PROVIDED_AL2,
      handler: 'doesnt.matter',
      timeout: Duration.seconds(30),
      memorySize: 1024,
      environment: {
        "RUST_BACKTRACE": '1',
      },
    });

Provided_AL2 = Amazon Linux 2

image

@Archisman-Mridha
Copy link

any work going on related to this thread ?

@calavera
Copy link
Contributor

calavera commented Apr 19, 2022

@Archisman-Mridha this project from the community is awesome: https://github.com/rnag/rust.aws-cdk-lambda

@Archisman-Mridha
Copy link

@Archisman-Mridha this project from the community is awesome: https://github.com/rnag/rust.aws-cdk-lambda

Oh thankyou ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants