AWS Lambda function write to S3

后端 未结 4 1562
星月不相逢
星月不相逢 2020-12-08 06:31

I have a Node 4.3 Lambda function in AWS. I want to be able to write a text file to S3 and have read many tutorials about how to integrate with S3. However, all of them are

4条回答
  •  隐瞒了意图╮
    2020-12-08 07:18

    IAM Statement for serverless.com - Write to S3 to specific bucket

    service: YOURSERVICENAME
    
    provider:
      name: aws
      runtime: nodejs8.10
      stage: dev
      region: eu-west-1
      timeout: 60
      iamRoleStatements:
        - Effect: "Allow"
          Action:
           - s3:PutObject
          Resource: "**BUCKETARN**/*"
        - Effect: "Deny"
          Action:
            - s3:DeleteObject
          Resource: "arn:aws:s3:::**BUCKETARN**/*"
    

提交回复
热议问题