newrelic / newrelic-lambda-layers

Source code and utilities to build and publish New Relic's public AWS Lambda layers.
https://newrelic.com/products/serverless-aws-lambda
Apache License 2.0
34 stars 42 forks source link

chore: Added bash script and Docker file for auto creation of ECRs for lambda layers #223

Closed DasuNewrelic closed 2 months ago

DasuNewrelic commented 2 months ago

Ticket: https://new-relic.atlassian.net/browse/NR-219713

Currently, our Layers scripts is for publish layers in all regions.

And, we are also created docker lambda layers in ECRs for Python, Node and Java. So, We need to publish ECRs if any new versions are released for these languages. In this PR :- I've written a bash script code for publishing ECRs automatically if any new releases is happen.

How to test

  1. Make sure you are authenticated with AWS test account for testing.

  2. I've already created a ECR repository for testing.

  3. Don't forgot to use testing repository for testing purpose.

    
    For testing 
    repository="q6k3q1g1"
    For prod 
    #repository="x6n7b2o2" ```
  4. If you are using any new AWS account for testing then don't forgot to create language based public ECRs in AWS.

Note*: ECRs script will work only for us-east-1 region. Because AWS ECRs are global so i'm just running this script for one region i.e. us-east-1