-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-batch-alpha: lambda not authorized to perform batch:SubmitJob
after upgrading from 2.69.0 to 2.78.0
#25574
Comments
batch:SubmitJob
after upgrading from 2.69.0 to 2.78.0 batch:SubmitJob
after upgrading from 2.69.0 to 2.78.0
can you try passing the role, instead of the profile? I'm surprised that even compiles. Eg turn this:
into this:
|
@comcalvi thanks for your response! I tried but still got the same error. We used |
@suzhoum can you share your lambda function's CDK definition on both versions? How does it relate to the CE? |
Still facing the issue as of v2.89.0 |
This is another reason to add grant methods |
Add a new method, `grantSubmitJob`, to the JobDefinition construct. Enables batch users to easily grant `submitJob` permissions to any principal. Closes #25574. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
I'm trying to upgrade from 2.69.0 to the latest 2.78.0, and encountered an issue when trying to perform
batch:SubmitJob
from a lambda function. The error message isExpected Behavior
Lambda function should be able to perform
batch:SubmitJob
after the upgrade tov2.79.0
Current Behavior
I tried my best to update my code to generate the exact same cloudformation template that was generated in 2.69.0, but still there are some major differences.
I'm posting the code snippet that we have changed in this project in order to upgrade:
in
v2.69.0
:in
v2.79.0
The key difference I see in the generated CFN from above code snippets are, in
v2.79.0
, there arecontainerdefinitionExecutionRole
andcontainerdefinitionExecutionRoleDefaultPolicy
created:"AWS::Batch::ComputeEnvironment"
has two more properties inv2.79.0
The Lambda function's CFN remained unchanged.
Reproduction Steps
See above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.79.9
Framework Version
No response
Node.js Version
v18.13.0
OS
ubuntu
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: