You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working to run aws command using your package in nodejs.
My code did work in the old version of your package, but after upgrading the package, it doesn't work now.
For example, this code did work in old version.
snsCallerArn = await aws.command(
`iam create-role \
--path /service-role/ \
--role-name ${roleName} \
--assume-role-policy-document file://src/tmp/${externalId}/resources/role-trust-policy.json`
).then(function (data) {
console.log('data in creating service role =', data)
logger.default.debug('data in creating service role =', data)
return data.object.Role.Arn
})
But it doesn't work in latest version, so I updated it and it does work.
snsCallerArn = await aws.command(
`iam create-role --path /service-role/ --role-name ${roleName} --assume-role-policy-document file://src/tmp/${externalId}/resources/role-trust-policy.json`
).then(function (data) {
console.log('data in creating service role =', data)
logger.default.debug('data in creating service role =', data)
return data.object.Role.Arn
})
In other words, I removed the symbol \.
But I need to use the symbol \ because it requires a lot of parameters when creating cognito-user-pool.
For example,
userPoolId = await aws.command(
`cognito-idp create-user-pool \
--pool-name ${stackName} \
--auto-verified-attributes email phone_number \
--alias-attributes email phone_number preferred_username \
--sms-verification-message 'Your authentication code for ${stackName} is {####}.' \
--email-verification-message 'Your authentication code for ${stackName} is {####}.' \
--email-verification-subject 'Your Verification Code for ${stackName}.' \
--sms-authentication-message 'Your authentication code for ${stackName} is {####}.' \
--mfa-configuration OPTIONAL \
--email-configuration EmailSendingAccount='DEVELOPER',SourceArn='arn:aws:ses:${region}:${awsAccountId}:identity/${customerEmail}',From='${customerEmail}',customerEmailEmailAddress='${customerEmail}' \
--sms-configuration SnsCallerArn=arn:aws:iam::${awsAccountId}:role/service-role/${roleName},ExternalId=${externalId} \
--account-recovery-setting RecoveryMechanisms=[{Priority=1,Name=verified_email},{Priority=2,Name=verified_phone_number}] \
--device-configuration ChallengeRequiredOnNewDevice=false,DeviceOnlyRememberedOnUserPrompt=false \
--verification-message-template '{"DefaultEmailOption":"CONFIRM_WITH_LINK","EmailSubjectByLink":"Your verification link","EmailMessageByLink":"Please click the link below to verify your email address. {##Verify Email##}","SmsMessage":"Your authentication code for ${stackName} is {####}."}' \
--admin-create-user-config '{"AllowAdminCreateUserOnly":false,"InviteMessageTemplate":{"EmailMessage":"Your username for ${stackName} is {username} and temporary password is {####}.","EmailSubject":"Your temporary password for ${stackName}","SMSMessage":"Your username for ${stackName} is {username} and temporary password is {####}."},"UnusedAccountValidityDays":7}' \
`
).then(function (data) {
console.log('data in creating user-pool =', data)
logger.default.debug('data in creating user-pool =', data)
return data.object.UserPool.Id
})
What do you have any suggestion?
The text was updated successfully, but these errors were encountered:
Hi,
I am working to run aws command using your package in nodejs.
My code did work in the old version of your package, but after upgrading the package, it doesn't work now.
For example, this code did work in old version.
But it doesn't work in latest version, so I updated it and it does work.
In other words, I removed the symbol
\
.But I need to use the symbol
\
because it requires a lot of parameters when creating cognito-user-pool.For example,
What do you have any suggestion?
The text was updated successfully, but these errors were encountered: