Just use this command:
aws secretsmanager get-secret-value --secret-id <secrets name> --query SecretString --output text > .env