2 回答
- 最新
- 投票最多
- 评论最多
1
I was missing colon as suggested by @aws-user-Nitin and also When Entry is “/” you can only have one mapping, as overlapping paths are not allowed so added sub-directory to Entry.
aws transfer create-access --home-directory-type LOGICAL --home-directory-mappings '[{"Entry":"/folder1","Target":"/bucket_name/${transfer:Username}/folder1" },{ "Entry": "/folder2", "Target":"/bucket_name/${transfer:Username}/folder2"}]' --role arn:aws:iam::account_id:role/iam-role --server-id s-123456789ert43 --external-id S-1-2-34-123456789-1234567-123456789-1234
已回答 2 年前
1
Hi - It expects property name enclosed in double quotes. Try to do like this by enclosing the json in single quote (')
--home-directory-mappings '[{"Entry":"/","Target":"/bucket_name/${Transfer:UserName}/folder1" },{ "Entry": "/", "Target":"/bucket_name/${Transfer:UserName}/folder2"}]'
Hope this helps.
相关内容
- AWS 官方已更新 3 年前
- AWS 官方已更新 3 年前
- AWS 官方已更新 7 个月前
Thank you for reply. It helps but got another error
''' An error occurred (InvalidRequestException) when calling the CreateAccess operation: [Root directory mapping does not allow other mappings: / -> /bucket_name/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/folder2] ''''
Is another mapping not allowed?
I am able to figure it out and wad able to add multiple mapping. Entry "/" wont allow multiple mapping but specific folders to adding Entry: "folder1" and Entry:"folder2" helped.
but now after login to SFTP, I dont see folder1 and folder2. Also, not able to put file.