-
Notifications
You must be signed in to change notification settings - Fork 479
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
Parameter of type Amazon.Lambda.SQSEvents.SQSEvent passing is not supported #1245
Comments
Might be related to #1203. |
If it's any help, the compiler succeeds if I change the function definition to this:
or this:
What I needed to do is remove the HttpApiAttribute (which defeats the purpose of the project) and make the method return a value (even if it's useless). |
@Sparafusile I'm trying to understand what you want to accomplish. The We would like to add additional attributes to the library that handle subscribing an SQS queue as the event source of the Lambda function. Is that the feature you are looking for? |
@normj My specific use case is to consolidate a list of Lambda function which are each a separate project in my Visual Studio solution. My goal is to make it easier to deploy all lambda functions at once. Not all my lambda functions do have an API endpoint, but some do. This post above was simply the first function I tried. A better example would probably be the custom identity provider I'm using for a SFTP server running in AWS Transfer:
The API endpoint is required in this case, but it will throw an error because it doesn't know what to do with the Credientials parameter (and neither do I - AWS transfer documentation doesn't seem to specify how these are provided to the lambda). Using [FromBody] or [FromQuery] on the Credentials parameter does not solve the compile time issue that I listed in my initial post. |
@Sparafusile In this example is |
@normj I'm not entirely sure. Here is the definition of the entry point for the stand-alone lambda project that I have in production:
Here is a link to the documentation I used: https://docs.aws.amazon.com/transfer/latest/userguide/custom-identity-provider-users.html#authentication-api-gateway Looking at the yml that is used to set this up, it looks like the credentials come from the query parameters. |
Closing because this is not a scenario that Lambda or Annotations supports having a single Lambda function responded to both an HTTP and SQS because the serialization would have no idea what type of event is coming in to serialize. |
Comments on closed issues are hard for our team to see. |
Describe the bug
I am unable to create a function with the following signature:
Expected Behavior
I would like to be able to write a endpoint that accepts a SQS message.
Current Behavior
log.txt
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Amazon.Lambda.Annotations - 0.5.0 preview
Amazon.Lambda.GatewayEvents - 2.4.1
Amazon.Lambda.Core - 2.1.0
Amazon.Lambda.S3Events - 2.0.1
Amazon.Lambda.Serialization.SystemTextJson - 2.3.0
Amazon.Lambda.SQSEvents - 2.1.0
AWSSDK.DynamoDBv2 - 3.7.3.53
Targeted .NET Platform
.NET 6
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: