terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
892 stars 662 forks source link

Further revise and document how to use AWS SAM with this module #380

Closed azend closed 1 year ago

azend commented 1 year ago

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

Is your request related to a problem? Please describe.

The README file of this repository attempts to document how to use AWS SAM with projects using this repository. Specifically how to locally test functions with Docker and how to accelerate development by syncing application code with the remote hosted function. This documentation however acts as a simplistic overview of how to use SAM and does not go into any detail of how to setup an environment of this module and SAM together. Moreover, the commands listed in the documentation use arguments not present in either the SAM or Terraform help files. For newcomers to this project (myself included), issues resulting from errors between documentation steps are unresolvable as the knowledge required to configure this sophisticated module as well as external SAM tooling they may not be familiar with is unavailable.

Describe the solution you'd like.

  1. Review and revise documentation to verify that the steps/commands listed in the current documentation are as designed and functional.
  2. Elaborate on how to configure this module to be used with SAM, what steps need to be taken to use SAM, any additional environment settings or configuration required for this feature to be used, and (hopefully) a troubleshooting section describing common environment issues and how to resolve them

Describe alternatives you've considered.

I have read and reviewed all module code, the serverless.tf repo, the AWS SAM documentation, and the Terraform documentation for clues. None point towards how to configure a working environment.

Additional context

I am relatively familiar with Terraform, very familiar with application development, and unfamiliar with AWS SAM. I would be happy to contribute to resolving this issue but will require instruction as to how to get said features working beforehand.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

azend commented 1 year ago

Since this ticket has gone stale from inactivity, I may as well update to say that at the time of submitting this ticket, I did not realize how bleeding edge of a feature interoperability with AWS SAM was. I’ve since investigated and learned more but this feature is barely functions let alone robust and production ready. It should not be in the documentation in a format that sets expectations that this feature actually works. Many example configurations of this project will cause fatal errors. For those trying this feature in the future, it should be noted that you need the very latest version of the Sam cli for this to work. Other versions do not include terraform extensions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

bryantbiggs commented 1 year ago

@moelasmar would you care to take a look at this issue and provide any feedback if you get some time?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 1 year ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.