skip to Main Content

I have an AWS Codebuild Project that is connected to a VPC. Now I’m trying to understand how can I get the availability zone of codebuild build during execution time. Is this possible?

2

Answers


  1. Chosen as BEST ANSWER

    It turns out there is an Environment Variable, CODEBUILD_VPC_AZ, that holds this value.


  2. Based on AWS documentation there are two environment variables having the AWS Region where the build is running (AWS_DEFAULT_REGION and AWS_REGION). I don’t think there is any possibility to get the actual availability zone.

    But is there something specific that you want to achieve by knowing the availability zone? Maybe we can provide a solution to that.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search