Skip to content

Conversation

GiamPy5
Copy link
Contributor

@GiamPy5 GiamPy5 commented Mar 15, 2023

Description

Currently the module does not support the newly released JavaScript runtime for AppSync Functions. Recently, the JS runtime was introduced (in this module) for resolvers, but not for functions.

Furthermore, I've added support for sync_config configuration.

Motivation and Context

Resolves Enable JS functions

Breaking Changes

None.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@GiamPy5 GiamPy5 mentioned this pull request Mar 15, 2023
@GiamPy5 GiamPy5 changed the title Adds support for JavaScript AppSync Functions feat: Adds support for JavaScript AppSync Functions Mar 15, 2023
@GiamPy5
Copy link
Contributor Author

GiamPy5 commented Mar 20, 2023

Any feedback on this?

@GiamPy5
Copy link
Contributor Author

GiamPy5 commented Mar 28, 2023

@antonbabenko for visibility :)

@juanoi
Copy link

juanoi commented Mar 31, 2023

looking forward to this being released!

@antonbabenko
Copy link
Member

Please verify examples by running them yourself. I just did and got this error:

╷
│ Error: creating AppSync Function: BadRequestException: SyncConfig can only be specified for a resolver attached to a DynamoDB data source.
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "1686ceb4-8d3f-46d0-8fc2-62120eba051f"
│   },
│   Message_: "SyncConfig can only be specified for a resolver attached to a DynamoDB data source."
│ }
│ 
│   with module.appsync.aws_appsync_function.this["JavaScript_Complete"],
│   on ../../main.tf line 223, in resource "aws_appsync_function" "this":
│  223: resource "aws_appsync_function" "this" {

@GiamPy5
Copy link
Contributor Author

GiamPy5 commented Apr 3, 2023

PR has been updated, I've fixed the examples and I've added a account_recovery_setting configuration in the cognito pool to avoid terraform throwing the following error when modifying the pool:

│ Error: updating Cognito User pool (eu-west-1_sUsTbzu9Y): InvalidParameter: 1 validation error(s) found.
│ - minimum field size of 1, UpdateUserPoolInput.AccountRecoverySetting.RecoveryMechanisms.
│ 
│ 
│   with aws_cognito_user_pool.this,
│   on main.tf line 300, in resource "aws_cognito_user_pool" "this":
│  300: resource "aws_cognito_user_pool" "this" {
│ 

@GiamPy5 GiamPy5 requested a review from antonbabenko April 4, 2023 08:45
@antonbabenko antonbabenko merged commit 265095a into terraform-aws-modules:master Apr 4, 2023
@antonbabenko
Copy link
Member

Thanks @GiampaoloFalqui !

antonbabenko pushed a commit that referenced this pull request Apr 4, 2023
## [1.8.0](v1.7.0...v1.8.0) (2023-04-04)

### Features

* Adds support for JavaScript AppSync Functions ([#49](#49)) ([265095a](265095a))
@antonbabenko
Copy link
Member

This PR is included in version 1.8.0 🎉

@GiamPy5 GiamPy5 deleted the adds-supports-for-javascript-appsync-functions branch April 4, 2023 10:20
@github-actions
Copy link

github-actions bot commented May 5, 2023

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants