Skip to content
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

CN - SpokeRegistration Lambda - Policy statements for AWS organisation #584

Open
paulbaudrier opened this issue Nov 12, 2024 · 2 comments
Open
Labels

Comments

@paulbaudrier
Copy link

Describe the bug

In the CN (China) variant of the AWS instance scheduler, the scheduler’s main stack creates a Lambda function "SpokeRegistration" along with an associated IAM role.
Normally, the policy associated with the role is configured to use the AWS Organization ID rather than a wildcard "" using condition.
However, in China regions, the policy appears to default to "
", even though it's not explicitly specified as such.
This could lead to unintended access permissions without raising any error.

To Reproduce

Deploy the China-specific (CN) template for the Instance Scheduler solution in a China region (e.g., cn-north-1) with AWS Organization "active".
Observe the creation of the Lambda function "SpokeRegistration" and associated IAM role in the stack.
Note that the policy behaves using a wildcard "*" rather than the AWS Organization ID.

Expected behavior

The policy should respect the AWS Organization ID when AWS Organisation is active on template.

Please complete the following information about the solution:

Version: [v1.5.1]
Region: [cn-north-1]
Was the solution modified from the version published on this repository? No
If the answer to the previous question was yes, are the changes available on GitHub? N/A
Have you checked your service quotas for the services this solution uses? Yes
Were there any errors in the CloudWatch Logs? No, but the policy defaults to "*" implicitly.

Screenshots

N/A

Additional context

N/A

@paulbaudrier paulbaudrier changed the title SpokeRegistration Lambda role - Policy statements for AWS organisation CN - SpokeRegistration Lambda - Policy statements for AWS organisation Nov 12, 2024
@CrypticCabub
Copy link
Member

Thanks for reporting this issue. we will investigate further and add a fix to our backlog as soon as we can repduce the error

@CrypticCabub
Copy link
Member

@paulbaudrier are you able to confirm which version of instance scheduler you are running? Your report mentions v1.5.1 but the description of the issue sounds much more like v3.0.x than 1.5.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants