Amazon Elastic Compute Cloud (EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. One of the features of EC2 is the ability to create VPC (Virtual Private Cloud) endpoint services, which allow you to privately connect your VPC to supported AWS services and VPC endpoint services powered by AWS PrivateLink.
When configuring a VPC endpoint service, you might encounter the error code InvalidVpcEndpointServiceAllowedPrincipalID.Malformed. This error indicates that the specified VPC endpoint service allowed principal ID is not in the correct format.
During the setup or modification of a VPC endpoint service, the operation fails with an error message stating that the principal ID is malformed. This prevents the successful creation or update of the endpoint service.
The error InvalidVpcEndpointServiceAllowedPrincipalID.Malformed arises when the principal ID provided does not adhere to the expected format. A principal ID is typically an AWS account ID or an IAM role/user ARN that is allowed to access the VPC endpoint service.
To resolve this issue, follow these steps to ensure the principal ID is correctly formatted:
Ensure that the principal ID is in the correct format. For AWS account IDs, it should be a 12-digit number. For IAM roles or users, it should be in the ARN format, such as arn:aws:iam::123456789012:role/RoleName
.
Double-check the principal ID for any typographical errors. Ensure that all characters are correct and that there are no extra spaces or missing characters.
Use the AWS Management Console or AWS CLI to update the VPC endpoint service configuration. Here is an example command using the AWS CLI:
aws ec2 modify-vpc-endpoint-service-permissions \
--service-id vpce-svc-0123456789abcdef0 \
--add-allowed-principals arn:aws:iam::123456789012:role/RoleName
For more details on using the AWS CLI, refer to the AWS CLI Command Reference.
For further information on VPC endpoint services and managing permissions, you can visit the following resources:
By following these steps and ensuring the correct format, you should be able to resolve the InvalidVpcEndpointServiceAllowedPrincipalID.Malformed error and successfully configure your VPC endpoint service.
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo