2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
répondu il y a un an
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.
Contenus pertinents
- demandé il y a 8 mois
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 10 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
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.