<@U01JVDKASAC> Let me know how to config a excitin...
# sst
s
@Frank Let me know how to config a exciting s3 bucket and use it in side my lambda to read and write files.
f
Hi @Sakar, all you have to do in SST is to grant the Lambda permission to ur existing bucket:
Copy code
const fn = new sst.Function(this, "MyFunction", {
  ...,
  permissions: [
    new cdk.aws-iam.PolicyStatement({
      actions: ["s3:*"],
      effect: cdk.aws-iam.Effect.ALLOW,
      resources: [
        bucket.bucketArn,
        bucket.bucketArn + "/*",
      ],
    })
  ],
});
s
@Frank thank you.