AWS Lambda CLI gives incorrect(?) error about S3 bucket being in incorrect region

0

I am running this Bash command:

aws lambda publish-layer-version \
    --layer-name pythonPackages \
    --content S3Bucket=dev-file-transfer,S3Key=lambda_layer_python_packages.zip \
    --compatible-runtimes python3.12 \
    --compatible-architectures arm64

It gives this error:

An error occurred (InvalidParameterValueException) when calling the PublishLayerVersion operation: Error occurred while GetObject. S3 Error Code: PermanentRedirect. S3 Error Message: The bucket is in this region: us-west-1. Please use this region to retry the request

saying that the S3 bucket I am working with exists in the us-west-1 region.

But, it doesn't. Everything I have is in us-east-1. Enter image description here

I have no buckets in us-west-1.

Any ideas how to get around this? Is it a bug?

gefragt vor einem Monat168 Aufrufe
1 Antwort
1
Akzeptierte Antwort

I realized immediately after posting that I am using the wrong bucket name in my command. Someone else owns dev-file-transfer and it must be located in us-west-1.

beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen