import sys
import boto3

s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')

import sys
import boto3

s3 = boto3.resource('s3')
with open(sys.argv[1], 'rb') as f:
    object = s3.Bucket('ictrp-data').put_object(Key=sys.argv[1], Body=f)
    object.Acl().put(ACL='public-read')

Fix failing attempt to set ACL
Fix failing attempt to set ACL

  import sys
  import boto3
  
  s3 = boto3.resource('s3')
- object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
+ with open(sys.argv[1], 'rb') as f:
+     object = s3.Bucket('ictrp-data').put_object(Key=sys.argv[1], Body=f)
- object.Acl().put(ACL='public-read')
+     object.Acl().put(ACL='public-read')
  
Fix failing attempt to set ACL
## Code Before:
import sys
import boto3

s3 = boto3.resource('s3')
object = s3.Bucket('ictrp-data').upload_file(sys.argv[1], sys.argv[1])
object.Acl().put(ACL='public-read')

## Instruction:
Fix failing attempt to set ACL
## Code After:
import sys
import boto3

s3 = boto3.resource('s3')
with open(sys.argv[1], 'rb') as f:
    object = s3.Bucket('ictrp-data').put_object(Key=sys.argv[1], Body=f)
    object.Acl().put(ACL='public-read')
