cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

AWS::Lambda::Function inlineCode support for Ruby

Open kstys opened this issue 4 years ago • 6 comments

Name of the resource

AWS::Lambda::Function

Description

Manually creating a Lambda function in AWS allows you to pick from NodeJS, Python, Ruby, and some others. As it stands for CloudFormation templates, AWS::Lambda::Function can not have the property Runtime: ruby2.7 (or older versions) and use inline code via the property:

Code: 
   ZipFile: |
      # code

This issue https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/80 has garnered enough attention that I believe it is worthy of implementing inline Ruby code if possible.

kstys avatar Oct 19 '21 20:10 kstys

The bot has marked this 'Shipped' which, according to the README.md file, means it's live in CloudFormation, however when I try to bring a Lambda up with 'Ruby2.7' using inline ZipFile code I receive the following Create Failed error on rollback:

Resource handler returned message: "Invalid request provided: The ZipFile attribute is not supported for the runtime 'Ruby2.7'" (RequestToken: <TOKEN_OMITTED>, HandlerErrorCode: InvalidRequest)

Is this functionality not available yet?

bananastalktome avatar Jun 21 '22 14:06 bananastalktome

Seems like this was closed by mistake, reopening it.

prerna-p avatar Jun 21 '22 17:06 prerna-p

@cfn-github-issues-bot got my hopes up. Where in the roadmap is this @prerna-p ? Looks like it was "We're working on it" 2021-11-18 and "Coming Soon" 2022-03-04, but is it all the way back to "Researching" now?

bananastalktome avatar Jun 21 '22 18:06 bananastalktome

I will defer to @micahduron from AWS Lambda team to provide insight on the timelines for this. Thank you reaching out!

prerna-p avatar Jun 21 '22 18:06 prerna-p

Defining Lambda function code inline within a CloudFormation template is currently only supported for Node and Python runtimes, as described in our documentation at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html.

We do not currently have any plans to extend inline CloudFormation functions to support Ruby. The issue #80 cited above has only one request for Ruby support; the bulk of the discussion relates to Python and Node.

jtuliani avatar Jul 12 '22 12:07 jtuliani

@jtuliani Is lack of number of requests the only reason Ruby support will not be supported for CloudFormation templates? I counted 9 unique interactions with this post and ruby interactions in #80.

The main reason I created this request is because AWS Lambda in the UI supports creating Lambda functions in Ruby while CloudFormation templates do not. This creates an inconsistency between the resource creation available in the UI and the resource creation and maintenance via automatic deployments.

As noted in https://github.com/aws/aws-lambda-dotnet/issues/1246#issuecomment-1185035871 regarding adding dotnet support to CloudFormation templates via ZipFile, the language must be dynamically typed which Ruby is so the technical requirements do show this is possible.

Please consider keeping the issue open because it will help better pair the AWS UI and CloudFormation template capabilities as well as add more support and reach.

kstys avatar Jul 13 '22 19:07 kstys