AWS question using SDK/SST to create S3 Bucket and...
# help
s
AWS question using SDK/SST to create S3 Bucket and I'm getting permission denied error. I've added the IAM permissions to serverless yaml file I've granted it
s3*
and added the arn and bucket name to environment and resource from my sst created bucket. I'm still getting permission denied 403, can someone explain why this is case?
f
Hey @Sam Frampton, can I see how you are defining the IAM permissions in your serverless yaml?
s
@Frank this is how its configured in my service
f
Thanks @Sam Frampton. You can give this a try: 1. Go into your AWS IAM console, and look for the IAM role created by this Serverless Framework service; 2. Open up the role’s policy; 3. Ensure
s3:*
is listed under action; 4. Ensure the bucket’s ARN is listed under resources, and double check the bucket matches the one you are trying to access inside the Lambda 5. Try also grant
s3:*
permission to the
bucketArn/*
resource
s
Thanks Frank will give it a go
f
Yup, let me know how it goes!