Closed patrickbussmann closed 2 years ago
Very small serverless.yml:
service: example provider: name: aws stage: ${opt:stage, 'dev'} region: eu-central-1 runtime: provided.al2 custom: s3Sync: - bucketNameKey: UpdateBucketName bucketPrefix: app/ localDir: update params: - "*.json": CacheControl: 'no-cache' plugins: - serverless-s3-sync resources: Resources: UpdateBucket: Type: AWS::S3::Bucket Properties: AccessControl: PublicRead UpdateBucketPolicy: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref UpdateBucket PolicyDocument: Statement: - Effect: Allow Principal: '*' Action: 's3:GetObject' Resource: !Join [ '/', [ !GetAtt UpdateBucket.Arn, '*' ] ] Outputs: UpdateBucketName: Value: !Ref UpdateBucket
Deployment works successful.
S3 Sync: Syncing directories and S3 prefixes... ........... S3 Sync: Synced. S3 Sync: Syncing metadata... . S3 Sync: Synced metadata. S3 Sync: Updating bucket tags... . S3 Sync: Updated bucket tags. Serverless: Removing old service artifacts from S3...
And then I have one file too much in my bucket.
manifest.json app/manifest.json app/update.zip.001 app/update.zip.002 app/update.zip.003 app/update.zip.004 app/update.zip.005
Everything fine except the manifest.json which is in root directory. But I used the bucketPrefix so that this shouldn't happen.
manifest.json
bucketPrefix
The timestamp is like the others. When I remove the file manually and run sls deploy again the file is again there.
sls deploy
Maybe there is an logical issue with the bucketPrefix?
Very small serverless.yml:
Deployment works successful.
And then I have one file too much in my bucket.
Everything fine except the
manifest.json
which is in root directory. But I used thebucketPrefix
so that this shouldn't happen.The timestamp is like the others. When I remove the file manually and run
sls deploy
again the file is again there.Maybe there is an logical issue with the
bucketPrefix
?