filePath = "C:\image6.jpeg";
accessKeyId = "XXXXXXXXXXXXXXXXXX";
awsSecretKey = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
bucketName = "mybucket";
fileDestination = "s3://" & accessKeyId & ":" & awsSecretKey & "@" & bucketName & "/image6.jpeg";
fileCopy( filePath, fileDestination );
I have also tried these:
fileDestination = "s3://" & accessKeyId & ":" & awsSecretKey & "@s3.amazonaws.com/" & bucketName & "/image6.jpeg";
fileDestination = "s3://" & accessKeyId & ":" & awsSecretKey & "@us-west-2/" & bucketName & "/image6.jpeg";
I have also put the keys in Application.cfc and just do:
fileDestination = "s3://" & bucketName & "/image6.jpeg";
But none of them works. What am I missing?
Thanks,
ML
file action="write" file="#fileDestination#" output="#binContent#" nameconflict="overwrite";
<cfset storeSetACL(
loc.s3File,
[
{
group="all",
permission="read"
},
{
id="#APPLICATION.settings.canonical_user_id#",
permission="full_control",
displayName=""
}
]
) />
Warning: this is a typical "tangentially related, not actually solving the original issue" post.
Using keys is a very bad idea. IAM roles provide far better security, mainly because it's nearly impossible to accidentally push a key to github (where people run bots that scan for AWS keys that people accidentally pushed to github) and have your entire account held to ransom or used for Bitcoin mining. Obviously, if your server is not an AWS instance, IAM roles aren't available.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/8d95725c-176b-4281-9a4d-18023b7d8f1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.