-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
fix pydoc example #52605
fix pydoc example #52605
Conversation
The example, as given does not work. It creates some association, but that association does not work as intended. The change here ensures that it does work as intended, that is, triggering lambda function executions upon object creation in the specified s3 bucket. +label: docsite_pr
cc @mikedlr @pjodouin |
@darkhipo, just so you are aware we have a dedicated Working Group for aws. |
@@ -110,7 +110,8 @@ | |||
statement_id: lambda-s3-myBucket-create-data-log | |||
action: lambda:InvokeFunction | |||
principal: s3.amazonaws.com | |||
source_arn: arn:aws:s3:eu-central-1:123456789012:bucketName | |||
source_arn: arn:aws:s3:::bucketName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tests that run in CI that specify a complete ARN:
ansible/test/integration/targets/lambda_policy/tasks/main.yml
Lines 166 to 184 in a8d4bf8
- name: give api gateway execute permissions on lambda | |
lambda_policy: | |
function_name: "{{ lambda_function_name }}" | |
state: present | |
statement_id: api-gateway-invoke-lambdas | |
action: lambda:InvokeFunction | |
principal: apigateway.amazonaws.com | |
source_arn: "arn:aws:execute-api:{{ aws_region }}:{{ aws_caller_facts.account }}:*/*" | |
<<: *aws_connection_info | |
- name: try again but with ARN | |
lambda_policy: | |
function_name: "{{ lambda_result.configuration.function_arn }}" | |
state: present | |
statement_id: api-gateway-invoke-lambdas | |
action: lambda:InvokeFunction | |
principal: apigateway.amazonaws.com | |
source_arn: "arn:aws:execute-api:{{ aws_region }}:{{ aws_caller_facts.account }}:*/*" | |
<<: *aws_connection_info |
Perhaps there is another reason your task failed? It would be fine to also document an abbreviated ARN example, but I don't think we should overwrite an example using a full ARN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or adding another example using a full ARN that works would be fine.
@darkhipo This pullrequest is waiting for your response. Please respond or the pullrequest will be closed. |
The example, as given does not work.
It creates some association, but that association does not work as intended.
The change here ensures that it does work as intended, that is, triggering lambda function executions upon object creation in the specified s3 bucket.
+label: docsite_pr
SUMMARY
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION