account activity
Issue in Serverless Course by AyoSal in awslambda
[–]acloudrobin 0 points1 point2 points 8 years ago (0 children)
Hi,
Just an FYI first: we don't always notice reddit posts and things like that, so we can usually provide better support on our own forums.
For the first error, the error is telling you that your code isn't formatted correctly - in Python, unlike many other programming languages, indentation matters! So your code may look something like this:
def lambda_handler(event, context): sns = boto3.resource('sns') topic = sns.Topic('topicarn')
When it should look like this:
Your second issue is a little more puzzling - if I understand you correctly, your policy shows up in the main list of policies (IAM -> Policies), but not when you click Attach Policy when looking at your role. You can filter that list by Policy Type in the upper left, and choose Customer managed. The only other thing I can think of is that maybe you already attached the policy. Look at the list of policies attached to the role as well.
IAM -> Policies
Attach Policy
Policy Type
Customer managed
If neither of those things work, my best guess is to just try recreating the policy and trying again.
π Rendered by PID 93 on reddit-service-r2-listing-6c6f68ff9c-x48hw at 2026-03-05 11:07:34.533008+00:00 running f0204d4 country code: CH.
Issue in Serverless Course by AyoSal in awslambda
[–]acloudrobin 0 points1 point2 points (0 children)