Reputation: 1
I have a python script whose boto3 operations/function calls must be restricted to a single IAM user which has extremely limited access. My understanding is that the execution of the script depends on the configured profile for AWS CLI. Would that sort of restriction have to done inside the script?
Upvotes: 0
Views: 161
Reputation: 2123
The script could be created as a AWS Lambda function. Only the single IAM user should then be given access to execute that function.
Another script can be written to invoke that Lambda (boto3.client("lambda").invoke()
). Anyone can execute that script, but anyone but the right user will get an AccessPermissions error.
Note:
Upvotes: 2