ARM64 Support
AWS launched ARM64 support on Lambda (https://aws.amazon.com/blogs/aws/aws-lambda-functions-powered-by-aws-graviton2-processor-run-your-functions-on-arm-and-get-up-to-34-better-price-performance/).
Would be useful to get Bref functions and container images setup with ARM64 variants... Happy to assist where I can.
AFAIK PHP isn't running best on ARM (e.g. JIT not supported). I may be wrong, but it might be worth digging into that?
I think the first step is to wait Cloudformation support? https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/926
@deleugpn for Lambda layers yes, but I think there should not be anything holding up pushing the ARM images to Docker Hub for container lambda functions?
@deleugpn people claim in https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/926#issuecomment-931785524 that CloudFormation API already supports the Architecture property.
@mnapoli maybe, this helps to melt your concern about running PHP on ARM -- https://aws.amazon.com/tr/blogs/compute/improving-performance-of-php-for-arm64-and-impact-on-amazon-ec2-m6g-instances/
@dytyniuk definitely, thank you. I was wrong, ARM can be interesting for PHP.
Also relevant: https://twitter.com/sebastienhouze/status/1443742924534132843
And that ARM JIT support is coming at least with 8.1
Also FYI: CloudFormation support is in (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-architectures) and we're planning to add support in Serverless Framework early next week.
So if the roadblocks to this were cloudformation and the serverless framework supporting arm - both of which now do.. is there any remaining issue or is this good to go now? And if so.. how so? 😁
I'm about to dig into a new project and I think I'd like to use the graviton lambdas if possible.
Compiling php is not a trivial process. I've been looking into simplifying it and only now realized that remi-collect does not support aarch64 builds which put a wrench in my experiment.
Hey @deleugpn Maybe, this repository can help -- https://repo.drpixel.fr/enterprise/7/drpixel-php74/aarch64/ ?
I have been pointed that address but I haven't figured out what to do with it. I tried enabling it and installing packages following remi-collect naming convention and no luck
I managed to install php with amazon-linux-extras but its locked into php 8.0.8 which is a few months behind. I'm not sure it would be a good switch as it would delay patch releases beyond our control. If anyone have a Dockerfile recipe on how to install php using the al2-arm64 base image and wants to share, I'd be grateful!
Another thing that might be relevant, if I understand https://repo.drpixel.fr/ correctly, it only support PHP 8.0.1, which is 10 point-releases behind so even if I did manage to install with it, it seems it would be very slow to move forward with PHP upgrades. I'm open to suggestions and considering our options. I might have to dig deep into our current compile php ourselves and abort the attempt to simplify it with a pre-package distribution
@deleugpn yeah, now I feel your shoes. At least, to some extent.
IMHO, any effort to reuse pre-built binaries for this or that repository will bring a concrete PHP version and lock further updates. From this point of view, layers' updates will be postponed until maintainers of the repository incorporate an update.
Despite the pain of the compilation, I think, this is the only way to provide best layers.
remi-collect offers blazing-fast compilation and even release-candidate binaries. The only problem is that there's no arm64 support there. Swapping our current (complex) compilation process with a much-simpler process (https://github.com/deleugpn/bref-runtime-internal/blob/main/PHP80.Dockerfile#L6-L11) without arm64 support kinda feels like touching what doesn't need to be touched. OTOH, if I do use remi-collect as a simplified packaging and then use amazon-linux-extras for arm64, I fall into having to maintain 2 different processes that are not consistent with each other and put the Graviton layers behind on point releases which could be good, but kinda awkward.
@deleugpn I might be wrong, but I thought the point of a compilation is to install everything to the same path (/opt) and maintain all the relations and links when binaries and modules are extracted and zipped into a layer.
The folks at Vercel are doing some amazing stuff that works great (https://github.com/deleugpn/bref-runtime-internal/blob/main/php80.build.sh#L31).
I copied this strategy from https://github.com/juicyfx/libphp/blob/master/libs/amazon-linux-2-v80/Makefile#L53
@deleugpn okay, I understand there's a way to extract an artefact from any place in the container. But, is an explicit listing more convenient rather than copying every binary/module installed on a build time? Imagine you have an auxiliary module of a file built for an extension, and it's missing from your list. How long will it take to pinpoint a root cause of a broken extension?
I guess that's subjective. I have some extensive experience on PHP, but I find the code compiling PHP hard to read / understand / maintain. The copy/paste strategy seems much more straightforward / easier to read and understand. It gets boring, but you can always run ldd /usr/lib64/php/modules/curl.so and find the necessary shared libraries to build the layer. I'm not sure I will replace Bref build process at all. This is just wild speculation while I'm studying / learning while trying to build Graviton support.
How can I help getting this shipped?
PHP 8.1 just released which has native support for the JIT on ARM.
I've been working on https://github.com/brefphp/bref/pull/1078 for quite a while now but docker-compose bug on ARM prevents it from building arm layers at the moment. In the meantime I'm trying to finish up how to integrate the console layer into the new proposal so that we can start beta test it while we wait on https://github.com/docker/compose/issues/8804
If you're interested, I can post the arn on the x86 layers that needs some QA testing before we're confident to move forward with the new runtime.
@deleugpn interested in testing the x86 layers
arn:aws:lambda:us-east-1:978790411843:layer:prototype-arm64-php74-function:1 arn:aws:lambda:us-east-1:179453031647:layer:prototype-arm64-php74-fpm:1
@deleugpn do you have them in 8.0 by chance ? our code base use some 8.x-only features :)
I will look into building it this week. Sorry for the short answer, I'm on holidays between Christmas and new years
no problem, enjoy your vacations :)
sorry the long time without replies. I have actually tried to release ARM64 prototype layers across regions multiple times in the past 3 weeks and no luck as of yet.
Some exotic AWS regions seems to be bugged when trying to publish Graviton layers because it always gives "The security token in the request is invalid" even though the build process is a perfect replica between x86 and arm64. I tried disabling these regions and now there is an unknown error crashing the build process just after the layers are published which I'm still unable to track down. In the meantime, docker-compose is still bugged on arm64 when trying to build using buildkit, so builds are much slower for arm64.
Unfortunately the progress here is a bit slow as there's a lot of moving parts that are still not working well with arm64 and sometimes don't even give clear errors.
thanks for keeping us updated , especially as it looks like a very tedious and "death by a thousand cut" work , hope you will succeed :)
@deleugpn I'm going to have some focus time at work to dedicate to this, happy to collab on what you have done so far and help push this over the finish line.
Some exotic AWS regions seems to be bugged when trying to publish Graviton layers because it always gives "The security token in the request is invalid" even though the build process is a perfect replica between x86 and arm64.
Please note that Graviton2 processor support for Lambda is not available in all regions (see):
You can use Lambda Functions powered by Graviton2 processor today in US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Frankfurt), Europe (Ireland), EU (London), Asia Pacific (Mumbai), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo).
@deleugpn Are there any errors when deploying in the supported regions?
@wlami Thank you very much for that list! Unfortunately I just tried that and it did not solve the issue https://github.com/deleugpn/bref/pull/53
If anybody can figure out why this script fails at the end, please I'm open to any ideas
AWS CodeBuild Logs
Successfully built 1f0adeee2251
Successfully tagged bref/arm-php80-fpm-zip:latest
Network runtime_default Creating
Network runtime_default Created
Container runtime-php80-zip-fpm-1 Creating
Container runtime-php74-zip-fpm-1 Creating
Container runtime-php74-zip-function-1 Creating
Container runtime-php80-zip-function-1 Creating
Container runtime-php80-zip-fpm-1 Created
Container runtime-php80-zip-function-1 Created
Container runtime-php74-zip-fpm-1 Created
Container runtime-php74-zip-function-1 Created
Attaching to runtime-php74-zip-fpm-1, runtime-php74-zip-function-1, runtime-php80-zip-fpm-1, runtime-php80-zip-function-1
runtime-php74-zip-fpm-1 exited with code 0
runtime-php74-zip-function-1 exited with code 0
runtime-php80-zip-fpm-1 exited with code 0
runtime-php80-zip-function-1 exited with code 0
Container runtime-php80-zip-fpm-1 Stopping
Container runtime-php80-zip-fpm-1 Stopping
Container runtime-php74-zip-fpm-1 Stopping
Container runtime-php80-zip-function-1 Stopping
Container runtime-php74-zip-function-1 Stopping
Container runtime-php74-zip-function-1 Stopping
Container runtime-php80-zip-function-1 Stopping
Container runtime-php74-zip-fpm-1 Stopping
Container runtime-php80-zip-fpm-1 Stopped
Container runtime-php80-zip-fpm-1 Removing
Container runtime-php74-zip-fpm-1 Stopped
Container runtime-php74-zip-fpm-1 Removing
Container runtime-php74-zip-function-1 Stopped
Container runtime-php74-zip-function-1 Removing
Container runtime-php80-zip-function-1 Stopped
Container runtime-php80-zip-function-1 Removing
Container runtime-php80-zip-fpm-1 Removed
Container runtime-php80-zip-function-1 Removed
Container runtime-php74-zip-fpm-1 Removed
Container runtime-php74-zip-function-1 Removed
Network runtime_default Removing
Network runtime_default Removed
make[1]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
# Add executable permission to the publish script
chmod +x ./publish.sh
LAYER_NAME=arm-php74-function make parallel-publish
make[2]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
REGION=us-east-1 ./publish.sh #US East (N. Virginia)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 12 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-1:179453031647:layer:prototype-arm-php74-function:12"}
[Publish] Layer added!
REGION=us-east-2 ./publish.sh #US East (Ohio)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 12 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-2:179453031647:layer:prototype-arm-php74-function:12"}
[Publish] Layer added!
#REGION=us-west-1 ./publish.sh #US West (N. California)
REGION=us-west-2 ./publish.sh #US West (Oregon)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 12 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-west-2:179453031647:layer:prototype-arm-php74-function:12"}
[Publish] Layer added!
#REGION=ca-central-1 ./publish.sh #Canada (Central)
#REGION=sa-east-1 ./publish.sh #South America (São Paulo)
REGION=eu-west-1 ./publish.sh #Europe (Ireland)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 12 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-1:179453031647:layer:prototype-arm-php74-function:12"}
[Publish] Layer added!
REGION=eu-west-2 ./publish.sh #Europe (London)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 12 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-2:179453031647:layer:prototype-arm-php74-function:12"}
[Publish] Layer added!
#REGION=eu-west-3 ./publish.sh #Europe (Paris)
#REGION=eu-north-1 ./publish.sh #Europe (Stockholm)
#REGION=eu-south-1 ./publish.sh #Europe (Milan)
REGION=eu-central-1 ./publish.sh #Europe (Frankfurt)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-central-1:179453031647:layer:prototype-arm-php74-function:4"}
[Publish] Layer added!
#REGION=ap-east-1 ./publish.sh #Asia Pacific (Hong Kong)
REGION=ap-south-1 ./publish.sh #Asia Pacific (Mumbai)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-south-1:179453031647:layer:prototype-arm-php74-function:4"}
[Publish] Layer added!
REGION=ap-southeast-1 ./publish.sh #Asia Pacific (Singapore)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-1:179453031647:layer:prototype-arm-php74-function:4"}
[Publish] Layer added!
REGION=ap-northeast-1 ./publish.sh #Asia Pacific (Tokyo)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 12 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-northeast-1:179453031647:layer:prototype-arm-php74-function:12"}
[Publish] Layer added!
#REGION=ap-northeast-3 ./publish.sh #Asia Pacific (Osaka)
#REGION=ap-northeast-2 ./publish.sh #Asia Pacific (Seoul)
#REGION=af-south-1 ./publish.sh #Africa (Cape Town)
#REGION=me-south-1 ./publish.sh #Middle East (Bahrain)
REGION=ap-southeast-2 ./publish.sh #Asia Pacific (Sydney)
[Publish] Publishing layer arm-php74-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-2:179453031647:layer:prototype-arm-php74-function:4"}
[Publish] Layer added!
make[2]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
# Add executable permission to the publish script
chmod +x ./publish.sh
LAYER_NAME=arm-php80-function make parallel-publish
make[2]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
REGION=us-east-1 ./publish.sh #US East (N. Virginia)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-1:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
REGION=us-east-2 ./publish.sh #US East (Ohio)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-2:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
#REGION=us-west-1 ./publish.sh #US West (N. California)
REGION=us-west-2 ./publish.sh #US West (Oregon)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-west-2:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
#REGION=ca-central-1 ./publish.sh #Canada (Central)
#REGION=sa-east-1 ./publish.sh #South America (São Paulo)
REGION=eu-west-1 ./publish.sh #Europe (Ireland)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-1:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
REGION=eu-west-2 ./publish.sh #Europe (London)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-2:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
#REGION=eu-west-3 ./publish.sh #Europe (Paris)
#REGION=eu-north-1 ./publish.sh #Europe (Stockholm)
#REGION=eu-south-1 ./publish.sh #Europe (Milan)
REGION=eu-central-1 ./publish.sh #Europe (Frankfurt)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-central-1:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
#REGION=ap-east-1 ./publish.sh #Asia Pacific (Hong Kong)
REGION=ap-south-1 ./publish.sh #Asia Pacific (Mumbai)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-south-1:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
REGION=ap-southeast-1 ./publish.sh #Asia Pacific (Singapore)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-1:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
REGION=ap-northeast-1 ./publish.sh #Asia Pacific (Tokyo)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-northeast-1:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
#REGION=ap-northeast-3 ./publish.sh #Asia Pacific (Osaka)
#REGION=ap-northeast-2 ./publish.sh #Asia Pacific (Seoul)
#REGION=af-south-1 ./publish.sh #Africa (Cape Town)
#REGION=me-south-1 ./publish.sh #Middle East (Bahrain)
REGION=ap-southeast-2 ./publish.sh #Asia Pacific (Sydney)
[Publish] Publishing layer arm-php80-function...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-2:179453031647:layer:prototype-arm-php80-function:4"}
[Publish] Layer added!
make[2]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
# Add executable permission to the publish script
chmod +x ./publish.sh
LAYER_NAME=arm-php74-fpm make parallel-publish
make[2]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
REGION=us-east-1 ./publish.sh #US East (N. Virginia)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-1:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
REGION=us-east-2 ./publish.sh #US East (Ohio)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-2:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
#REGION=us-west-1 ./publish.sh #US West (N. California)
REGION=us-west-2 ./publish.sh #US West (Oregon)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-west-2:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
#REGION=ca-central-1 ./publish.sh #Canada (Central)
#REGION=sa-east-1 ./publish.sh #South America (São Paulo)
REGION=eu-west-1 ./publish.sh #Europe (Ireland)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-1:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
REGION=eu-west-2 ./publish.sh #Europe (London)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-2:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
#REGION=eu-west-3 ./publish.sh #Europe (Paris)
#REGION=eu-north-1 ./publish.sh #Europe (Stockholm)
#REGION=eu-south-1 ./publish.sh #Europe (Milan)
REGION=eu-central-1 ./publish.sh #Europe (Frankfurt)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-central-1:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
#REGION=ap-east-1 ./publish.sh #Asia Pacific (Hong Kong)
REGION=ap-south-1 ./publish.sh #Asia Pacific (Mumbai)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-south-1:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
REGION=ap-southeast-1 ./publish.sh #Asia Pacific (Singapore)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-1:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
REGION=ap-northeast-1 ./publish.sh #Asia Pacific (Tokyo)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-northeast-1:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
#REGION=ap-northeast-3 ./publish.sh #Asia Pacific (Osaka)
#REGION=ap-northeast-2 ./publish.sh #Asia Pacific (Seoul)
#REGION=af-south-1 ./publish.sh #Africa (Cape Town)
#REGION=me-south-1 ./publish.sh #Middle East (Bahrain)
REGION=ap-southeast-2 ./publish.sh #Asia Pacific (Sydney)
[Publish] Publishing layer arm-php74-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-2:179453031647:layer:prototype-arm-php74-fpm:4"}
[Publish] Layer added!
make[2]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
# Add executable permission to the publish script
chmod +x ./publish.sh
LAYER_NAME=arm-php80-fpm make parallel-publish
make[2]: Entering directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
REGION=us-east-1 ./publish.sh #US East (N. Virginia)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-1:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
REGION=us-east-2 ./publish.sh #US East (Ohio)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-2:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
#REGION=us-west-1 ./publish.sh #US West (N. California)
REGION=us-west-2 ./publish.sh #US West (Oregon)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-west-2:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
#REGION=ca-central-1 ./publish.sh #Canada (Central)
#REGION=sa-east-1 ./publish.sh #South America (São Paulo)
REGION=eu-west-1 ./publish.sh #Europe (Ireland)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-1:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
REGION=eu-west-2 ./publish.sh #Europe (London)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-west-2:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
#REGION=eu-west-3 ./publish.sh #Europe (Paris)
#REGION=eu-north-1 ./publish.sh #Europe (Stockholm)
#REGION=eu-south-1 ./publish.sh #Europe (Milan)
REGION=eu-central-1 ./publish.sh #Europe (Frankfurt)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:eu-central-1:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
#REGION=ap-east-1 ./publish.sh #Asia Pacific (Hong Kong)
REGION=ap-south-1 ./publish.sh #Asia Pacific (Mumbai)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-south-1:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
REGION=ap-southeast-1 ./publish.sh #Asia Pacific (Singapore)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-1:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
REGION=ap-northeast-1 ./publish.sh #Asia Pacific (Tokyo)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-northeast-1:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
#REGION=ap-northeast-3 ./publish.sh #Asia Pacific (Osaka)
#REGION=ap-northeast-2 ./publish.sh #Asia Pacific (Seoul)
#REGION=af-south-1 ./publish.sh #Africa (Cape Town)
#REGION=me-south-1 ./publish.sh #Middle East (Bahrain)
REGION=ap-southeast-2 ./publish.sh #Asia Pacific (Sydney)
[Publish] Publishing layer arm-php80-fpm...
[Publish] Layer 4 published! Adding layer permission...
{"Sid":"public","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:ap-southeast-2:179453031647:layer:prototype-arm-php80-fpm:4"}
[Publish] Layer added!
make[2]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
make[1]: Leaving directory `/codebuild/output/src031647930/src/github.com/deleugpn/bref/runtime/common/publish'
Network utils_default Creating
Network utils_default Created
make: *** [everything] Error 255
[Container] 2022/01/31 22:10:14 Command did not exit successfully make -f cpu-${CPU}.Makefile everything exit status 2
[Container] 2022/01/31 22:10:14 Phase complete: BUILD State: FAILED_WITH_ABORT
[Container] 2022/01/31 22:10:14 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: make -f cpu-${CPU}.Makefile everything. Reason: exit status 2
Real Logs: https://us-east-1.codebuild.aws.amazon.com/project/eyJlbmNyeXB0ZWREYXRhIjoib25lTkcvanI1K3FsbnBtN1NkeCtnYWRCWFFLQ1IrSHBYUllLVTRYV3I4S1B6RUU5UmJCRHUyb29NcjZ1bUV3YmVNMmUzRTd3RHd5OVhrRmVzdmFTMmZ3SFdxZHQwZHJ2bjJNbjBJRE43Vkd6NmVQeW00bVZDZ2NPVUhUQkhjSldZWDQ9IiwiaXZQYXJhbWV0ZXJTcGVjIjoiOHFqRUFlYkIyVUtXUVduUyIsIm1hdGVyaWFsU2V0U2VyaWFsIjoxfQ%3D%3D/build/0a3c357c-bb2f-45d2-ab8e-78d3b9368b18