Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update Lambda and IAM role ARN validation rules #229

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

pcholakov
Copy link
Contributor

@pcholakov pcholakov commented Mar 14, 2025

Loosen the validation rules around versions slightly to allow for aliases like $LATEST to be used.

Update the STS session id pattern with an IAM role ARN pattern. Add link to role trust setup documentation.


This permits role ARNs like arn:aws:iam::663487780041:role/LambdaTsCdkStack-nik-InvokerRole4DB2757E-QFh1yjd4kBYT - the previous pattern matches STS session ids which are what you might see GetCallerIdentity return, but they are not a valid ARN that Restate Cloud can assume.

I've also loosened up the validation pattern for function ARNs so that we can accept built-in and customer aliases like arn:aws:lambda:eu-central-1:663487780041:function:my-greeter-v1:$LATEST.

Also, I feel strongly that the role ARN should be displayed immediately once the user selects Lambda deployment - in practice, this will be used ~100% of the time in Restate Cloud. Not setting one will only ever work if the Lambda is public-access, which is almost certainly a misconfiguration. I tried to make it work but could not get the layout right at all :-)

Loosen the validation rules around versions slightly to allow for
aliases like $LATEST to be used.

Update the STS session id pattern with an IAM role ARN pattern. Add link
to role trust setup documentation.
@pcholakov pcholakov requested a review from nikrooz March 14, 2025 14:09
Copy link
Collaborator

@nikrooz nikrooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks for spotting this, and fixing it.
if you run ppm nx format in the root of project the CI will pass.

@pcholakov pcholakov merged commit 1402446 into main Mar 14, 2025
4 checks passed
@pcholakov pcholakov deleted the fix/update-lambda-assumed-role-validation branch March 14, 2025 14:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants