Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
Adding Metadata tags to objects in S3 bucket using AWS Code Builder

I have a simple angular SPA project that is being hosted out of an AWS S3 buckets.

  • The objects in the bucket require a few metadata tags (content-type, cache-control, etc) to make sure the content loads correctly and is updated frequently.

  • I am using AWS code build to deploy the project to the S3 bucket with the following buildspec.yml file below:

version: 0.2

phases:
  pre_build:
    commands:
      - echo Starting Build Now
      - npm install
  build:
    commands:
      - echo Build ready for manufacturing of the artifact
      - npm build
  post_build:
    commands:
      - aws s3 sync $BUILD_OUTPUT_LOCATION s3://$BUCKET_NAME --delete
      - echo Build completed successfully

Is there a command to have the necessary metadata tags added to the files being sync'ed in the S3 bucket in the post build of this buildspec.yml file?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Use the parameter to add meta tag directly from aws cli, something like:

$ aws s3 cp s3://bucketname/ s3://bucketname/ --recursive --metadata-directive REPLACE --cache-control max-age=86400

- or -

$ aws s3 sync $BUILD_OUTPUT_LOCATION s3://$BUCKET_NAME --delete  --cache-control max-age=86400
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!