{"tool":"aws","tool_display":"Aws","intent":"apply-bucket-policy","intent_display":"apply bucket policy","title":"Aws Command: apply bucket policy","command_string":"aws s3api put-bucket-policy --bucket <bucket_name> --policy file://<path/to/bucket_policy.json>","raw_command_string":"aws s3api put-bucket-policy --bucket {{bucket_name}} --policy file://{{path/to/bucket_policy.json}}","description":"Exact CLI syntax to apply bucket policy using Aws.","usage_scenario":"When enforcing access policies or compliance mandates for S3 data.","scenario_context":"Ensure your JSON policy file is correctly formatted for a successful application.","simulated_output":"{ \n    \"ResponseMetadata\": {\n        \"RequestId\": \"XXXXXXXXXXX\",\n        \"HostId\": \"XXXXXXXXXXX\",\n        \"HTTPStatusCode\": 200,\n        \"HTTPHeaders\": {\n            \"x-amz-id-2\": \"XXXXXXXXXXX\",\n            \"x-amz-request-id\": \"XXXXXXXXXXX\",\n            \"date\": \"Tue, 01 Jan 2024 12:00:00 GMT\"\n        },\n        \"RetryAttempts\": 0\n    }\n}","how_to_steps":["Run the command: aws s3api put-bucket-policy --bucket my-bucket --policy file://policy.json","Verify the policy with: aws s3api get-bucket-policy --bucket my-bucket","Check policy details output for confirmation."],"inferred_category":"Cloud Infrastructure","canonical_url":"https://www.syntaxstandard.com/aws/apply-bucket-policy"}