-
Notifications
You must be signed in to change notification settings - Fork 587
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
CreateScheduleCommand throws invalid ValidationException #6494
Comments
Hey @defmtog , Thanks for your feedback! After deep #diving into this issue, I think the possible root cause could be In this EventBridge Scheduler - Setting up the execution role doc The role policy should look like this : Could you please update the trusted policy to the json posted below? {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "scheduler.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
} Please let me know if that works. I will post my reproduction steps later. Thanks! |
No, throws:
MalformedPolicyDocumentException: Has prohibited field Resource
…On Mon, Sep 23, 2024 at 9:06 AM Maggie Ma ***@***.***> wrote:
Hey @defmtog <https://github.com/defmtog> ,
Thanks for your feedback! After deep diving into this issue, I think the
possible root cause could be the "aws:SourceAccount" in assumePolicy
object.
In this AWS IAM user guide doc
<https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_roles.html#troubleshoot_roles_cant-assume-role>,
it specifies that " the Resource element of your IAM policy must specify
the role that you want to assume".
Could you please update the policy and put the IAM role arn to
"aws:SourceAccount" property? Please let me know if that works.
I will post my reproduction steps later.
Thanks!
Maggie
—
Reply to this email directly, view it on GitHub
<#6494 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMBS7GXPDTK4C57XG5MH3LZYA4BNAVCNFSM6AAAAABOQJARBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYG4ZTQMBWGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Daniel Flesner
TuneGenie, LLC
https://www.tunegenie.com <http://www.tunegenie.com>
|
Hey @defmtog , I just updated my response. Could you please try to change the trust policy to
? |
Putting the IAM role arn to "aws:SourceAccount" property worked once for me. But this workaround fails afterwards. By changing the trust policy to the json in my updated response, it works multiple times. I consider this would be the stable workarounds towards this issue. So I updated the response. Please let me know if that works for you! Thanks! |
nope:
ValidationException: The execution role you provide must allow AWS
EventBridge Scheduler to assume the role.
…On Mon, Sep 23, 2024 at 10:16 AM Maggie Ma ***@***.***> wrote:
Hey @defmtog <https://github.com/defmtog> ,
I just updated my response. Could you please try to change the trust
policy to
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "scheduler.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
?
—
Reply to this email directly, view it on GitHub
<#6494 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMBS7EEZINLROIYXITXIRDZYBEIPAVCNFSM6AAAAABOQJARBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYHA4TIOJZGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Daniel Flesner
TuneGenie, LLC
https://www.tunegenie.com <http://www.tunegenie.com>
|
the code that creates the Role and Policy works fine, after the Schedule
creation fails from the API i can go to the console and create a schedule
with that same Role and Policy fine. i got it to work once from the API
when i added the trust policy to the permission policy, but i can't
duplicate that behavior either now?
…On Mon, Sep 23, 2024 at 10:22 AM Daniel Flesner ***@***.***> wrote:
nope:
ValidationException: The execution role you provide must allow AWS
EventBridge Scheduler to assume the role.
On Mon, Sep 23, 2024 at 10:16 AM Maggie Ma ***@***.***>
wrote:
> Hey @defmtog <https://github.com/defmtog> ,
>
> I just updated my response. Could you please try to change the trust
> policy to
>
> {
> "Version": "2012-10-17",
> "Statement": [
> {
> "Effect": "Allow",
> "Principal": {
> "Service": "scheduler.amazonaws.com"
> },
> "Action": "sts:AssumeRole"
> }
> ]
> }
>
> ?
>
> —
> Reply to this email directly, view it on GitHub
> <#6494 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACMBS7EEZINLROIYXITXIRDZYBEIPAVCNFSM6AAAAABOQJARBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRYHA4TIOJZGE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
Daniel Flesner
TuneGenie, LLC
https://www.tunegenie.com <http://www.tunegenie.com>
--
Daniel Flesner
TuneGenie, LLC
https://www.tunegenie.com <http://www.tunegenie.com>
|
Did you update the scheduler's name? If you are sending the duplicated name, it will throw 409 error. |
i deleted the schedule each time for testing.
…On Mon, Sep 23, 2024 at 11:08 AM Maggie Ma ***@***.***> wrote:
Did you update the scheduler's name?
If you are sending the duplicated name, it will throw 409 error.
—
Reply to this email directly, view it on GitHub
<#6494 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMBS7DDXJIXCG76XLKQ5PDZYBKJRAVCNFSM6AAAAABOQJARBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRZGAYTCNJWHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Daniel Flesner
TuneGenie, LLC
https://www.tunegenie.com <http://www.tunegenie.com>
|
Could you please take a screenshot of your current trust relationship and permission? Thanks!~ |
Could you please try to change the permission policy to the following json content? {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction"
],
"Resource": "*"
}
]
}
|
nope, still throws: |
I will check with the AWS EventBridge Scheduler service team and get back to you once we have an update. To unblock your work, please use what is working for you now. Thanks! |
Checkboxes for prior research
Describe the bug
When I create a valid Policy, Role, AssumeRolePolicy and Group and send the command I get the following error:
ValidationException: The execution role you provide must allow AWS EventBridge Scheduler to assume the role.
If a add a bogus AssumeRolePolicy to the Permission Policy it succeeds. Seems the validation is looking for the AssumeRolePolicy in the PermissionPolicy rather than in the AssumeRolePolicy?
example code:
Regression Issue
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.17.0
Reproduction Steps
Observed Behavior
Expected Behavior
succeed
Possible Solution
Move the validation check to the correct Policy
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: