aws-samples / serverless-patterns

Serverless patterns. Learn more at the website: https://serverlessland.com/patterns.
https://serverlessland.com
Other
1.48k stars 863 forks source link

New serverless pattern - API Gateway to Lambda to Redshift Serverless over Redshift Data API #1874

Closed mfwahid closed 6 months ago

mfwahid commented 6 months ago

Issue #, if available:

Description of changes: This pattern explains how to deploy a Data piepline with Amazon API Gateway (HTTP API), AWS Lambda and Amazon Redshift Serverless

This pattern is useful to accept and respond to requests quickly but offloading the processing as asynchronous process. Once the data ingestion / DDL / query request is made to the API Gateway HTTP API the query will be presented to Redshift Serverless workgroup through Redshift DataAPI.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jbesw commented 6 months ago

This pattern failed template verification - pls see errors and submit a new PR.

boyney123 commented 6 months ago

Looks like CFN nag has picked up an issue with your template file. Can you have a look and make the relevant changes?

[
    {
        "filename": "/usr/src/app/apigw-lambda-redshift-serverless-dataapi/template.yaml",
        "violationsWithErrors": [
            {
                "id": "F3",
                "name": "IamRoleWildcardActionOnPermissionsPolicyRule",
                "type": "FAIL",
                "message": "IAM role should not allow * action on its permissions policy",
                "logical_resource_ids": [
                    "LambdaExecutionRole"
                ],
                "line_numbers": [
                    139
                ],
                "element_types": [
                    "resource"
                ]
            }
        ]
    }
]
mfwahid commented 6 months ago

Looks like CFN nag has picked up an issue with your template file. Can you have a look and make the relevant changes?

[
    {
        "filename": "/usr/src/app/apigw-lambda-redshift-serverless-dataapi/template.yaml",
        "violationsWithErrors": [
            {
                "id": "F3",
                "name": "IamRoleWildcardActionOnPermissionsPolicyRule",
                "type": "FAIL",
                "message": "IAM role should not allow * action on its permissions policy",
                "logical_resource_ids": [
                    "LambdaExecutionRole"
                ],
                "line_numbers": [
                    139
                ],
                "element_types": [
                    "resource"
                ]
            }
        ]
    }
]

Modified the permission policy and checked in the code.

mfwahid commented 6 months ago

This pattern failed template verification - pls see errors and submit a new PR.

Modified and checked in the changes

jbesw commented 6 months ago

Due to the large amount of custom code in this solution, I would recommend submitting as a repo instead at https://serverlessland.com/repos.

mfwahid commented 6 months ago

Can you please help me with the Github link for repos ?