I'm trying to create programmatically managed SMTP...
# aws
g
I'm trying to create programmatically managed SMTP credentials https://www.pulumi.com/docs/reference/pkg/aws/iam/accesskey/#ses_smtp_password_v4_python Am I able to get the credentials without PGP? Here is my code
Copy code
smtp_user = iam.User("smtp-user")
    access_key = iam.AccessKey("smtp-user-accesskey", user=smtp_user)
    pulumi.export("smtp-secret", access_key.encrypted_secret.ses_smtp_password_v4)
but it results in
Copy code
AttributeError: 'NoneType' object has no attribute 'ses_smtp_password_v4'
`
b
try
Copy code
pulumi.export("smtp-secret", access_key.ses_smtp_password_v4)
g
Thank you @brave-planet-10645, I noticed I made a mistake 🙂 it took me a long time though. 🙂 btw since I have your attention, I've been looking at AWSX and one thing I really, really miss from CDK is the ease of creating IAM policies. With current aws provider I need to dump json like objects and once I tasted this in CDK I do not want to go back. Would you know if there is anything like that planned or is it already part of AWSX? I tried to convince colleagues that TS is leading way to write pulumi right now and this would be valuable argument
b
Can you give me an example (or link to docs) on how you create a policy in CDK?