Skip to content

Conversation

@adanaja
Copy link
Contributor

@adanaja adanaja commented Jan 16, 2024

The possibility to have different lambda functions depending on REST API methods doesn't integrate well with the current way of defining stages and lambda aliases.

As each stage is defined once, the stage variables must be the same for all methods and all lambda functions. So if there is a stage variable pointing to a lambda alias, it must be the same for all lambda functions.

Hence a change is made to Alias so that the resource name can be different from the alias name, and multiple lambda functions can share the same alias name.

Then the possibility to define an integration uri at the resource level is added so that each resource can point to a different lambda function while still referencing the stage variable containing the alias name.

Finally, the possibility to define the lambda ARN for the InvokeFunction permission at the resource level, and per stage, is added to make it possible to give the right permissions for each resource and stage.

Simplify test_rest_api_nested_resources as there is now test_rest_api_multi_lambdas_stages

The possibility to have different lambda functions depending on
REST API methods doesn't integrate well with the current way of
defining stages and lambda aliases.

As each stage is defined once, the stage variables must be the
same for all methods and all lambda functions. So if there is
a stage variable pointing to a lambda alias, it must be the
same for all lambda functions.

Hence a change is made to Alias so that the resource name can be
different from the alias name, and multiple lambda functions can
share the same alias name.

Then the possibility to define an integration uri at the resource
level is added so that each resource can point to a different
lambda function while still referencing the stage variable
containing the alias name.

Finally, the possibility to define the lambda ARN for the
InvokeFunction permission at the resource level, and per stage,
is added to make it possible to give the right permissions for
each resource and stage.

Simplify test_rest_api_nested_resources as there is now
test_rest_api_multi_lambdas_stages
@adanaja adanaja force-pushed the morosi-feat branch 4 times, most recently from 376a8ed to b15cba7 Compare January 16, 2024 16:29
@adanaja adanaja marked this pull request as ready for review January 16, 2024 16:32
@adanaja adanaja merged commit 862fc46 into AdaCore:master Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants