Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

fix: aws function predefined role #1013

Closed
wants to merge 2 commits into from
Closed

fix: aws function predefined role #1013

wants to merge 2 commits into from

Conversation

antoine-js
Copy link
Contributor

@antoine-js antoine-js commented Sep 8, 2024

Attempt in trying to fix the function's predefined role current issues for good.

With a solution like this one, we are now always having a iam.Role in a Function. No more issue with trying to access an undefined role from another component.

Instead of considering role to be undefined when predefined role is passed, we are now referencing the actual role. So the role will either be a reference or we create it if not passed.

Thats the idea but please let me know if I miss some important context on why it should not be done like this.

I have tried this solution with ApiGatewayV1 and NextJS server function. They now both work fine even though it didnt work in the past.

Closes sst/sst#4180

@antoine-js
Copy link
Contributor Author

Hi @fwang, any chance you might have a look at this PR soon ? Sorry, it is a blocker currently in my company as APIGW V1 and predefined roles are mandatory, and we have a chance to run a POC for SST right now.

@jayair
Copy link
Contributor

jayair commented Sep 20, 2024

I'll check

@fwang
Copy link
Contributor

fwang commented Oct 9, 2024

There r some conflicts. Move the implementation here de2a081.

Will be in v3.1.73

Thanks @antoine-js

@fwang fwang closed this Oct 9, 2024
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.

Impossible to use pre-existing role for ApiGatewayV1 routes
3 participants